From 0cca378d2bb99dd7076a8218141d5515e0025290 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Wed, 11 Oct 2023 20:32:32 -0300 Subject: [PATCH] Unwanted mass rename of tinsert to table.insert --- core/util.lua | 32 ++++++++--------- core/windows.lua | 4 +-- frames/window_api.lua | 6 ++-- frames/window_bookmark.lua | 2 +- frames/window_cdtracker.lua | 4 +-- frames/window_classcolor.lua | 4 +-- frames/window_copy.lua | 2 +- frames/window_currentdps.lua | 6 ++-- frames/window_eventtracker.lua | 10 +++--- frames/window_forge.lua | 10 +++--- frames/window_main.lua | 18 +++++----- frames/window_news.lua | 2 +- frames/window_plater.lua | 2 +- frames/window_report.lua | 14 ++++---- frames/window_scrolldamage.lua | 2 +- frames/window_statistics.lua | 46 ++++++++++++------------ frames/window_switch.lua | 8 ++--- frames/window_wa.lua | 16 ++++----- frames/window_welcome.lua | 24 ++++++------- functions/api2.lua | 64 +++++++++++++++++----------------- functions/bossmods.lua | 4 +-- functions/coach.lua | 2 +- functions/deathrecap.lua | 10 +++--- functions/dungeon.lua | 22 ++++++------ functions/mythicdungeon.lua | 6 ++-- functions/pack.lua | 2 +- functions/plater.lua | 4 +-- functions/raidinfo.lua | 2 +- functions/rowanimation.lua | 4 +-- functions/savedata.lua | 2 +- functions/slash.lua | 24 ++++++------- functions/spellcache.lua | 2 +- 32 files changed, 180 insertions(+), 180 deletions(-) diff --git a/core/util.lua b/core/util.lua index 42c137a5..d84a00ab 100644 --- a/core/util.lua +++ b/core/util.lua @@ -635,14 +635,14 @@ Details:Destroy(Details.ToKFunctions) - tinsert(Details.ToKFunctions, Details.NoToK) - tinsert(Details.ToKFunctions, Details.ToK) - tinsert(Details.ToKFunctions, Details.ToK2) - tinsert(Details.ToKFunctions, Details.ToK0) - tinsert(Details.ToKFunctions, Details.ToKMin) - tinsert(Details.ToKFunctions, Details.ToK2Min) - tinsert(Details.ToKFunctions, Details.ToK0Min) - tinsert(Details.ToKFunctions, Details.comma_value) + table.insert(Details.ToKFunctions, Details.NoToK) + table.insert(Details.ToKFunctions, Details.ToK) + table.insert(Details.ToKFunctions, Details.ToK2) + table.insert(Details.ToKFunctions, Details.ToK0) + table.insert(Details.ToKFunctions, Details.ToKMin) + table.insert(Details.ToKFunctions, Details.ToK2Min) + table.insert(Details.ToKFunctions, Details.ToK0Min) + table.insert(Details.ToKFunctions, Details.comma_value) end @@ -768,14 +768,14 @@ Details:Destroy(Details.ToKFunctions) - tinsert(Details.ToKFunctions, Details.NoToK) - tinsert(Details.ToKFunctions, Details.ToK) - tinsert(Details.ToKFunctions, Details.ToK2) - tinsert(Details.ToKFunctions, Details.ToK0) - tinsert(Details.ToKFunctions, Details.ToKMin) - tinsert(Details.ToKFunctions, Details.ToK2Min) - tinsert(Details.ToKFunctions, Details.ToK0Min) - tinsert(Details.ToKFunctions, Details.comma_value) + table.insert(Details.ToKFunctions, Details.NoToK) + table.insert(Details.ToKFunctions, Details.ToK) + table.insert(Details.ToKFunctions, Details.ToK2) + table.insert(Details.ToKFunctions, Details.ToK0) + table.insert(Details.ToKFunctions, Details.ToKMin) + table.insert(Details.ToKFunctions, Details.ToK2Min) + table.insert(Details.ToKFunctions, Details.ToK0Min) + table.insert(Details.ToKFunctions, Details.comma_value) -- end diff --git a/core/windows.lua b/core/windows.lua index 297258bb..df31095c 100644 --- a/core/windows.lua +++ b/core/windows.lua @@ -1243,7 +1243,7 @@ if (not _G.DetailsUpdateDialog) then local updatewindow_frame = CreateFrame("frame", "DetailsUpdateDialog", UIParent, "ButtonFrameTemplate") updatewindow_frame:SetFrameStrata("LOW") - tinsert(UISpecialFrames, "DetailsUpdateDialog") + table.insert(UISpecialFrames, "DetailsUpdateDialog") updatewindow_frame:SetPoint("center", UIParent, "center") updatewindow_frame:SetSize(512, 200) --updatewindow_frame.portrait:SetTexture([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-GNOME]]) @@ -1623,7 +1623,7 @@ function Details.ShowCopyValueFrame(textToShow) frame:SetSize(160, 20) frame:SetPoint("center", UIParent, "center", 0, 0) DetailsFramework:ApplyStandardBackdrop(frame) - tinsert(UISpecialFrames, "DetailsCopyValueFrame") + table.insert(UISpecialFrames, "DetailsCopyValueFrame") frame.editBox = CreateFrame("editbox", nil, frame) frame.editBox:SetPoint("topleft", frame, "topleft") diff --git a/frames/window_api.lua b/frames/window_api.lua index 1117d305..5d5429c5 100644 --- a/frames/window_api.lua +++ b/frames/window_api.lua @@ -143,7 +143,7 @@ function Details:CreateAPI2Frame() end for apiIndex, apiDesc in ipairs(api) do - tinsert(apiFunctionNames, apiDesc.name) + table.insert(apiFunctionNames, apiDesc.name) end local api2ScrollMenu = DetailsFramework:CreateScrollBox (Api2Frame, "$parentApi2MenuScroll", apiMenuScrollRefresh, apiFunctionNames, scrollWidth, scrollHeight, lineAmount, lineHeight) @@ -286,7 +286,7 @@ function Details:CreateAPI2Frame() f.required:SetPoint("left", f, "left", space2, 0) f.default:SetPoint("left", f, "left", space3, 0) - tinsert(parametersLines, f) + table.insert(parametersLines, f) end --return value box @@ -339,7 +339,7 @@ function Details:CreateAPI2Frame() f.desc:SetPoint("topleft", f.name, "bottomleft", 0, -5) - tinsert(returnLines, f) + table.insert(returnLines, f) end function Api2Frame.Refresh() diff --git a/frames/window_bookmark.lua b/frames/window_bookmark.lua index 16f6eb99..6534e6d5 100644 --- a/frames/window_bookmark.lua +++ b/frames/window_bookmark.lua @@ -93,7 +93,7 @@ function Details:OpenBookmarkConfig() local label = DF:CreateLabel(set, "") label:SetPoint("left", icon, "right", 2, 0) - tinsert(panel.blocks, {icon = icon, label = label, bg = set.bg, button = set}) + table.insert(panel.blocks, {icon = icon, label = label, bg = set.bg, button = set}) end local normal_coords = {0, 1, 0, 1} diff --git a/frames/window_cdtracker.lua b/frames/window_cdtracker.lua index 9bb7764b..0eb732e3 100644 --- a/frames/window_cdtracker.lua +++ b/frames/window_cdtracker.lua @@ -62,7 +62,7 @@ function Details222.CooldownTracking.GetOrCreateNewCooldownLine(cooldownFrame, l return cooldownLine else cooldownLine = DF:CreateTimeBar(cooldownFrame, [[Interface\AddOns\Details\images\bar_serenity]], Details.ocd_tracker.width-2, Details.ocd_tracker.height-2, 100, nil, cooldownFrame:GetName() .. "CDFrame" .. lineId) - tinsert(cooldownFrame.bars, cooldownLine) + table.insert(cooldownFrame.bars, cooldownLine) cooldownLine:EnableMouse(false) return cooldownLine end @@ -295,7 +295,7 @@ end Details222.CooldownTracking.SetupCooldownLine(cooldownLine) --add the cooldown into the organized by class table - tinsert(cooldownsOrganized[classId], cooldownLine) + table.insert(cooldownsOrganized[classId], cooldownLine) --iterate to the next cooldown line cooldownFrame.nextLineId = cooldownFrame.nextLineId + 1 diff --git a/frames/window_classcolor.lua b/frames/window_classcolor.lua index fb34cb99..f5ba361c 100644 --- a/frames/window_classcolor.lua +++ b/frames/window_classcolor.lua @@ -121,7 +121,7 @@ function Details:OpenClassColorsConfig() --all colors local allColors = {} for colorName, colorTable in pairs(DF:GetDefaultColorList()) do - tinsert(allColors, {colorTable, colorName, hex(colorTable[1]*255) .. hex(colorTable[2]*255) .. hex(colorTable[3]*255)}) + table.insert(allColors, {colorTable, colorName, hex(colorTable[1]*255) .. hex(colorTable[2]*255) .. hex(colorTable[3]*255)}) end table.sort(allColors, sort_color) @@ -130,7 +130,7 @@ function Details:OpenClassColorsConfig() local colortable = colorTable[1] local colorname = colorTable[2] local value = colorname .. "@" .. barType - tinsert(result, {label = colorname, value = value, color = colortable, onclick = colorSelected}) + table.insert(result, {label = colorname, value = value, color = colortable, onclick = colorSelected}) end return result diff --git a/frames/window_copy.lua b/frames/window_copy.lua index c4732ede..34819375 100644 --- a/frames/window_copy.lua +++ b/frames/window_copy.lua @@ -9,7 +9,7 @@ do local panel = CreateFrame("frame", "DetailsCopy", UIParent, "ButtonFrameTemplate") panel:SetSize(512, 148) - tinsert(UISpecialFrames, "DetailsCopy") + table.insert(UISpecialFrames, "DetailsCopy") panel:SetFrameStrata("TOOLTIP") panel:SetPoint("center", UIParent, "center") panel.locked = false diff --git a/frames/window_currentdps.lua b/frames/window_currentdps.lua index 7c47bd78..578299ca 100644 --- a/frames/window_currentdps.lua +++ b/frames/window_currentdps.lua @@ -723,8 +723,8 @@ function Details:CreateCurrentDpsFrame(parent, name) local yellowDamageDone = thisTickYellowDamage - f.LastYellowDamage --add the damage to buffer - tinsert(f.PlayerTeamBuffer, 1, playerTeamDamageDone) - tinsert(f.YellowTeamBuffer, 1, yellowDamageDone) + table.insert(f.PlayerTeamBuffer, 1, playerTeamDamageDone) + table.insert(f.YellowTeamBuffer, 1, yellowDamageDone) --save the current damage amount f.LastPlayerTeamDamage = thisTickPlayerTeamDamage @@ -824,7 +824,7 @@ function Details:CreateCurrentDpsFrame(parent, name) local groupDamageDoneOnThisTick = thisTickGroupDamage - f.LastTickGroupDamage --add the damage to buffer - tinsert(f.GroupBuffer, 1, groupDamageDoneOnThisTick) + table.insert(f.GroupBuffer, 1, groupDamageDoneOnThisTick) --save the current damage amount f.LastTickGroupDamage = thisTickGroupDamage diff --git a/frames/window_eventtracker.lua b/frames/window_eventtracker.lua index bd1959a2..32a71d36 100644 --- a/frames/window_eventtracker.lua +++ b/frames/window_eventtracker.lua @@ -811,12 +811,12 @@ function Details:CreateEventTrackerFrame(parentObject, name) --defensive cooldown if (token == "SPELL_CAST_SUCCESS" and (spellInfo and defensiveCDType[spellInfo.type]) and is_player (caster_flags)) then - tinsert(CurrentShowing, 1, {SPELLTYPE_COOLDOWN, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) + table.insert(CurrentShowing, 1, {SPELLTYPE_COOLDOWN, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) added = true --offensive cooldown elseif (token == "SPELL_CAST_SUCCESS" and (spellInfo and spellInfo.type == 1 and spellInfo.cooldown and spellInfo.cooldown >= 90) and is_player (caster_flags)) then - tinsert(CurrentShowing, 1, {SPELLTYPE_OFFENSIVE, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) + table.insert(CurrentShowing, 1, {SPELLTYPE_OFFENSIVE, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) added = true --crowd control @@ -826,14 +826,14 @@ function Details:CreateEventTrackerFrame(parentObject, name) --the target is a player if (Details.event_tracker.show_crowdcontrol_pvp) then if (Details.zone_type == "arena" or Details.zone_type == "pvp" or Details.zone_type == "none") then - tinsert(CurrentShowing, 1, {SPELLTYPE_CROWDCONTROL, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) + table.insert(CurrentShowing, 1, {SPELLTYPE_CROWDCONTROL, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) added = true end end if (Details.event_tracker.show_crowdcontrol_pvm) then if (Details.zone_type == "party" or Details.zone_type == "raid") then - tinsert(CurrentShowing, 1, {SPELLTYPE_CROWDCONTROL, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) + table.insert(CurrentShowing, 1, {SPELLTYPE_CROWDCONTROL, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) added = true end end @@ -842,7 +842,7 @@ function Details:CreateEventTrackerFrame(parentObject, name) --spell interrupt elseif (token == "SPELL_INTERRUPT") then if (caster_flags and is_player (caster_flags)) then - tinsert(CurrentShowing, 1, {SPELLTYPE_INTERRUPT, spellid, caster_name, target_name, time, extraSpellID, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) + table.insert(CurrentShowing, 1, {SPELLTYPE_INTERRUPT, spellid, caster_name, target_name, time, extraSpellID, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) added = true end end diff --git a/frames/window_forge.lua b/frames/window_forge.lua index 91545be1..ba740ff9 100644 --- a/frames/window_forge.lua +++ b/frames/window_forge.lua @@ -151,7 +151,7 @@ function Details:OpenForge() function f:InstallModule (module) if (module and type(module) == "table") then - tinsert(all_modules, module) + table.insert(all_modules, module) end end @@ -479,7 +479,7 @@ function Details:OpenForge() end if (can_add) then - tinsert(t, {spellID, Details.classid_to_classstring [className] or className}) + table.insert(t, {spellID, Details.classid_to_classstring [className] or className}) end end @@ -625,7 +625,7 @@ function Details:OpenForge() end if (can_add) then - tinsert(t, {spellID, encounterID, enemyName, bossDetails and bossDetails.boss or "--x--x--"}) + table.insert(t, {spellID, encounterID, enemyName, bossDetails and bossDetails.boss or "--x--x--"}) end end end @@ -734,7 +734,7 @@ function Details:OpenForge() end end if (canAdd) then - tinsert(t, {npcId, npcName}) + table.insert(t, {npcId, npcName}) end end @@ -1136,7 +1136,7 @@ function Details:OpenForge() end lastButton = b - tinsert(buttons, b) + table.insert(buttons, b) end select_module (nil, nil, 1) diff --git a/frames/window_main.lua b/frames/window_main.lua index 78c76a61..062701b3 100644 --- a/frames/window_main.lua +++ b/frames/window_main.lua @@ -537,7 +537,7 @@ local update_line = function(self, target_frame) ball:SetSize(16, 16) ball:SetAlpha(0.3) ball:SetTexCoord(410/512, 426/512, 2/512, 18/512) - tinsert(guide_balls, ball) + table.insert(guide_balls, ball) end ball:ClearAllPoints() @@ -1165,7 +1165,7 @@ end local check_snap_side = function(instanceid, snap, id, container) local instance = Details:GetInstance(instanceid) if (instance and instance.snap [snap] and instance.snap [snap] == id) then - tinsert(container, instance) + table.insert(container, instance) return true end end @@ -1260,7 +1260,7 @@ function Details:InstanciasVerticais(instance) end bottom_clamp = bottom_clamp + 20 bottom_clamp = bottom_clamp + this_instance.baseframe:GetHeight() - tinsert(on_top, this_instance) + table.insert(on_top, this_instance) end return on_top, bottom_clamp, top_clamp @@ -2286,7 +2286,7 @@ function icon_frame_events:EnterCombat() for anim, _ in pairs(Details.icon_animations.load.in_use) do anim.anim:Stop() anim:Hide() - tinsert(Details.icon_animations.load.available, anim) + table.insert(Details.icon_animations.load.available, anim) anim.icon_frame.icon_animation = nil anim.icon_frame = nil @@ -2318,7 +2318,7 @@ function icon_frame_events:CancelAnim(anim) end Details.icon_animations.load.in_use[frame] = nil - tinsert(Details.icon_animations.load.available, frame) + table.insert(Details.icon_animations.load.available, frame) frame.anim:Stop() frame:Hide() @@ -2335,7 +2335,7 @@ local icon_frame_inspect_callback = function(guid, unitid, iconFrame) local inUse = Details.icon_animations.load.in_use[iconFrame.icon_animation] if (inUse) then - tinsert(Details.icon_animations.load.available, iconFrame.icon_animation) + table.insert(Details.icon_animations.load.available, iconFrame.icon_animation) Details.icon_animations.load.in_use[iconFrame.icon_animation] = nil end @@ -2363,7 +2363,7 @@ local icon_frame_create_animation = function() t:SetAlpha(0.7) t:SetAllPoints() - tinsert(Details.icon_animations.load.available, f) + table.insert(Details.icon_animations.load.available, f) end local icon_frame_on_click_down = function(self) @@ -8385,7 +8385,7 @@ function Details:GetInstanceGroup (instance_id) if (this_instance and this_instance:IsEnabled()) then for side, id in pairs(this_instance.snap) do if (id == last_id) then - tinsert(current_group, this_instance) + table.insert(current_group, this_instance) got = true last_id = i end @@ -8403,7 +8403,7 @@ function Details:GetInstanceGroup (instance_id) if (this_instance and this_instance:IsEnabled()) then for side, id in pairs(this_instance.snap) do if (id == last_id) then - tinsert(current_group, this_instance) + table.insert(current_group, this_instance) got = true last_id = i end diff --git a/frames/window_news.lua b/frames/window_news.lua index 205ed4cf..7cfb7b3a 100644 --- a/frames/window_news.lua +++ b/frames/window_news.lua @@ -70,7 +70,7 @@ function Details:CreateOrOpenNewsWindow() if (not frame) then frame = DetailsFramework:CreateSimplePanel(UIParent, 480, 560, "Details! Damage Meter " .. Details.version, "DetailsNewsWindow", panel_options, db) - tinsert(UISpecialFrames, "DetailsNewsWindow") + table.insert(UISpecialFrames, "DetailsNewsWindow") frame:SetPoint("left", UIParent, "left", 10, 0) frame:SetFrameStrata("FULLSCREEN") frame:SetMovable(true) diff --git a/frames/window_plater.lua b/frames/window_plater.lua index 0b9cd0e9..8fd38762 100644 --- a/frames/window_plater.lua +++ b/frames/window_plater.lua @@ -45,7 +45,7 @@ function Details.OpenPlaterIntegrationWindow() local build_anchor_side_table = function(member) local t = {} for i = 1, 13 do - tinsert(t, { + table.insert(t, { label = anchor_names[i], value = i, onclick = function(_, _, value) diff --git a/frames/window_report.lua b/frames/window_report.lua index f30f686a..e835d6f5 100644 --- a/frames/window_report.lua +++ b/frames/window_report.lua @@ -121,7 +121,7 @@ local _ Details.copypasteframe = CreateFrame("frame", "DetailsCopyPasteFrame2", UIParent, "BackdropTemplate") Details.copypasteframe:SetFrameStrata("TOOLTIP") Details.copypasteframe:SetPoint("CENTER", UIParent, "CENTER", 0, 50) - tinsert(UISpecialFrames, "DetailsCopyPasteFrame2") + table.insert(UISpecialFrames, "DetailsCopyPasteFrame2") Details.copypasteframe:SetSize(400, 400) Details.copypasteframe:Hide() @@ -686,10 +686,10 @@ local createDropdown = function(thisFrame) bg1:SetHorizTile(true) bg1:SetAllPoints() - tinsert(window.all_widgets, bg1) - tinsert(window.widgets, bg1) - tinsert(window.all_widgets, titlebar) - tinsert(window.widgets, titlebar) + table.insert(window.all_widgets, bg1) + table.insert(window.widgets, bg1) + table.insert(window.all_widgets, titlebar) + table.insert(window.widgets, titlebar) end window.title:ClearAllPoints() @@ -747,7 +747,7 @@ local createDropdown = function(thisFrame) function gump:CriaJanelaReport() --window local window = CreateFrame("Frame", "DetailsReportWindow", UIParent, "BackdropTemplate") - tinsert(UISpecialFrames, "DetailsReportWindow") + table.insert(UISpecialFrames, "DetailsReportWindow") window:SetPoint("CENTER", UIParent, "CENTER") window:SetFrameStrata("DIALOG") window.skins = {} @@ -833,7 +833,7 @@ local createDropdown = function(thisFrame) button.icon = icon button.text = text button:SetScript("OnClick", recentlyButtonOnClick) - tinsert(window.recently_report_buttons, button) + table.insert(window.recently_report_buttons, button) end historyBlockBackground:Hide() diff --git a/frames/window_scrolldamage.lua b/frames/window_scrolldamage.lua index deea3c04..211fd0d2 100644 --- a/frames/window_scrolldamage.lua +++ b/frames/window_scrolldamage.lua @@ -238,7 +238,7 @@ function Details:ScrollDamage() if (not DetailsScrollDamage.Data.Started) then DetailsScrollDamage.Data.Started = time() end - tinsert(DetailsScrollDamage.Data, 1, {timew, token, hidding, sourceSerial, sourceName, sourceFlag, sourceFlag2, targetSerial, targetName, targetFlag, targetFlag2, spellID, spellName, spellType, amount, overKill or 0, school or 1, resisted or 0, blocked or 0, absorbed or 0, isCritical}) + table.insert(DetailsScrollDamage.Data, 1, {timew, token, hidding, sourceSerial, sourceName, sourceFlag, sourceFlag2, targetSerial, targetName, targetFlag, targetFlag2, spellID, spellName, spellType, amount, overKill or 0, school or 1, resisted or 0, blocked or 0, absorbed or 0, isCritical}) Details:Destroy(DetailsScrollDamage.searchCache) damageScroll:RefreshScroll() diff --git a/frames/window_statistics.lua b/frames/window_statistics.lua index d265c4ba..3324e244 100644 --- a/frames/window_statistics.lua +++ b/frames/window_statistics.lua @@ -39,7 +39,7 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, statisticsFrame:SetMovable(true) statisticsFrame:SetWidth(850) statisticsFrame:SetHeight(500) - tinsert(UISpecialFrames, "DetailsRaidHistoryWindow") + table.insert(UISpecialFrames, "DetailsRaidHistoryWindow") function statisticsFrame.OpenDB() local db = Details.storage:OpenRaidStorage() @@ -245,7 +245,7 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, playerName = playerName:gsub("%|c%x%x%x%x%x%x%x%x", "") playerName = playerName:gsub("%|r", "") playerName = playerName:gsub(".*%s", "") - tinsert(result, {playerName, statisticsFrame.LatestResourceTable[i][2]}) + table.insert(result, {playerName, statisticsFrame.LatestResourceTable[i][2]}) else break end @@ -433,7 +433,7 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, local roleTable = encounter [role] for playerName, _ in pairs(roleTable) do if (not alreadyListed [playerName]) then - tinsert(t, {value = playerName, label = playerName, icon = icon, onclick = onPlayer2Select}) + table.insert(t, {value = playerName, label = playerName, icon = icon, onclick = onPlayer2Select}) alreadyListed [playerName] = true end end @@ -495,7 +495,7 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, if (encounter) then local instanceId = Details:GetInstanceIdFromEncounterId(dungeonEncounterID) if (raidSelected == instanceId) then - tinsert(bossList, {value = dungeonEncounterID, label = encounter.boss, icon = icon, onclick = onSelectBoss}) + table.insert(bossList, {value = dungeonEncounterID, label = encounter.boss, icon = icon, onclick = onSelectBoss}) bossRepeated[dungeonEncounterID] = true end @@ -513,7 +513,7 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, local raidIcon = raidData.raidIcon local raidIconCoords = raidData.raidIconCoords - tinsert(raidList, {value = instance.id, label = instanceName, icon = raidIcon, texcoord = raidIconCoords, onclick = onRaidSelect}) + table.insert(raidList, {value = instance.id, label = instanceName, icon = raidIcon, texcoord = raidIconCoords, onclick = onRaidSelect}) raidRepeated[instance.name] = true end end @@ -523,14 +523,14 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, --add guild name to the dropdown if (playerGuildName) then if (not guildRepeated[playerGuildName]) then - tinsert(guildList, {value = playerGuildName, label = playerGuildName, icon = icon, onclick = onGuildSelect}) + table.insert(guildList, {value = playerGuildName, label = playerGuildName, icon = icon, onclick = onGuildSelect}) guildRepeated[playerGuildName] = true end else for index, encounter in ipairs(encounterTable) do local guild = encounter.guild if (not guildRepeated[guild]) then - tinsert(guildList, {value = guild, label = guild, icon = icon, onclick = onGuildSelect}) + table.insert(guildList, {value = guild, label = guild, icon = icon, onclick = onGuildSelect}) guildRepeated[guild] = true end end @@ -545,7 +545,7 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, end end if (not alreadyHave) then - tinsert(difficultyList, 1, {value = difficulty, label = "Normal", icon = icon, onclick = onDifficultySelect}) + table.insert(difficultyList, 1, {value = difficulty, label = "Normal", icon = icon, onclick = onDifficultySelect}) end elseif (difficulty == 15) then @@ -556,7 +556,7 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, end end if (not alreadyHave) then - tinsert(difficultyList, 1, {value = difficulty, label = "Heroic", icon = icon, onclick = onDifficultySelect}) + table.insert(difficultyList, 1, {value = difficulty, label = "Heroic", icon = icon, onclick = onDifficultySelect}) end elseif (difficulty == 16) then @@ -567,7 +567,7 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, end end if (not alreadyHave) then - tinsert(difficultyList, {value = difficulty, label = "Mythic", icon = icon, onclick = onDifficultySelect}) + table.insert(difficultyList, {value = difficulty, label = "Mythic", icon = icon, onclick = onDifficultySelect}) end end end @@ -631,7 +631,7 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, if (encounter) then local instanceId = Details:GetInstanceIdFromEncounterId(dungeonEncounterID) if (raidSelected == instanceId) then - tinsert(bossList, {value = dungeonEncounterID, label = encounter.boss, icon = icon, onclick = onSelectBoss}) + table.insert(bossList, {value = dungeonEncounterID, label = encounter.boss, icon = icon, onclick = onSelectBoss}) bossRepeated[dungeonEncounterID] = true end end @@ -646,7 +646,7 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, end end if (not alreadyHave) then - tinsert(difficultyList, 1, {value = difficulty, label = "Normal", icon = icon, onclick = onDifficultySelect}) + table.insert(difficultyList, 1, {value = difficulty, label = "Normal", icon = icon, onclick = onDifficultySelect}) end elseif (difficulty == 15) then @@ -657,7 +657,7 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, end end if (not alreadyHave) then - tinsert(difficultyList, 1, {value = difficulty, label = "Heroic", icon = icon, onclick = onDifficultySelect}) + table.insert(difficultyList, 1, {value = difficulty, label = "Heroic", icon = icon, onclick = onDifficultySelect}) end elseif (difficulty == 16) then @@ -668,7 +668,7 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, end end if (not alreadyHave) then - tinsert(difficultyList, {value = difficulty, label = "Mythic", icon = icon, onclick = onDifficultySelect}) + table.insert(difficultyList, {value = difficulty, label = "Mythic", icon = icon, onclick = onDifficultySelect}) end end end @@ -725,7 +725,7 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, if (player) then --tinsert(data, {text = date, value = player[1], data = player, fulldate = encounter.date, elapsed = encounter.elapsed}) - tinsert(data, {text = date, value = player[1]/encounter.elapsed, utext = Details:ToK2 (player[1]/encounter.elapsed), data = player, fulldate = encounter.date, elapsed = encounter.elapsed}) + table.insert(data, {text = date, value = player[1]/encounter.elapsed, utext = Details:ToK2 (player[1]/encounter.elapsed), data = player, fulldate = encounter.date, elapsed = encounter.elapsed}) end end end @@ -816,7 +816,7 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, end local playerNameFormated = Details:GetOnlyName(playerName) - tinsert(sortTable, { + table.insert(sortTable, { "|c" .. classColor .. playerNameFormated .. "|r", Details:comma_value (t.ps), Details:ToK2 (t.total), @@ -865,7 +865,7 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, date = date:sub (1, -4) amt_encounters = amt_encounters + 1 - tinsert(header, {name = date, type = "text"}) + table.insert(header, {name = date, type = "text"}) for playerName, playerTable in pairs(roleTable) do local index = players_index [playerName] @@ -875,19 +875,19 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, player = {playerName} player_class [playerName] = playerTable [3] for i = 1, amt_encounters-1 do - tinsert(player, "") + table.insert(player, "") end - tinsert(player, Details:ToK2 (playerTable [1] / encounter.elapsed)) - tinsert(players, player) + table.insert(player, Details:ToK2 (playerTable [1] / encounter.elapsed)) + table.insert(players, player) players_index [playerName] = #players --print("not index", playerName, amt_encounters, date, 2, amt_encounters-1) else player = players [index] for i = #player+1, amt_encounters-1 do - tinsert(player, "") + table.insert(player, "") end - tinsert(player, Details:ToK2 (playerTable [1] / encounter.elapsed)) + table.insert(player, Details:ToK2 (playerTable [1] / encounter.elapsed)) end end @@ -899,7 +899,7 @@ function Details:OpenRaidHistoryWindow(raidName, bossEncounterId, difficultyId, for index, playerTable in ipairs(players) do for i = #playerTable, amt_encounters do - tinsert(playerTable, "") + table.insert(playerTable, "") end local className = select(2, GetClassInfo (player_class [playerTable [1]] or 0)) diff --git a/frames/window_switch.lua b/frames/window_switch.lua index 8790c33a..eb01a509 100644 --- a/frames/window_switch.lua +++ b/frames/window_switch.lua @@ -244,7 +244,7 @@ do allDisplaysFrame.check_text_size (button.text) button.texture:SetTexture(Details.sub_atributos [attribute].icones [i] [1]) button.texture:SetTexCoord(unpack(Details.sub_atributos [attribute].icones [i] [2])) - tinsert(allDisplaysFrame.buttons [attribute], button) + table.insert(allDisplaysFrame.buttons [attribute], button) y = y - 17 end @@ -302,7 +302,7 @@ do local button = allDisplaysFrame.buttons [custom_index] [button_index] if (not button) then button = create_all_switch_button (custom_index, i, allDisplaysFrame.x, allDisplaysFrame.y) - tinsert(allDisplaysFrame.buttons [custom_index], button) + table.insert(allDisplaysFrame.buttons [custom_index], button) allDisplaysFrame.y = allDisplaysFrame.y - 17 end @@ -342,7 +342,7 @@ do local button = allDisplaysFrame.buttons [script_index] [button_index] if (not button) then button = create_all_switch_button(script_index, button_index, allDisplaysFrame.x, allDisplaysFrame.y) - tinsert(allDisplaysFrame.buttons [script_index], button) + table.insert(allDisplaysFrame.buttons [script_index], button) allDisplaysFrame.y = allDisplaysFrame.y - 17 end @@ -561,7 +561,7 @@ function Details.switch:ShowMe(instancia) s.HideMe = hide_label s.ShowMe = show_label - tinsert(Details.switch.segments_blocks, s) + table.insert(Details.switch.segments_blocks, s) return s end diff --git a/frames/window_wa.lua b/frames/window_wa.lua index 33a6fb0a..9388893d 100644 --- a/frames/window_wa.lua +++ b/frames/window_wa.lua @@ -1779,7 +1779,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n else new_aura.trigger.spellId = tostring(spellid) new_aura.trigger.name = spellname - tinsert(new_aura.trigger.spellIds, spellid) + table.insert(new_aura.trigger.spellIds, spellid) end --if is a regular aura without using spells ids @@ -1902,7 +1902,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n end end - tinsert(WeakAurasSaved.displays [group].controlledChildren, new_aura.id) + table.insert(WeakAurasSaved.displays [group].controlledChildren, new_aura.id) else new_aura.parent = nil end @@ -2387,11 +2387,11 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr for _, sound in ipairs(sounds) do if (sound.name:find("D_")) then --details sound - tinsert(t, {color = "orange", label = sound.name, value = sound.file, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize}) + table.insert(t, {color = "orange", label = sound.name, value = sound.file, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize}) elseif (sound.gamesound) then --game sound - tinsert(t, {color = "yellow", label = sound.name, value = {sound_path = sound.file}, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize}) + table.insert(t, {color = "yellow", label = sound.name, value = {sound_path = sound.file}, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize}) else - tinsert(t, {label = sound.name, value = sound.file, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize}) + table.insert(t, {label = sound.name, value = sound.file, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize}) end end return t @@ -2458,7 +2458,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr local addon_options = function() local t = {} if (WeakAuras) then - tinsert(t, {label = "Weak Auras 2", value = "WA", icon = [[Interface\AddOns\WeakAuras\Media\Textures\icon]]}) + table.insert(t, {label = "Weak Auras 2", value = "WA", icon = [[Interface\AddOns\WeakAuras\Media\Textures\icon]]}) end return t end @@ -2480,12 +2480,12 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr if (WeakAuras and WeakAurasSaved) then for display_name, aura_table in pairs(WeakAurasSaved.displays) do if (aura_table.regionType == "dynamicgroup" or aura_table.regionType == "group") then - tinsert(t, {label = display_name, value = display_name, icon = folder_icon, texcoord = folder_texcoord, iconsize = folder_iconsize}) + table.insert(t, {label = display_name, value = display_name, icon = folder_icon, texcoord = folder_texcoord, iconsize = folder_iconsize}) end end end table.sort (t, sort_func) - tinsert(t, 1, {label = "No Group", value = false, icon = folder_icon, texcoord = folder_texcoord, iconcolor = {0.8, 0.2, 0.2}, iconsize = folder_iconsize}) + table.insert(t, 1, {label = "No Group", value = false, icon = folder_icon, texcoord = folder_texcoord, iconcolor = {0.8, 0.2, 0.2}, iconsize = folder_iconsize}) return t end diff --git a/frames/window_welcome.lua b/frames/window_welcome.lua index 12ae2d1c..a87653f9 100644 --- a/frames/window_welcome.lua +++ b/frames/window_welcome.lua @@ -406,8 +406,8 @@ local window_openned_at = time() window.LatinAlphabetCheckBox.OnSwitch = onSelectAlphabet window.LatinAlphabetLabel:SetPoint("left", window.LatinAlphabetCheckBox, "right", 2, 0) - tinsert(allAlphabetCheckBoxes, window.LatinAlphabetCheckBox) - tinsert(allAlphabetLabels, window.LatinAlphabetLabel) + table.insert(allAlphabetCheckBoxes, window.LatinAlphabetCheckBox) + table.insert(allAlphabetLabels, window.LatinAlphabetLabel) --Russian g:NewLabel(window, _, "$parentCyrillicAlphabetLabel", "CyrillicAlphabetLabel", Loc["STRING_WELCOME_75"], "GameFontHighlightLeft") @@ -417,8 +417,8 @@ local window_openned_at = time() window.CyrillicAlphabetCheckBox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")) window.CyrillicAlphabetCheckBox.OnSwitch = onSelectAlphabet window.CyrillicAlphabetLabel:SetPoint("left", window.CyrillicAlphabetCheckBox, "right", 2, 0) - tinsert(allAlphabetCheckBoxes, window.CyrillicAlphabetCheckBox) - tinsert(allAlphabetLabels, window.CyrillicAlphabetLabel) + table.insert(allAlphabetCheckBoxes, window.CyrillicAlphabetCheckBox) + table.insert(allAlphabetLabels, window.CyrillicAlphabetLabel) --Chinese g:NewLabel(window, _, "$parentChinaAlphabetLabel", "ChinaAlphabetLabel", Loc["STRING_WELCOME_76"], "GameFontHighlightLeft") @@ -428,8 +428,8 @@ local window_openned_at = time() window.ChinaCheckBox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")) window.ChinaCheckBox.OnSwitch = onSelectAlphabet window.ChinaAlphabetLabel:SetPoint("left", window.ChinaCheckBox, "right", 2, 0) - tinsert(allAlphabetCheckBoxes, window.ChinaCheckBox) - tinsert(allAlphabetLabels, window.ChinaAlphabetLabel) + table.insert(allAlphabetCheckBoxes, window.ChinaCheckBox) + table.insert(allAlphabetLabels, window.ChinaAlphabetLabel) --Korea g:NewLabel(window, _, "$parentKoreanAlphabetLabel", "KoreanAlphabetLabel", Loc["STRING_WELCOME_77"], "GameFontHighlightLeft") @@ -439,8 +439,8 @@ local window_openned_at = time() window.KoreanCheckBox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")) window.KoreanCheckBox.OnSwitch = onSelectAlphabet window.KoreanAlphabetLabel:SetPoint("left", window.KoreanCheckBox, "right", 2, 0) - tinsert(allAlphabetCheckBoxes, window.KoreanCheckBox) - tinsert(allAlphabetLabels, window.KoreanAlphabetLabel) + table.insert(allAlphabetCheckBoxes, window.KoreanCheckBox) + table.insert(allAlphabetLabels, window.KoreanAlphabetLabel) --Taiwan g:NewLabel(window, _, "$parentTaiwanAlphabetLabel", "TaiwanAlphabetLabel", Loc["STRING_WELCOME_78"], "GameFontHighlightLeft") @@ -450,8 +450,8 @@ local window_openned_at = time() window.TaiwanCheckBox:SetTemplate(g:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")) window.TaiwanCheckBox.OnSwitch = onSelectAlphabet window.TaiwanAlphabetLabel:SetPoint("left", window.TaiwanCheckBox, "right", 2, 0) - tinsert(allAlphabetCheckBoxes, window.TaiwanCheckBox) - tinsert(allAlphabetLabels, window.TaiwanAlphabetLabel) + table.insert(allAlphabetCheckBoxes, window.TaiwanCheckBox) + table.insert(allAlphabetLabels, window.TaiwanAlphabetLabel) window.LatinAlphabetCheckBox:SetPoint("topleft", texto_alphabet, "bottomleft", 0, -10) window.CyrillicAlphabetCheckBox:SetPoint("topleft", window.LatinAlphabetCheckBox, "bottomleft", 0, -2) @@ -653,10 +653,10 @@ local window_openned_at = time() pages [#pages+1] = {skins_frame_alert, bg55, texto55, texto_alphabet, texto555, skins_image, changemind, texto_appearance, font_label, font_dropdown, skin_dropdown, skin_label, create_window_button, window_color, window.BarHeightLabel, window.BarHeightSlider, window.TextSizeLabel, window.TextSizeSlider, window.ShowPercentLabel, window.ShowPercentCheckBox} for i, widget in ipairs(allAlphabetCheckBoxes) do - tinsert(pages [#pages], widget) + table.insert(pages [#pages], widget) end for i, widget in ipairs(allAlphabetLabels) do - tinsert(pages [#pages], widget) + table.insert(pages [#pages], widget) end for _, widget in ipairs(pages[#pages]) do diff --git a/functions/api2.lua b/functions/api2.lua index fb1ef278..cb5608d9 100644 --- a/functions/api2.lua +++ b/functions/api2.lua @@ -98,7 +98,7 @@ Details.API_Description = { --[=[ Details.SegmentInfo (segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "SegmentInfo", desc = "Return a table containing information about the segment.", parameters = { @@ -139,7 +139,7 @@ end --[=[ Details.SegmentElapsedTime (segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "SegmentElapsedTime", desc = "Return the total elapsed time of a segment.", parameters = { @@ -174,7 +174,7 @@ end --[=[ Details.SegmentDamagingUnits (segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "SegmentDamagingUnits", desc = "Return a numeric (ipairs) table with name of units that inflicted damage on the segment.", parameters = { @@ -253,7 +253,7 @@ end --[=[ Details.SegmentHealingUnits (segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "SegmentHealingUnits", desc = "Return a numeric (ipairs) table with name of units that inflicted healing on the segment.", parameters = { @@ -332,7 +332,7 @@ end Details.SegmentTotalDamage (segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "SegmentTotalDamage", desc = "Query the total damage done in the segment and only by players in the group.", parameters = { @@ -369,7 +369,7 @@ end Details.SegmentTotalHealing (segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "SegmentTotalHealing", desc = "Query the total healing done in the segment and only by players in the group.", parameters = { @@ -405,7 +405,7 @@ end Details.SegmentPhases (segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "SegmentPhases", desc = "Return a numeric (ipairs) table with phase numbers available on the segment.", parameters = { @@ -452,7 +452,7 @@ end Details.UnitInfo (unitId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitInfo", desc = "Query basic information about the unit, like class and spec.", parameters = { @@ -537,7 +537,7 @@ end Details.UnitTexture (unitId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitTexture", desc = "Query the icon and texcoords for the class and spec icon.", parameters = { @@ -616,7 +616,7 @@ end --[=[ Details.UnitDamage (unitId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitDamage", desc = "Query the damage of a unit.", parameters = { @@ -665,7 +665,7 @@ end --[=[ Details.UnitDamageByPhase (unitId, phaseNumber, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitDamageByPhase", desc = "Query the damage of a unit but only for a specific phase of a boss encounter.", parameters = { @@ -724,7 +724,7 @@ end --[=[ Details.UnitDamageInfo (unitId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitDamageInfo", desc = "Return a table with damage information.", parameters = { @@ -791,7 +791,7 @@ end --[=[ Details.UnitDamageBySpell (unitId, spellId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitDamageBySpell", desc = "Query the total damage done of a spell casted by the unit.", parameters = { @@ -861,7 +861,7 @@ end --[=[ Details.UnitDamageSpellInfo (unitId, spellId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitDamageSpellInfo", desc = "Return a table with the spell damage information.", parameters = { @@ -964,7 +964,7 @@ end --[=[ Details.UnitDamageSpellOnUnit (unitId, spellId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitDamageSpellOnUnit", desc = "Query the damage done of a spell into a specific target.", parameters = { @@ -1039,7 +1039,7 @@ end --[=[ Details.UnitDamageTaken (unitId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitDamageTaken", desc = "Query the unit damage taken.", parameters = { @@ -1087,7 +1087,7 @@ end --[=[ Details.UnitDamageOnUnit (unitId, targetUnitId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitDamageOnUnit", desc = "Query the unit damage done on another unit.", parameters = { @@ -1142,7 +1142,7 @@ end --[=[ Details.UnitDamageTakenFromSpell (unitId, spellId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitDamageTakenFromSpell", desc = "Query the unit damage taken from a spell.", parameters = { @@ -1218,7 +1218,7 @@ end --[=[ Details.UnitDamagingSpells (unitId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitDamagingSpells", desc = "Return a numeric (ipairs) table with spells IDs used by the unit to apply damage.", parameters = { @@ -1272,7 +1272,7 @@ end --[=[ Details.UnitDamagingTargets (unitId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitDamagingTargets", desc = "Return a numeric (ipairs) table with names of targets the unit inflicted damage. You may query the amount of damage with Details.UnitDamageOnUnit( unitId, targetName ).", parameters = { @@ -1326,7 +1326,7 @@ end --[=[ Details.UnitDamagingPets (unitId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitDamagingPets", desc = "Return a numeric (ipairs) table with all pet names the unit used to apply damage. Individual pet information can be queried with Details.UnitDamage( petName ).", parameters = { @@ -1384,7 +1384,7 @@ end --[=[ Details.UnitHealing (unitId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitHealing", desc = "Query the healing done of a unit.", parameters = { @@ -1433,7 +1433,7 @@ end --[=[ Details.UnitHealingInfo (unitId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitHealingInfo", desc = "Return a table with healing information.", parameters = { @@ -1505,7 +1505,7 @@ end --[=[ Details.UnitHealingBySpell (unitId, spellId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitHealingBySpell", desc = "Query the total healing done of a spell casted by the unit.", parameters = { @@ -1577,7 +1577,7 @@ end --[=[ Details.UnitHealingSpellInfo (unitId, spellId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitHealingSpellInfo", desc = "Return a table with the spell healing information.", parameters = { @@ -1681,7 +1681,7 @@ end --[=[ Details.UnitHealingSpellOnUnit (unitId, spellId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitHealingSpellOnUnit", desc = "Query the healing done of a spell into a specific target.", parameters = { @@ -1758,7 +1758,7 @@ end --[=[ Details.UnitHealingTaken (unitId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitHealingTaken", desc = "Query the unit healing taken.", parameters = { @@ -1808,7 +1808,7 @@ end --[=[ Details.UnitHealingOnUnit (unitId, targetUnitId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitHealingOnUnit", desc = "Query the unit healing done on another unit.", parameters = { @@ -1866,7 +1866,7 @@ end --[=[ Details.UnitHealingTakenFromSpell (unitId, spellId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitHealingTakenFromSpell", desc = "Query the unit healing taken from a spell.", parameters = { @@ -1943,7 +1943,7 @@ end --[=[ Details.UnitHealingSpells (unitId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitHealingSpells", desc = "Return a numeric (ipairs) table with spells IDs used by the unit to apply healing.", parameters = { @@ -1998,7 +1998,7 @@ end --[=[ Details.UnitHealingTargets (unitId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitHealingTargets", desc = "Return a numeric (ipairs) table with names of targets the unit applied heal. You may query the amount of damage with Details.UnitHealingOnUnit( unitId, targetName ).", parameters = { @@ -2053,7 +2053,7 @@ end --[=[ Details.UnitHealingPets (unitId, segment) --=]=] -tinsert(Details.API_Description.namespaces[1].api, { +table.insert(Details.API_Description.namespaces[1].api, { name = "UnitHealingPets", desc = "Return a numeric (ipairs) table with all pet names the unit used to apply healing. Individual pet information can be queried with Details.UnitHealing( petName ).", parameters = { diff --git a/functions/bossmods.lua b/functions/bossmods.lua index 681f7a57..19eaa355 100644 --- a/functions/bossmods.lua +++ b/functions/bossmods.lua @@ -49,7 +49,7 @@ function Details:BossModsLink() local currentCombat = Details:GetCurrentCombat() local combatTime = currentCombat:GetCombatTime() if (combatTime > 5) then - tinsert(currentCombat.PhaseData, {phase, combatTime}) + table.insert(currentCombat.PhaseData, {phase, combatTime}) end Details:SendEvent("COMBAT_ENCOUNTER_PHASE_CHANGED", nil, phase) end @@ -79,7 +79,7 @@ function Details:BossModsLink() local currentCombat = Details:GetCurrentCombat() local combatTime = currentCombat:GetCombatTime() if (combatTime > 5) then - tinsert(currentCombat.PhaseData, {phase, combatTime}) + table.insert(currentCombat.PhaseData, {phase, combatTime}) end Details:SendEvent("COMBAT_ENCOUNTER_PHASE_CHANGED", nil, phase) diff --git a/functions/coach.lua b/functions/coach.lua index 89bd0fff..62e9ce97 100644 --- a/functions/coach.lua +++ b/functions/coach.lua @@ -435,7 +435,7 @@ function Details.Coach.Server.AddPlayerDeath(playerName, data) local utilityActorObject = utilityContainer:GetOrCreateActor(playerGUID, playerName, playerFlag, true) if (utilityActorObject) then - tinsert(currentCombat.last_events_tables, deathLog) + table.insert(currentCombat.last_events_tables, deathLog) --tag the misc container as need refresh currentCombat[DETAILS_ATTRIBUTE_MISC].need_refresh = true end diff --git a/functions/deathrecap.lua b/functions/deathrecap.lua index b02b6476..90213ea7 100644 --- a/functions/deathrecap.lua +++ b/functions/deathrecap.lua @@ -201,7 +201,7 @@ function Details.BuildDeathTableFromRecap (recapID) not spellId and {spellId, spellName, texture}, } - tinsert(ArtificialDeathLog[1], ev) + table.insert(ArtificialDeathLog[1], ev) ArtificialDeathLog.n = ArtificialDeathLog.n + 1 end @@ -284,7 +284,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat) segmentButton:SetScript("OnClick", function() OpenDetailsDeathRecapAtSegment (i) end) - tinsert(Details.DeathRecap.Segments, i, segmentButton) + table.insert(Details.DeathRecap.Segments, i, segmentButton) end end @@ -393,7 +393,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat) local BiggestDamageHits = {} for i = #events, 1, -1 do - tinsert(BiggestDamageHits, events [i]) + table.insert(BiggestDamageHits, events [i]) end table.sort (BiggestDamageHits, function(t1, t2) return t1[3] > t2[3] @@ -423,7 +423,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat) end end if (not haveHitKill) then - tinsert(BiggestDamageHits, 1, hitKill) + table.insert(BiggestDamageHits, 1, hitKill) end end @@ -441,7 +441,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat) end end if (not alreadyHave) then - tinsert(BiggestDamageHits, event) + table.insert(BiggestDamageHits, event) if (#BiggestDamageHits == 10) then break end diff --git a/functions/dungeon.lua b/functions/dungeon.lua index 97206305..c7504a86 100644 --- a/functions/dungeon.lua +++ b/functions/dungeon.lua @@ -107,7 +107,7 @@ local addPlayerDamage = function(unitName, unitRealm) local eDps = damageDone / currentCombat:GetCombatTime() --add the damage to the chart table - tinsert(playerData.ChartData, eDps) + table.insert(playerData.ChartData, eDps) --mythicDungeonCharts:Debug("Added dps for " , CLName, ":", eDps) if (eDps > playerData.ChartData.max_value) then @@ -119,7 +119,7 @@ local addPlayerDamage = function(unitName, unitRealm) playerData.LastDamage = damageDone --add the damage to the chart table - tinsert(playerData.ChartData, damageDiff) + table.insert(playerData.ChartData, damageDiff) --mythicDungeonCharts:Debug("Added damage for " , CLName, ":", damageDiff) if (damageDiff > playerData.ChartData.max_value) then @@ -128,7 +128,7 @@ local addPlayerDamage = function(unitName, unitRealm) end else --player still didn't made anything on this combat, so just add zero - tinsert(playerData.ChartData, 0) + table.insert(playerData.ChartData, 0) end end end @@ -170,7 +170,7 @@ function mythicDungeonCharts:OnBossDefeated() if (mythicDungeonCharts.ChartTable and mythicDungeonCharts.ChartTable.Running and bossInfo) then local copiedBossInfo = Details:GetFramework().table.copy({}, bossInfo) - tinsert(mythicDungeonCharts.ChartTable.BossDefeated, {time() - mythicDungeonCharts.ChartTable.StartTime, copiedBossInfo, currentCombat:GetCombatTime()}) + table.insert(mythicDungeonCharts.ChartTable.BossDefeated, {time() - mythicDungeonCharts.ChartTable.StartTime, copiedBossInfo, currentCombat:GetCombatTime()}) mythicDungeonCharts:Debug("Boss defeated, time saved", currentCombat:GetCombatTime()) else if (mythicDungeonCharts.ChartTable and mythicDungeonCharts.ChartTable.EndTime ~= -1) then @@ -180,7 +180,7 @@ function mythicDungeonCharts:OnBossDefeated() if (bossInfo) then local copiedBossInfo = Details:GetFramework().table.copy({}, bossInfo) - tinsert(mythicDungeonCharts.ChartTable.BossDefeated, {time() - mythicDungeonCharts.ChartTable.StartTime, copiedBossInfo, currentCombat:GetCombatTime()}) + table.insert(mythicDungeonCharts.ChartTable.BossDefeated, {time() - mythicDungeonCharts.ChartTable.StartTime, copiedBossInfo, currentCombat:GetCombatTime()}) mythicDungeonCharts:Debug("Boss defeated, time saved, but used time aproximation:", mythicDungeonCharts.ChartTable.EndTime + 2, now, currentCombat:GetCombatTime()) end end @@ -382,7 +382,7 @@ function mythicDungeonCharts.ShowChart() --titleLabelMinimized:SetPoint("top", titlebarMinimized , "top", 0, -5) dungeonChartFrame.TitleTextMinimized = titleLabelMinimized - tinsert(UISpecialFrames, "DetailsMythicDungeonChartFrame") + table.insert(UISpecialFrames, "DetailsMythicDungeonChartFrame") --register to libwindow local LibWindow = LibStub("LibWindow-1.1") @@ -651,7 +651,7 @@ function mythicDungeonCharts.ShowChart() chartData.max_value = maxValue mythicDungeonCharts.Frame.ChartFrame:AddLine(chartData, lineColor, lineName, combatTime, texture, "SMA") - tinsert(mythicDungeonCharts.PlayerGraphIndex, playerName) + table.insert(mythicDungeonCharts.PlayerGraphIndex, playerName) end mythicDungeonCharts.Frame.ChartFrame:RefreshBossTimeline(mythicDungeonCharts.ChartTable.BossDefeated, mythicDungeonCharts.ChartTable.ElapsedTime) @@ -661,8 +661,8 @@ function mythicDungeonCharts.ShowChart() for i, bossTable in ipairs(mythicDungeonCharts.ChartTable.BossDefeated) do local combatTime = bossTable [3] or math.random(10, 30) - tinsert(bossTimeTable, bossTable[1]) - tinsert(bossTimeTable, bossTable[1] - combatTime) + table.insert(bossTimeTable, bossTable[1]) + table.insert(bossTimeTable, bossTable[1] - combatTime) end mythicDungeonCharts.Frame.ChartFrame:AddOverlay(bossTimeTable, {1, 1, 1, 0.05}, "Show Boss", "") @@ -757,7 +757,7 @@ function mythicDungeonCharts:CustomDrawLine (C, sx, sy, ex, ey, w, color, layer, T:SetTexture(TextureDirectory.."line") end - tinsert(C.GraphLib_Lines_Used, T) + table.insert(C.GraphLib_Lines_Used, T) T:SetDrawLayer(layer or "ARTWORK") @@ -832,7 +832,7 @@ function mythicDungeonCharts:CustomDrawLine (C, sx, sy, ex, ey, w, color, layer, pixelFrame:SetPoint("BOTTOMLEFT", C, relPoint, cx - Bwid, cy - Bhgt) pixelFrame:SetPoint("TOPRIGHT", C, relPoint, cx + Bwid, cy + Bhgt) - tinsert(mythicDungeonCharts.Frame.ChartFrame.FrameInUse, pixelFrame) + table.insert(mythicDungeonCharts.Frame.ChartFrame.FrameInUse, pixelFrame) pixelFrame.PlayerName = playerName pixelFrame.Height = ey diff --git a/functions/mythicdungeon.lua b/functions/mythicdungeon.lua index 4b7e5f68..efefc08b 100644 --- a/functions/mythicdungeon.lua +++ b/functions/mythicdungeon.lua @@ -29,7 +29,7 @@ end function Details222.MythicPlus.LogStep(log) local today = date("%d/%m/%y %H:%M:%S") - tinsert(Details.mythic_plus_log, 1, today .. "|" .. log) + table.insert(Details.mythic_plus_log, 1, today .. "|" .. log) tremove(Details.mythic_plus_log, 50) end @@ -439,7 +439,7 @@ function DetailsMythicPlusFrame.BossDefeated(this_is_end_end, encounterID, encou local mythicDungeonInfo = pastCombat:GetMythicDungeonInfo() -- .is_mythic_dungeon only boss, trash overall and run overall have it if (not mythicDungeonInfo or not mythicDungeonInfo.TrashOverallSegment) then --trash segment found, schedule to merge - tinsert(segmentsToMerge, pastCombat) + table.insert(segmentsToMerge, pastCombat) end end end @@ -545,7 +545,7 @@ function DetailsMythicPlusFrame.MythicDungeonFinished (fromZoneLeft) end --merge this segment - tinsert(segmentsToMerge, pastCombat) + table.insert(segmentsToMerge, pastCombat) if (DetailsMythicPlusFrame.DevelopmentDebug) then print("MythicDungeonFinished() > found after last boss combat") diff --git a/functions/pack.lua b/functions/pack.lua index 21fbfb07..499f8762 100644 --- a/functions/pack.lua +++ b/functions/pack.lua @@ -13,7 +13,7 @@ local strsplit = _G.strsplit local floor = _G.floor local tremove = _G.tremove local UnitName = _G.UnitName -local tinsert = _G.tinsert +local tinsert = tinsert local IsInRaid = _G.IsInRaid local GetNumGroupMembers = _G.GetNumGroupMembers local GetRaidRosterInfo = _G.GetRaidRosterInfo diff --git a/functions/plater.lua b/functions/plater.lua index 5ed5a9a5..9f4351de 100644 --- a/functions/plater.lua +++ b/functions/plater.lua @@ -39,8 +39,8 @@ plater_integration_frame.OnTickFrameFunc = function(self, deltaTime) damageTable.CurrentDamageFromPlayer = damageTable.CurrentDamageFromPlayer + damageOnThisUpdateFromPlayer --add to the buffer the damage added - tinsert(damageTable.RealTimeBuffer, 1, damageOnThisUpdate) - tinsert(damageTable.RealTimeBufferFromPlayer, 1, damageOnThisUpdateFromPlayer) + table.insert(damageTable.RealTimeBuffer, 1, damageOnThisUpdate) + table.insert(damageTable.RealTimeBufferFromPlayer, 1, damageOnThisUpdateFromPlayer) --remove the damage from the buffer local damageRemoved = tremove(damageTable.RealTimeBuffer, CONST_BUFFER_SIZE + 1) diff --git a/functions/raidinfo.lua b/functions/raidinfo.lua index fd6c0c04..519f245c 100644 --- a/functions/raidinfo.lua +++ b/functions/raidinfo.lua @@ -3,7 +3,7 @@ local C_Timer = _G.C_Timer local DetailsFramework = _G.DetailsFramework -local tinsert = _G.tinsert +local tinsert = tinsert local addonName, Details222 = ... function Details.InstallRaidInfo() diff --git a/functions/rowanimation.lua b/functions/rowanimation.lua index ab3d94fb..0ecdab59 100644 --- a/functions/rowanimation.lua +++ b/functions/rowanimation.lua @@ -30,7 +30,7 @@ desc = "" end - tinsert(_detalhes.row_animation_pool, {name = name, desc = desc, func = func, options = options}) + table.insert(_detalhes.row_animation_pool, {name = name, desc = desc, func = func, options = options}) return true end @@ -48,7 +48,7 @@ function _detalhes:GetRowAnimationList() local t = {} for key, value in ipairs(_detalhes.row_animation_pool) do - tinsert(t, value.name) + table.insert(t, value.name) end return t end diff --git a/functions/savedata.lua b/functions/savedata.lua index 17eef61d..e1971a51 100644 --- a/functions/savedata.lua +++ b/functions/savedata.lua @@ -11,7 +11,7 @@ function Details:WipeConfig() wipeButton:SetScript("OnClick", function() Details.wipe_full_config = true; ReloadUI(); end) wipeButton:SetPoint("center", UIParent, "center", 0, 0) - tinsert(UISpecialFrames, "DetailsResetConfigButton") + table.insert(UISpecialFrames, "DetailsResetConfigButton") DetailsFramework:ApplyStandardBackdrop(wipeButton) diff --git a/functions/slash.lua b/functions/slash.lua index 437af476..ec0aa397 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -697,7 +697,7 @@ function SlashCmdList.DETAILS (msg, editbox) Details.id_frame:SetPoint("center", UIParent, "center") Details.id_frame:SetBackdrop(backdrop) - tinsert(UISpecialFrames, "DetailsID") + table.insert(UISpecialFrames, "DetailsID") Details.id_frame.texto = CreateFrame("editbox", nil, Details.id_frame, "BackdropTemplate") Details.id_frame.texto:SetPoint("topleft", Details.id_frame, "topleft") @@ -753,7 +753,7 @@ function SlashCmdList.DETAILS (msg, editbox) Details.id_frame:SetPoint("center", UIParent, "center") Details.id_frame:SetBackdrop(backdrop) - tinsert(UISpecialFrames, "DetailsID") + table.insert(UISpecialFrames, "DetailsID") Details.id_frame.texto = CreateFrame("editbox", nil, Details.id_frame, "BackdropTemplate") Details.id_frame.texto:SetPoint("topleft", Details.id_frame, "topleft") @@ -1077,7 +1077,7 @@ function SlashCmdList.DETAILS (msg, editbox) for o = 1, DetailsFramework.EncounterJournal.EJ_GetNumLoot() do local name, icon, slot, armorType, itemID, link, encounterID = DetailsFramework.EncounterJournal.EJ_GetLootInfoByIndex (o) r[slot] = r[slot] or {} - tinsert(r[slot], {itemID, encounterID}) + table.insert(r[slot], {itemID, encounterID}) total = total + 1 end end @@ -1183,7 +1183,7 @@ function SlashCmdList.DETAILS (msg, editbox) local allspecs = {} for a, b in pairs(Details.class_specs_coords) do - tinsert(allspecs, a) + table.insert(allspecs, a) end for i = 1, 10 do @@ -1284,7 +1284,7 @@ function SlashCmdList.DETAILS (msg, editbox) for o = 1, 3 do local talentID, name, texture, selected, available = GetTalentInfo (i, o, 1) if (selected) then - tinsert(talents, talentID) + table.insert(talents, talentID) break end end @@ -1401,18 +1401,18 @@ function SlashCmdList.DETAILS (msg, editbox) local sectionInfo = C_EncounterJournal.GetSectionInfo (ID) if (sectionInfo) then - tinsert(result, sectionInfo) + table.insert(result, sectionInfo) if (sectionInfo.spellID and type(sectionInfo.spellID) == "number" and sectionInfo.spellID ~= 0) then - tinsert(spellIDs, sectionInfo.spellID) + table.insert(spellIDs, sectionInfo.spellID) end local nextChild, nextSibling = sectionInfo.firstChildSectionID, sectionInfo.siblingSectionID if (nextSibling) then - tinsert(nextID, nextSibling) + table.insert(nextID, nextSibling) end if (nextChild) then - tinsert(nextID, nextChild) + table.insert(nextID, nextChild) end else break @@ -1677,7 +1677,7 @@ function Details.RefreshUserList (ignoreIfHidden) end if (not foundPlayer) then - tinsert(newList, {playerName, "--", "--"}) + table.insert(newList, {playerName, "--", "--"}) end end end @@ -1831,7 +1831,7 @@ function Details:CreateListPanel() Details.ListPanel:SetPoint("center", UIParent, "center", 300, 0) Details.ListPanel.barras = {} - tinsert(UISpecialFrames, "DetailsActorsFrame") + table.insert(UISpecialFrames, "DetailsActorsFrame") Details.ListPanel.close_with_right = true local container_barras_window = CreateFrame("ScrollFrame", "Details_ActorsBarrasScroll", Details.ListPanel.widget) @@ -2345,7 +2345,7 @@ if (WOW_PROJECT_ID == WOW_PROJECT_MAINLINE) then table.sort(playersInTheParty, function(t1, t2) return t1[11] > t2[11] end) for i = 1, #playersInTheParty do local keystoneTable = playersInTheParty[i] - tinsert(newData, 1, keystoneTable) + table.insert(newData, 1, keystoneTable) end end end diff --git a/functions/spellcache.lua b/functions/spellcache.lua index 53b03073..f7120bee 100644 --- a/functions/spellcache.lua +++ b/functions/spellcache.lua @@ -9,7 +9,7 @@ do local setmetatable = setmetatable local GetSpellInfo = GetSpellInfo local unpack = unpack - local tinsert = tinsert + local tinsert = table.insert local tremove = tremove local C_Timer = C_Timer