Unwanted mass rename of tinsert to table.insert
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user