Merge branch 'Tercioo:master' into master

This commit is contained in:
Flamanis
2023-10-12 17:21:28 -05:00
committed by GitHub
61 changed files with 4456 additions and 3181 deletions
+23 -23
View File
@@ -40,7 +40,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()
@@ -246,7 +246,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
@@ -434,7 +434,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
@@ -496,7 +496,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
@@ -514,7 +514,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
@@ -524,14 +524,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
@@ -546,7 +546,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
@@ -557,7 +557,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
@@ -568,7 +568,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
@@ -632,7 +632,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
@@ -647,7 +647,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
@@ -658,7 +658,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
@@ -669,7 +669,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
@@ -726,7 +726,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
@@ -817,7 +817,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),
@@ -866,7 +866,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]
@@ -876,19 +876,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
@@ -900,7 +900,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))