Fixed more bugs on the new Breakdown Window
This commit is contained in:
+3
-3
@@ -15,11 +15,11 @@ local getCombatObject = function(segmentNumber)
|
||||
|
||||
--select which segment to use, use low level variables for performance
|
||||
if (segmentNumber == -1) then
|
||||
combatObject = _detalhes.tabela_overall
|
||||
combatObject = Details.tabela_overall
|
||||
elseif (segmentNumber == 0) then
|
||||
combatObject = _detalhes.tabela_vigente
|
||||
combatObject = Details.tabela_vigente
|
||||
else
|
||||
combatObject = _detalhes.tabela_historico.tabelas [segmentNumber]
|
||||
combatObject = Details.tabela_historico.tabelas [segmentNumber]
|
||||
end
|
||||
|
||||
return combatObject
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--[[ Attributes: Damage, Heal, Energy, Miscellaneous ]]
|
||||
|
||||
do
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local addonName, Details222 = ...
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
|
||||
do
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local addonName, Details222 = ...
|
||||
_detalhes.EncounterInformation = {}
|
||||
local ipairs = ipairs --lua local
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--[[ Declare all Details classes and container indexes ]]
|
||||
|
||||
do
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local addonName, Details222 = ...
|
||||
local setmetatable = setmetatable
|
||||
-------- container que armazena o cache de pets
|
||||
|
||||
+20
-20
@@ -34,21 +34,21 @@ Details.Coach = {
|
||||
|
||||
function Details.Coach.AskRLForCoachStatus()
|
||||
Details:SendRaidData(DETAILS_PREFIX_COACH, "CIEA")
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] asked the coach the coach status.")
|
||||
end
|
||||
end
|
||||
|
||||
function Details.Coach.SendRLCombatStartNotify(coachName)
|
||||
Details:SendCommMessage(_G.DETAILS_PREFIX_NETWORK, Details:Serialize(_G.DETAILS_PREFIX_COACH, UnitName("player"), GetRealmName(), Details.realversion, "CCS"), "WHISPER", coachName)
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] sent to coach a combat start notification.")
|
||||
end
|
||||
end
|
||||
|
||||
function Details.Coach.SendRLCombatEndNotify(coachName)
|
||||
Details:SendCommMessage(_G.DETAILS_PREFIX_NETWORK, Details:Serialize(_G.DETAILS_PREFIX_COACH, UnitName("player"), GetRealmName(), Details.realversion, "CCE"), "WHISPER", coachName)
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] sent to coach a combat end notification.")
|
||||
end
|
||||
end
|
||||
@@ -56,7 +56,7 @@ end
|
||||
--the coach is no more a coach
|
||||
function Details.Coach.SendRaidCoachEndNotify()
|
||||
Details:SendRaidData(DETAILS_PREFIX_COACH, "CE")
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] sent to raid a coach end notification.")
|
||||
end
|
||||
end
|
||||
@@ -64,7 +64,7 @@ end
|
||||
--there's a new coach, notify players
|
||||
function Details.Coach.SendRaidCoachStartNotify()
|
||||
Details:SendRaidData(DETAILS_PREFIX_COACH, "CS")
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] sent to raid a coach start notification.")
|
||||
end
|
||||
end
|
||||
@@ -72,14 +72,14 @@ end
|
||||
--player send his death to the coach
|
||||
function Details.Coach.SendDeathToRL(deathTable)
|
||||
Details:SendRaidData(DETAILS_PREFIX_COACH, "CDD", deathTable)
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] your death has been sent to coach.")
|
||||
end
|
||||
end
|
||||
|
||||
--send data to coach
|
||||
function Details.Coach.Client.SendDataToRL()
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
print("Details Coach sending data to RL.")
|
||||
end
|
||||
|
||||
@@ -110,7 +110,7 @@ function Details.Coach.StartUp()
|
||||
if (IsInRaid()) then
|
||||
if (isInRaidZone()) then
|
||||
--client ask in the raid if Coach is enabled
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] sent ask to coach, is coach?")
|
||||
end
|
||||
Details.Coach.AskRLForCoachStatus()
|
||||
@@ -126,7 +126,7 @@ function Details.Coach.StartUp()
|
||||
if (IsInRaid()) then
|
||||
if (isInRaidZone()) then
|
||||
Details.Coach.AskRLForCoachStatus()
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] sent to raid, is there a coach?")
|
||||
end
|
||||
end
|
||||
@@ -157,7 +157,7 @@ function Details.Coach.StartUp()
|
||||
if (UnitIsGroupAssistant("player")) then
|
||||
local coachName = Details.coach.last_coach_name
|
||||
if (coachName) then
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] i'm a raid assistant, sent combat start notification to coach.")
|
||||
end
|
||||
Details.Coach.SendRLCombatStartNotify(coachName)
|
||||
@@ -180,7 +180,7 @@ function Details.Coach.StartUp()
|
||||
if (UnitIsGroupAssistant("player")) then
|
||||
local raidLeaderName = Details.Coach.Client.GetLeaderName()
|
||||
if (raidLeaderName) then
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] i'm a raid assistant, sent combat end notification to coach.")
|
||||
end
|
||||
Details.Coach.SendRLCombatEndNotify(raidLeaderName)
|
||||
@@ -198,7 +198,7 @@ function Details.Coach.StartUp()
|
||||
if (isInRaidZone()) then
|
||||
--the coach entered a raid instance
|
||||
Details.Coach.Disable()
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] Coach feature stopped: you entered in a raid instance.")
|
||||
end
|
||||
end
|
||||
@@ -209,7 +209,7 @@ function Details.Coach.StartUp()
|
||||
if (not Details.Coach.isInRaidZone and isInRaidZone()) then
|
||||
if (IsInRaid()) then
|
||||
if (not Details.Coach.Client.IsEnabled()) then
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] sent in the raid, there's a coach?")
|
||||
end
|
||||
Details.Coach.AskRLForCoachStatus()
|
||||
@@ -244,7 +244,7 @@ end)
|
||||
--received an answer from server telling if the raidleader has the coach feature enabled
|
||||
--the request is made when the player enters a new group or reconnects
|
||||
function Details.Coach.Client.CoachIsEnabled_Response(isCoachEnabled, coachName)
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] Coach sent response about the status of Coach Mode:", isCoachEnabled, raidLeaderName)
|
||||
end
|
||||
|
||||
@@ -281,7 +281,7 @@ end
|
||||
--the player used '/details coach' or it's Details! initialization
|
||||
function Details.Coach.Server.EnableCoach(fromStartup)
|
||||
if (not IsInRaid()) then
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] cannot enabled coach: not in raid.")
|
||||
end
|
||||
Details.coach.enabled = false
|
||||
@@ -290,7 +290,7 @@ function Details.Coach.Server.EnableCoach(fromStartup)
|
||||
return
|
||||
|
||||
elseif (isInRaidZone()) then
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] cannot enabled coach: you are inside a raid zone.")
|
||||
end
|
||||
Details.coach.enabled = false
|
||||
@@ -310,7 +310,7 @@ function Details.Coach.Server.EnableCoach(fromStartup)
|
||||
Details.Coach.EventFrame:RegisterEvent("GROUP_ROSTER_UPDATE")
|
||||
|
||||
if (fromStartup) then
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] coach feature enabled, welcome back captain!")
|
||||
end
|
||||
end
|
||||
@@ -327,7 +327,7 @@ end
|
||||
--a player in the raid asked to be the coach of the group
|
||||
function Details.Coach.Client.EnableCoach(coachName)
|
||||
if (not IsInRaid()) then
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
print("Details Coach can't enable coach on client: isn't in raid")
|
||||
end
|
||||
return
|
||||
@@ -340,7 +340,7 @@ function Details.Coach.Client.EnableCoach(coachName)
|
||||
--enable group roster to know if the coach has changed
|
||||
Details.Coach.EventFrame:RegisterEvent("GROUP_ROSTER_UPDATE")
|
||||
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] there's a new coach: ", coachName)
|
||||
end
|
||||
|
||||
@@ -401,7 +401,7 @@ Details.Coach.EventFrame:SetScript("OnEvent", function(event, ...)
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
local inRaid = UnitInRaid(Details.Coach.Client.coachName)
|
||||
if (not inRaid) then
|
||||
if (_detalhes.debug) then
|
||||
if (Details.debug) then
|
||||
Details:Msg("[|cFFAAFFAADetails! Coach|r] coach isn't in the raid, coach feature has been disabled.")
|
||||
end
|
||||
Details.Coach.Client.CoachEnd()
|
||||
|
||||
+13
-13
@@ -1,6 +1,6 @@
|
||||
|
||||
--local pointer to details object
|
||||
local Details = _G._detalhes
|
||||
local Details = _G.Details
|
||||
local debugmode = false --print debug lines
|
||||
local verbosemode = false --auto open the chart panel
|
||||
local _
|
||||
@@ -220,7 +220,7 @@ function mythicDungeonCharts:OnStartMythicDungeon()
|
||||
|
||||
--save the chart for development
|
||||
if (debugmode) then
|
||||
_detalhes.mythic_plus.last_mythicrun_chart = mythicDungeonCharts.ChartTable
|
||||
Details.mythic_plus.last_mythicrun_chart = mythicDungeonCharts.ChartTable
|
||||
end
|
||||
|
||||
if (verbosemode) then
|
||||
@@ -251,8 +251,8 @@ function mythicDungeonCharts:OnEndMythicDungeon()
|
||||
mythicDungeonCharts:Debug("Dungeon ended successfully, chart data capture stopped, scheduling to open the window.")
|
||||
|
||||
--the run is valid, schedule to open the chart window
|
||||
_detalhes.mythic_plus.delay_to_show_graphic = 5
|
||||
C_Timer.After(_detalhes.mythic_plus.delay_to_show_graphic or 5, mythicDungeonCharts.ShowReadyPanel)
|
||||
Details.mythic_plus.delay_to_show_graphic = 5
|
||||
C_Timer.After(Details.mythic_plus.delay_to_show_graphic or 5, mythicDungeonCharts.ShowReadyPanel)
|
||||
|
||||
if (verbosemode) then
|
||||
mythicDungeonCharts:Debug("OnEndMythicDungeon() success!")
|
||||
@@ -275,7 +275,7 @@ mythicDungeonCharts:RegisterEvent("COMBAT_BOSS_DEFEATED", "OnBossDefeated")
|
||||
--show a small panel telling the chart is ready to show
|
||||
function mythicDungeonCharts.ShowReadyPanel()
|
||||
--check if is enabled
|
||||
if (not _detalhes.mythic_plus.show_damage_graphic) then
|
||||
if (not Details.mythic_plus.show_damage_graphic) then
|
||||
return
|
||||
end
|
||||
|
||||
@@ -313,10 +313,10 @@ function mythicDungeonCharts.ShowReadyPanel()
|
||||
|
||||
--disable feature check box (dont show this again)
|
||||
local on_switch_enable = function(self, _, value)
|
||||
_detalhes.mythic_plus.show_damage_graphic = not value
|
||||
Details.mythic_plus.show_damage_graphic = not value
|
||||
end
|
||||
|
||||
local notAgainSwitch, notAgainLabel = DetailsFramework:CreateSwitch(readyFrame, on_switch_enable, not _detalhes.mythic_plus.show_damage_graphic, _, _, _, _, _, _, _, _, _, Loc ["STRING_MINITUTORIAL_BOOKMARK4"], DetailsFramework:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"), "GameFontHighlightLeft")
|
||||
local notAgainSwitch, notAgainLabel = DetailsFramework:CreateSwitch(readyFrame, on_switch_enable, not Details.mythic_plus.show_damage_graphic, _, _, _, _, _, _, _, _, _, Loc ["STRING_MINITUTORIAL_BOOKMARK4"], DetailsFramework:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"), "GameFontHighlightLeft")
|
||||
notAgainSwitch:ClearAllPoints()
|
||||
notAgainLabel:SetPoint("left", notAgainSwitch, "right", 2, 0)
|
||||
notAgainSwitch:SetPoint("bottomleft", readyFrame, "bottomleft", 5, 5)
|
||||
@@ -362,7 +362,7 @@ function mythicDungeonCharts.ShowChart()
|
||||
titlebar:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
--title
|
||||
local titleLabel = _detalhes.gump:NewLabel(titlebar, titlebar, nil, "titulo", "Plugins", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
|
||||
local titleLabel = Details.gump:NewLabel(titlebar, titlebar, nil, "titulo", "Plugins", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
|
||||
titleLabel:SetPoint("center", titlebar , "center")
|
||||
titleLabel:SetPoint("top", titlebar , "top", 0, -5)
|
||||
dungeonChartFrame.TitleText = titleLabel
|
||||
@@ -377,7 +377,7 @@ function mythicDungeonCharts.ShowChart()
|
||||
titlebarMinimized:SetBackdropBorderColor(0, 0, 0, 1)
|
||||
|
||||
--title
|
||||
local titleLabelMinimized = _detalhes.gump:NewLabel(titlebarMinimized, titlebarMinimized, nil, "titulo", "Dungeon Run Chart", "GameFontHighlightLeft", 10, {227/255, 186/255, 4/255})
|
||||
local titleLabelMinimized = Details.gump:NewLabel(titlebarMinimized, titlebarMinimized, nil, "titulo", "Dungeon Run Chart", "GameFontHighlightLeft", 10, {227/255, 186/255, 4/255})
|
||||
titleLabelMinimized:SetPoint("left", titlebarMinimized , "left", 4, 0)
|
||||
--titleLabelMinimized:SetPoint("top", titlebarMinimized , "top", 0, -5)
|
||||
dungeonChartFrame.TitleTextMinimized = titleLabelMinimized
|
||||
@@ -509,9 +509,9 @@ function mythicDungeonCharts.ShowChart()
|
||||
--enabled box
|
||||
-- /run _G.DetailsMythicDungeonChartHandler.ShowChart(); DetailsMythicDungeonChartFrame.ShowChartFrame()
|
||||
local on_switch_enable = function(_, _, state)
|
||||
_detalhes.mythic_plus.show_damage_graphic = state
|
||||
Details.mythic_plus.show_damage_graphic = state
|
||||
end
|
||||
local enabledSwitch, enabledLabel = Details.gump:CreateSwitch(dungeonChartFrame, on_switch_enable, _detalhes.mythic_plus.show_damage_graphic, _, _, _, _, _, _, _, _, _, "Enabled", Details.gump:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"), "GameFontHighlightLeft")
|
||||
local enabledSwitch, enabledLabel = Details.gump:CreateSwitch(dungeonChartFrame, on_switch_enable, Details.mythic_plus.show_damage_graphic, _, _, _, _, _, _, _, _, _, "Enabled", Details.gump:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"), "GameFontHighlightLeft")
|
||||
enabledSwitch:SetAsCheckBox()
|
||||
enabledSwitch.tooltip = "Show this chart at the end of a mythic dungeon run.\n\nIf disabled, you can reactivate it again at the options panel > streamer settings."
|
||||
enabledLabel:SetPoint("right", minimizeButton, "left", -22, 0)
|
||||
@@ -705,10 +705,10 @@ local PixelFrameOnEnter = function(self)
|
||||
GameCooltip2:Preset(2)
|
||||
GameCooltip2:SetOption("FixedWidth", 100)
|
||||
GameCooltip2:SetOption("TextSize", 10)
|
||||
local onlyName = _detalhes:GetOnlyName(playerName)
|
||||
local onlyName = Details:GetOnlyName(playerName)
|
||||
GameCooltip2:AddLine(onlyName)
|
||||
|
||||
local classIcon, L, R, B, T = _detalhes:GetClassIcon(mythicDungeonCharts.ChartTable.Players [playerName] and mythicDungeonCharts.ChartTable.Players [playerName].Class)
|
||||
local classIcon, L, R, B, T = Details:GetClassIcon(mythicDungeonCharts.ChartTable.Players [playerName] and mythicDungeonCharts.ChartTable.Players [playerName].Class)
|
||||
GameCooltip2:AddIcon (classIcon, 1, 1, 16, 16, L, R, B, T)
|
||||
|
||||
GameCooltip2:AddLine(Details:GetCurrentToKFunction()(nil, floor(dps)))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
--[[global]] DETAILS_HOOK_BUFF = "HOOK_BUFF" --[[REMOVED--]]
|
||||
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
+26
-26
@@ -94,7 +94,7 @@ function DetailsMythicPlusFrame.MergeSegmentsOnEnd()
|
||||
local thisCombat = segmentHistory[i]
|
||||
if (thisCombat and thisCombat.is_mythic_dungeon_run_id == Details.mythic_dungeon_id) then
|
||||
local canAddThisSegment = true
|
||||
if (_detalhes.mythic_plus.make_overall_boss_only) then
|
||||
if (Details.mythic_plus.make_overall_boss_only) then
|
||||
if (not thisCombat.is_boss) then
|
||||
canAddThisSegment = false
|
||||
end
|
||||
@@ -251,7 +251,7 @@ function DetailsMythicPlusFrame.MergeTrashCleanup (isFromSchedule)
|
||||
newCombat:SetDate (startDate, endDate)
|
||||
|
||||
if (DetailsMythicPlusFrame.DevelopmentDebug) then
|
||||
print("Details!", "MergeTrashCleanup() > finished merging trash segments.", _detalhes.tabela_vigente, _detalhes.tabela_vigente.is_boss)
|
||||
print("Details!", "MergeTrashCleanup() > finished merging trash segments.", Details.tabela_vigente, Details.tabela_vigente.is_boss)
|
||||
end
|
||||
|
||||
--delete all segments that were merged
|
||||
@@ -348,7 +348,7 @@ function DetailsMythicPlusFrame.MergeRemainingTrashAfterAllBossesDone()
|
||||
local segment = segmentHistory [i]
|
||||
if (segment == pastCombat) then
|
||||
--remove the segment
|
||||
if (_detalhes.tabela_vigente == segment) then
|
||||
if (Details.tabela_vigente == segment) then
|
||||
removedCurrentSegment = true
|
||||
end
|
||||
tremove(segmentHistory, i)
|
||||
@@ -364,9 +364,9 @@ function DetailsMythicPlusFrame.MergeRemainingTrashAfterAllBossesDone()
|
||||
if (removedCurrentSegment) then
|
||||
--find another current segment
|
||||
local segmentHistory = Details:GetCombatSegments()
|
||||
_detalhes.tabela_vigente = segmentHistory [1]
|
||||
Details.tabela_vigente = segmentHistory [1]
|
||||
|
||||
if (not _detalhes.tabela_vigente) then
|
||||
if (not Details.tabela_vigente) then
|
||||
--assuming there's no segment from the dungeon run
|
||||
Details:EntrarEmCombate()
|
||||
Details:SairDoCombate()
|
||||
@@ -401,7 +401,7 @@ function DetailsMythicPlusFrame.BossDefeated(this_is_end_end, encounterID, encou
|
||||
local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
|
||||
|
||||
--add the mythic dungeon info to the combat
|
||||
_detalhes.tabela_vigente.is_mythic_dungeon = {
|
||||
Details.tabela_vigente.is_mythic_dungeon = {
|
||||
StartedAt = Details.MythicPlus.StartedAt, --the start of the run
|
||||
EndedAt = time(), --when the boss got killed
|
||||
SegmentID = Details.MythicPlus.SegmentID, --segment number within the dungeon
|
||||
@@ -416,11 +416,11 @@ function DetailsMythicPlusFrame.BossDefeated(this_is_end_end, encounterID, encou
|
||||
}
|
||||
|
||||
local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo()
|
||||
local mPlusTable = _detalhes.tabela_vigente.is_mythic_dungeon
|
||||
local mPlusTable = Details.tabela_vigente.is_mythic_dungeon
|
||||
Details222.MythicPlus.LogStep("BossDefeated | key level: | " .. mythicLevel .. " | " .. (mPlusTable.EncounterName or "") .. " | " .. (mPlusTable.ZoneName or ""))
|
||||
|
||||
--check if need to merge the trash for this boss
|
||||
if (_detalhes.mythic_plus.merge_boss_trash and not Details.MythicPlus.IsRestoredState) then
|
||||
if (Details.mythic_plus.merge_boss_trash and not Details.MythicPlus.IsRestoredState) then
|
||||
--store on an table all segments which should be merged
|
||||
local segmentsToMerge = DetailsMythicPlusFrame.TrashMergeScheduled or {}
|
||||
|
||||
@@ -451,7 +451,7 @@ function DetailsMythicPlusFrame.BossDefeated(this_is_end_end, encounterID, encou
|
||||
segmentsToMerge.PreviousBossKilledAt = Details.MythicPlus.PreviousBossKilledAt
|
||||
|
||||
--reduce this boss encounter time from the trash lenght time, since the boss doesn't count towards the time spent cleaning trash
|
||||
segmentsToMerge.LastBossKilledAt = time() - _detalhes.tabela_vigente:GetCombatTime()
|
||||
segmentsToMerge.LastBossKilledAt = time() - Details.tabela_vigente:GetCombatTime()
|
||||
|
||||
DetailsMythicPlusFrame.TrashMergeScheduled = segmentsToMerge
|
||||
|
||||
@@ -482,7 +482,7 @@ function DetailsMythicPlusFrame.BossDefeated(this_is_end_end, encounterID, encou
|
||||
Details.MythicPlus.PreviousBossKilledAt = time()
|
||||
|
||||
--update the saved table inside the profile
|
||||
_detalhes:UpdateState_CurrentMythicDungeonRun (true, Details.MythicPlus.SegmentID, Details.MythicPlus.PreviousBossKilledAt)
|
||||
Details:UpdateState_CurrentMythicDungeonRun (true, Details.MythicPlus.SegmentID, Details.MythicPlus.PreviousBossKilledAt)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -510,7 +510,7 @@ function DetailsMythicPlusFrame.MythicDungeonFinished (fromZoneLeft)
|
||||
local segmentsToMerge = {}
|
||||
|
||||
--check if there is trash segments after the last boss. need to merge these segments with the trash segment of the last boss
|
||||
local bCanMergeBossTrash = _detalhes.mythic_plus.merge_boss_trash
|
||||
local bCanMergeBossTrash = Details.mythic_plus.merge_boss_trash
|
||||
Details222.MythicPlus.LogStep("MythicDungeonFinished() | merge_boss_trash = " .. (bCanMergeBossTrash and "true" or "false"))
|
||||
if (bCanMergeBossTrash and not Details.MythicPlus.IsRestoredState and not fromZoneLeft) then
|
||||
--is the current combat not a boss fight?
|
||||
@@ -594,7 +594,7 @@ function DetailsMythicPlusFrame.MythicDungeonFinished (fromZoneLeft)
|
||||
end
|
||||
|
||||
--merge segments
|
||||
if (_detalhes.mythic_plus.make_overall_when_done and not Details.MythicPlus.IsRestoredState and not fromZoneLeft) then
|
||||
if (Details.mythic_plus.make_overall_when_done and not Details.MythicPlus.IsRestoredState and not fromZoneLeft) then
|
||||
--if (not InCombatLockdown() and not UnitAffectingCombat("player")) then
|
||||
if (DetailsMythicPlusFrame.DevelopmentDebug) then
|
||||
print("Details!", "MythicDungeonFinished() > not in combat, creating overall segment now")
|
||||
@@ -711,7 +711,7 @@ function DetailsMythicPlusFrame.OnChallengeModeStart()
|
||||
if (not Details.MythicPlus.Started and Details.MythicPlus.DungeonID == currentZoneID and Details.MythicPlus.Level == mythicLevel) then
|
||||
Details.MythicPlus.Started = true
|
||||
Details.MythicPlus.EndedAt = nil
|
||||
_detalhes.mythic_dungeon_currentsaved.started = true
|
||||
Details.mythic_dungeon_currentsaved.started = true
|
||||
DetailsMythicPlusFrame.IsDoingMythicDungeon = true
|
||||
|
||||
--print("D! mythic dungeon was NOT already started! debug 2")
|
||||
@@ -735,7 +735,7 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even
|
||||
|
||||
elseif (event == "COMBAT_PLAYER_LEAVE") then
|
||||
--ignore the event if ignoring mythic dungeon special treatment
|
||||
if (_detalhes.streamer_config.disable_mythic_dungeon) then
|
||||
if (Details.streamer_config.disable_mythic_dungeon) then
|
||||
return
|
||||
end
|
||||
|
||||
@@ -756,8 +756,8 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even
|
||||
Details.tabela_vigente.is_mythic_dungeon_trash = {
|
||||
ZoneName = zoneName,
|
||||
MapID = instanceMapID,
|
||||
Level = _detalhes.MythicPlus.Level,
|
||||
EJID = _detalhes.MythicPlus.ejID,
|
||||
Level = Details.MythicPlus.Level,
|
||||
EJID = Details.MythicPlus.ejID,
|
||||
}
|
||||
|
||||
Details222.MythicPlus.LogStep("COMBAT_PLAYER_LEAVE | wiped on boss | key level: | " .. mythicLevel .. " | " .. (encounterName or "") .. " " .. zoneName)
|
||||
@@ -770,7 +770,7 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even
|
||||
|
||||
elseif (event == "COMBAT_ENCOUNTER_START") then
|
||||
--ignore the event if ignoring mythic dungeon special treatment
|
||||
if (_detalhes.streamer_config.disable_mythic_dungeon) then
|
||||
if (Details.streamer_config.disable_mythic_dungeon) then
|
||||
Details222.MythicPlus.LogStep("COMBAT_ENCOUNTER_START | streamer_config.disable_mythic_dungeon is true and the code cannot continue.")
|
||||
return
|
||||
end
|
||||
@@ -780,7 +780,7 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even
|
||||
|
||||
elseif (event == "COMBAT_ENCOUNTER_END") then
|
||||
--ignore the event if ignoring mythic dungeon special treatment
|
||||
if (_detalhes.streamer_config.disable_mythic_dungeon) then
|
||||
if (Details.streamer_config.disable_mythic_dungeon) then
|
||||
Details222.MythicPlus.LogStep("COMBAT_ENCOUNTER_END | streamer_config.disable_mythic_dungeon is true and the code cannot continue.")
|
||||
return
|
||||
end
|
||||
@@ -789,9 +789,9 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even
|
||||
--nothing
|
||||
|
||||
elseif (event == "COMBAT_MYTHICDUNGEON_START") then
|
||||
local lowerInstance = _detalhes:GetLowerInstanceNumber()
|
||||
local lowerInstance = Details:GetLowerInstanceNumber()
|
||||
if (lowerInstance) then
|
||||
lowerInstance = _detalhes:GetInstance(lowerInstance)
|
||||
lowerInstance = Details:GetInstance(lowerInstance)
|
||||
if (lowerInstance) then
|
||||
C_Timer.After(3, function()
|
||||
if (lowerInstance:IsEnabled()) then
|
||||
@@ -803,13 +803,13 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even
|
||||
end
|
||||
|
||||
--ignore the event if ignoring mythic dungeon special treatment
|
||||
if (_detalhes.streamer_config.disable_mythic_dungeon) then
|
||||
if (Details.streamer_config.disable_mythic_dungeon) then
|
||||
return
|
||||
end
|
||||
|
||||
--reset spec cache if broadcaster requested
|
||||
if (_detalhes.streamer_config.reset_spec_cache) then
|
||||
wipe (_detalhes.cached_specs)
|
||||
if (Details.streamer_config.reset_spec_cache) then
|
||||
wipe (Details.cached_specs)
|
||||
end
|
||||
|
||||
C_Timer.After(0.5, DetailsMythicPlusFrame.OnChallengeModeStart)
|
||||
@@ -829,7 +829,7 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even
|
||||
|
||||
elseif (event == "COMBAT_MYTHICDUNGEON_END") then
|
||||
--ignore the event if ignoring mythic dungeon special treatment
|
||||
if (_detalhes.streamer_config.disable_mythic_dungeon) then
|
||||
if (Details.streamer_config.disable_mythic_dungeon) then
|
||||
Details222.MythicPlus.LogStep("COMBAT_MYTHICDUNGEON_END | streamer_config.disable_mythic_dungeon is true and the code cannot continue.")
|
||||
return
|
||||
end
|
||||
@@ -852,7 +852,7 @@ DetailsMythicPlusFrame:SetScript("OnEvent", function(_, event, ...)
|
||||
end
|
||||
|
||||
--ignore the event if ignoring mythic dungeon special treatment
|
||||
if (_detalhes.streamer_config.disable_mythic_dungeon) then
|
||||
if (Details.streamer_config.disable_mythic_dungeon) then
|
||||
Details222.MythicPlus.LogStep("ZONE_CHANGED_NEW_AREA | streamer_config.disable_mythic_dungeon is true and the code cannot continue.")
|
||||
return
|
||||
end
|
||||
@@ -866,7 +866,7 @@ DetailsMythicPlusFrame:SetScript("OnEvent", function(_, event, ...)
|
||||
Details222.MythicPlus.LogStep("ZONE_CHANGED_NEW_AREA | player has left the dungeon and Details! finished the dungeon because of that.")
|
||||
|
||||
--send mythic dungeon end event
|
||||
_detalhes:SendEvent("COMBAT_MYTHICDUNGEON_END")
|
||||
Details:SendEvent("COMBAT_MYTHICDUNGEON_END")
|
||||
|
||||
--finish the segment
|
||||
DetailsMythicPlusFrame.BossDefeated(true)
|
||||
|
||||
+85
-85
@@ -2,7 +2,7 @@
|
||||
|
||||
do
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local Details = _G.Details
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
local pairs = pairs
|
||||
@@ -16,7 +16,7 @@ do
|
||||
return [[Interface\AddOns\Details\images\classes_small]], unpack(unknown_class_coords)
|
||||
end
|
||||
|
||||
function _detalhes:GetIconTexture (iconType, withAlpha)
|
||||
function Details:GetIconTexture (iconType, withAlpha)
|
||||
iconType = string.lower(iconType)
|
||||
|
||||
if (iconType == "spec") then
|
||||
@@ -36,17 +36,17 @@ do
|
||||
end
|
||||
|
||||
-- try get the class from actor name
|
||||
function _detalhes:GetClass(name)
|
||||
function Details:GetClass(name)
|
||||
local _, class = UnitClass (name)
|
||||
|
||||
if (not class) then
|
||||
for index, container in ipairs(_detalhes.tabela_overall) do
|
||||
for index, container in ipairs(Details.tabela_overall) do
|
||||
local index = container._NameIndexTable [name]
|
||||
if (index) then
|
||||
local actor = container._ActorTable [index]
|
||||
if (actor.classe ~= "UNGROUPPLAYER") then
|
||||
local left, right, top, bottom = unpack(_detalhes.class_coords [actor.classe] or unknown_class_coords)
|
||||
local r, g, b = unpack(_detalhes.class_colors [actor.classe])
|
||||
local left, right, top, bottom = unpack(Details.class_coords [actor.classe] or unknown_class_coords)
|
||||
local r, g, b = unpack(Details.class_colors [actor.classe])
|
||||
return actor.classe, left, right, top, bottom, r or 1, g or 1, b or 1
|
||||
end
|
||||
end
|
||||
@@ -54,8 +54,8 @@ do
|
||||
|
||||
return "UNKNOW", 0.75, 1, 0.75, 1, 1, 1, 1, 1
|
||||
else
|
||||
local left, right, top, bottom = unpack(_detalhes.class_coords [class])
|
||||
local r, g, b = unpack(_detalhes.class_colors [class])
|
||||
local left, right, top, bottom = unpack(Details.class_coords [class])
|
||||
local r, g, b = unpack(Details.class_colors [class])
|
||||
return class, left, right, top, bottom, r or 1, g or 1, b or 1
|
||||
end
|
||||
end
|
||||
@@ -68,11 +68,11 @@ do
|
||||
TANK = {373/512, 420/512, 381/512, 427/512},
|
||||
NONE = {0, 50/512, 110/512, 150/512},
|
||||
}
|
||||
function _detalhes:GetRoleIcon (role)
|
||||
function Details:GetRoleIcon (role)
|
||||
return [[Interface\AddOns\Details\images\icons2]], unpack(roles [role])
|
||||
end
|
||||
|
||||
function _detalhes:GetClassIcon(class)
|
||||
function Details:GetClassIcon(class)
|
||||
if (self.classe) then
|
||||
class = self.classe
|
||||
elseif (type(class) == "table" and class.classe) then
|
||||
@@ -93,34 +93,34 @@ do
|
||||
return [[Interface\AddOns\Details\images\classes_small]], 0.25, 0.49609375, 0.75, 1
|
||||
|
||||
else
|
||||
return [[Interface\AddOns\Details\images\classes_small]], unpack(_detalhes.class_coords[class])
|
||||
return [[Interface\AddOns\Details\images\classes_small]], unpack(Details.class_coords[class])
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:GetSpecIcon(spec, useAlpha)
|
||||
function Details:GetSpecIcon(spec, useAlpha)
|
||||
if (spec) then
|
||||
if (spec == 0) then
|
||||
return [[Interface\AddOns\Details\images\classes_small]], unpack(_detalhes.class_coords["UNKNOW"])
|
||||
return [[Interface\AddOns\Details\images\classes_small]], unpack(Details.class_coords["UNKNOW"])
|
||||
end
|
||||
|
||||
if (useAlpha) then
|
||||
return [[Interface\AddOns\Details\images\spec_icons_normal_alpha]], unpack(_detalhes.class_specs_coords [spec])
|
||||
return [[Interface\AddOns\Details\images\spec_icons_normal_alpha]], unpack(Details.class_specs_coords [spec])
|
||||
else
|
||||
return [[Interface\AddOns\Details\images\spec_icons_normal]], unpack(_detalhes.class_specs_coords [spec])
|
||||
return [[Interface\AddOns\Details\images\spec_icons_normal]], unpack(Details.class_specs_coords [spec])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local default_color = {1, 1, 1, 1}
|
||||
function _detalhes:GetClassColor (class)
|
||||
function Details:GetClassColor (class)
|
||||
if (self.classe) then
|
||||
return unpack(_detalhes.class_colors [self.classe] or default_color)
|
||||
return unpack(Details.class_colors [self.classe] or default_color)
|
||||
|
||||
elseif (type(class) == "table" and class.classe) then
|
||||
return unpack(_detalhes.class_colors [class.classe] or default_color)
|
||||
return unpack(Details.class_colors [class.classe] or default_color)
|
||||
|
||||
elseif (type(class) == "string") then
|
||||
return unpack(_detalhes.class_colors [class] or default_color)
|
||||
return unpack(Details.class_colors [class] or default_color)
|
||||
|
||||
elseif (self.color) then
|
||||
return unpack(self.color)
|
||||
@@ -129,8 +129,8 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:GetPlayerIcon (playerName, segment)
|
||||
segment = segment or _detalhes.tabela_vigente
|
||||
function Details:GetPlayerIcon (playerName, segment)
|
||||
segment = segment or Details.tabela_vigente
|
||||
|
||||
local texture
|
||||
local L, R, T, B
|
||||
@@ -144,20 +144,20 @@ do
|
||||
local spec = playerObject.spec
|
||||
if (spec) then
|
||||
texture = [[Interface\AddOns\Details\images\spec_icons_normal]]
|
||||
L, R, T, B = unpack(_detalhes.class_specs_coords [spec])
|
||||
L, R, T, B = unpack(Details.class_specs_coords [spec])
|
||||
else
|
||||
texture = [[Interface\AddOns\Details\images\classes_small]]
|
||||
L, R, T, B = unpack(_detalhes.class_coords [playerObject.classe or "UNKNOW"])
|
||||
L, R, T, B = unpack(Details.class_coords [playerObject.classe or "UNKNOW"])
|
||||
end
|
||||
else
|
||||
texture = [[Interface\AddOns\Details\images\classes_small]]
|
||||
L, R, T, B = unpack(_detalhes.class_coords ["UNKNOW"])
|
||||
L, R, T, B = unpack(Details.class_coords ["UNKNOW"])
|
||||
end
|
||||
|
||||
return texture, L, R, T, B
|
||||
end
|
||||
|
||||
function _detalhes:GuessClass (t)
|
||||
function Details:GuessClass (t)
|
||||
|
||||
local Actor, container, tries = t[1], t[2], t[3]
|
||||
|
||||
@@ -167,7 +167,7 @@ do
|
||||
|
||||
if (Actor.spells) then --correcao pros containers misc, precisa pegar os diferentes tipos de containers de l�
|
||||
for spellid, _ in pairs(Actor.spells._ActorTable) do
|
||||
local class = _detalhes.ClassSpellList [spellid]
|
||||
local class = Details.ClassSpellList [spellid]
|
||||
if (class) then
|
||||
Actor.classe = class
|
||||
Actor.guessing_class = nil
|
||||
@@ -178,7 +178,7 @@ do
|
||||
|
||||
if (Actor.minha_barra and type(Actor.minha_barra) == "table") then
|
||||
Actor.minha_barra.minha_tabela = nil
|
||||
_detalhes:ScheduleWindowUpdate (2, true)
|
||||
Details:ScheduleWindowUpdate (2, true)
|
||||
end
|
||||
|
||||
return class
|
||||
@@ -187,18 +187,18 @@ do
|
||||
end
|
||||
|
||||
if (not Actor.nome) then
|
||||
if (not _detalhes.NoActorNameWarning) then
|
||||
if (not Details.NoActorNameWarning) then
|
||||
print("==============")
|
||||
_detalhes:Msg("Unhandled Exception: Actor has no name, ContainerID: ", container.tipo)
|
||||
_detalhes:Msg("After the current combat, reset data and use /reload.")
|
||||
_detalhes:Msg("Report this issue to the Author: Actor with no name, container: ", container.tipo)
|
||||
Details:Msg("Unhandled Exception: Actor has no name, ContainerID: ", container.tipo)
|
||||
Details:Msg("After the current combat, reset data and use /reload.")
|
||||
Details:Msg("Report this issue to the Author: Actor with no name, container: ", container.tipo)
|
||||
print("==============")
|
||||
_detalhes.NoActorNameWarning = true
|
||||
Details.NoActorNameWarning = true
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
local class = _detalhes:GetClass(Actor.nome)
|
||||
local class = Details:GetClass(Actor.nome)
|
||||
if (class and class ~= "UNKNOW") then
|
||||
Actor.classe = class
|
||||
Actor.need_refresh = true
|
||||
@@ -210,7 +210,7 @@ do
|
||||
|
||||
if (Actor.minha_barra and type(Actor.minha_barra) == "table") then
|
||||
Actor.minha_barra.minha_tabela = nil
|
||||
_detalhes:ScheduleWindowUpdate (2, true)
|
||||
Details:ScheduleWindowUpdate (2, true)
|
||||
end
|
||||
|
||||
return class
|
||||
@@ -219,7 +219,7 @@ do
|
||||
if (tries and tries < 10) then
|
||||
t[3] = tries + 1 --thanks @Farmbuyer on curseforge
|
||||
--_detalhes:ScheduleTimer("GuessClass", 2, {Actor, container, tries+1})
|
||||
_detalhes:ScheduleTimer("GuessClass", 2, t) --passing the same table instead of creating a new one
|
||||
Details:ScheduleTimer("GuessClass", 2, t) --passing the same table instead of creating a new one
|
||||
end
|
||||
|
||||
return false
|
||||
@@ -227,22 +227,22 @@ do
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function _detalhes:GetSpecByGUID (unitSerial)
|
||||
return _detalhes.cached_specs [unitSerial]
|
||||
function Details:GetSpecByGUID (unitSerial)
|
||||
return Details.cached_specs [unitSerial]
|
||||
end
|
||||
|
||||
-- try get the spec from actor name
|
||||
function _detalhes:GetSpec (name)
|
||||
function Details:GetSpec (name)
|
||||
|
||||
local guid = UnitGUID(name)
|
||||
if (guid) then
|
||||
local spec = _detalhes.cached_specs [guid]
|
||||
local spec = Details.cached_specs [guid]
|
||||
if (spec) then
|
||||
return spec
|
||||
end
|
||||
end
|
||||
|
||||
for index, container in ipairs(_detalhes.tabela_overall) do
|
||||
for index, container in ipairs(Details.tabela_overall) do
|
||||
local index = container._NameIndexTable [name]
|
||||
if (index) then
|
||||
local actor = container._ActorTable [index]
|
||||
@@ -282,9 +282,9 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:ReGuessSpec (t)
|
||||
function Details:ReGuessSpec (t)
|
||||
local actorObject, container = t[1], t[2]
|
||||
local SpecSpellList = _detalhes.SpecSpellList
|
||||
local SpecSpellList = Details.SpecSpellList
|
||||
|
||||
---@type combat
|
||||
local combatObject = Details:GetCurrentCombat()
|
||||
@@ -297,10 +297,10 @@ do
|
||||
local _, _, _, _, _, _, spellid = GetSpellInfo(spellName)
|
||||
local spec = SpecSpellList[spellid]
|
||||
if (spec) then
|
||||
_detalhes.cached_specs[actorObject.serial] = spec
|
||||
Details.cached_specs[actorObject.serial] = spec
|
||||
|
||||
actorObject:SetSpecId(spec)
|
||||
actorObject.classe = _detalhes.SpecIDToClass[spec] or actorObject.classe
|
||||
actorObject.classe = Details.SpecIDToClass[spec] or actorObject.classe
|
||||
actorObject.guessing_spec = nil
|
||||
|
||||
Details:SendEvent("UNIT_SPEC", nil, actorObject:GetUnitId(), spec, actorObject.serial)
|
||||
@@ -311,7 +311,7 @@ do
|
||||
|
||||
if (actorObject.minha_barra and type(actorObject.minha_barra) == "table") then
|
||||
actorObject.minha_barra.minha_tabela = nil
|
||||
_detalhes:ScheduleWindowUpdate (2, true)
|
||||
Details:ScheduleWindowUpdate (2, true)
|
||||
end
|
||||
|
||||
return spec
|
||||
@@ -324,10 +324,10 @@ do
|
||||
local spec = SpecSpellList [spellid]
|
||||
if (spec) then
|
||||
if (spec ~= actorObject.spec) then
|
||||
_detalhes.cached_specs [actorObject.serial] = spec
|
||||
Details.cached_specs [actorObject.serial] = spec
|
||||
|
||||
actorObject:SetSpecId(spec)
|
||||
actorObject.classe = _detalhes.SpecIDToClass [spec] or actorObject.classe
|
||||
actorObject.classe = Details.SpecIDToClass [spec] or actorObject.classe
|
||||
|
||||
Details:SendEvent("UNIT_SPEC", nil, actorObject:GetUnitId(), spec, actorObject.serial)
|
||||
|
||||
@@ -337,7 +337,7 @@ do
|
||||
|
||||
if (actorObject.minha_barra and type(actorObject.minha_barra) == "table") then
|
||||
actorObject.minha_barra.minha_tabela = nil
|
||||
_detalhes:ScheduleWindowUpdate (2, true)
|
||||
Details:ScheduleWindowUpdate (2, true)
|
||||
end
|
||||
|
||||
return spec
|
||||
@@ -348,7 +348,7 @@ do
|
||||
end
|
||||
|
||||
if (actorObject.classe == "HUNTER") then
|
||||
local container_misc = _detalhes.tabela_vigente[4]
|
||||
local container_misc = Details.tabela_vigente[4]
|
||||
local index = container_misc._NameIndexTable [actorObject.nome]
|
||||
if (index) then
|
||||
local misc_actor = container_misc._ActorTable [index]
|
||||
@@ -358,10 +358,10 @@ do
|
||||
local spec = SpecSpellList [spellid]
|
||||
if (spec) then
|
||||
if (spec ~= actorObject.spec) then
|
||||
_detalhes.cached_specs [actorObject.serial] = spec
|
||||
Details.cached_specs [actorObject.serial] = spec
|
||||
|
||||
actorObject:SetSpecId(spec)
|
||||
actorObject.classe = _detalhes.SpecIDToClass [spec] or actorObject.classe
|
||||
actorObject.classe = Details.SpecIDToClass [spec] or actorObject.classe
|
||||
|
||||
Details:SendEvent("UNIT_SPEC", nil, actorObject:GetUnitId(), spec, actorObject.serial)
|
||||
|
||||
@@ -371,7 +371,7 @@ do
|
||||
|
||||
if (actorObject.minha_barra and type(actorObject.minha_barra) == "table") then
|
||||
actorObject.minha_barra.minha_tabela = nil
|
||||
_detalhes:ScheduleWindowUpdate (2, true)
|
||||
Details:ScheduleWindowUpdate (2, true)
|
||||
end
|
||||
|
||||
return spec
|
||||
@@ -388,18 +388,18 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:GuessSpec(t)
|
||||
function Details:GuessSpec(t)
|
||||
local Actor, container, tries = t[1], t[2], t[3]
|
||||
if (not Actor) then
|
||||
return false
|
||||
end
|
||||
|
||||
local SpecSpellList = _detalhes.SpecSpellList
|
||||
local SpecSpellList = Details.SpecSpellList
|
||||
--get from the spec cache
|
||||
local spec = _detalhes.cached_specs [Actor.serial]
|
||||
local spec = Details.cached_specs [Actor.serial]
|
||||
if (spec) then
|
||||
Actor:SetSpecId(spec)
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.classe = Details.SpecIDToClass [spec] or Actor.classe
|
||||
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
@@ -409,24 +409,24 @@ do
|
||||
|
||||
if (Actor.minha_barra and type(Actor.minha_barra) == "table") then
|
||||
Actor.minha_barra.minha_tabela = nil
|
||||
_detalhes:ScheduleWindowUpdate (2, true)
|
||||
Details:ScheduleWindowUpdate (2, true)
|
||||
end
|
||||
|
||||
return spec
|
||||
end
|
||||
|
||||
--get from the spell cast list
|
||||
if (_detalhes.tabela_vigente) then
|
||||
local spellCastTable = _detalhes.tabela_vigente:GetSpellCastTable(Actor.nome)
|
||||
if (Details.tabela_vigente) then
|
||||
local spellCastTable = Details.tabela_vigente:GetSpellCastTable(Actor.nome)
|
||||
|
||||
for spellName, _ in pairs(spellCastTable) do
|
||||
local _, _, _, _, _, _, spellid = GetSpellInfo(spellName)
|
||||
local spec = SpecSpellList[spellid]
|
||||
if (spec) then
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
Details.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor:SetSpecId(spec)
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.classe = Details.SpecIDToClass [spec] or Actor.classe
|
||||
|
||||
Details:SendEvent("UNIT_SPEC", nil, Actor:GetUnitId(), spec, Actor.serial)
|
||||
|
||||
@@ -438,7 +438,7 @@ do
|
||||
|
||||
if (Actor.minha_barra and type(Actor.minha_barra) == "table") then
|
||||
Actor.minha_barra.minha_tabela = nil
|
||||
_detalhes:ScheduleWindowUpdate (2, true)
|
||||
Details:ScheduleWindowUpdate (2, true)
|
||||
end
|
||||
|
||||
return spec
|
||||
@@ -449,10 +449,10 @@ do
|
||||
for spellid, _ in pairs(Actor.spells._ActorTable) do
|
||||
local spec = SpecSpellList [spellid]
|
||||
if (spec) then
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
Details.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor:SetSpecId(spec)
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.classe = Details.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
Details:SendEvent("UNIT_SPEC", nil, Actor:GetUnitId(), spec, Actor.serial)
|
||||
@@ -463,7 +463,7 @@ do
|
||||
|
||||
if (Actor.minha_barra and type(Actor.minha_barra) == "table") then
|
||||
Actor.minha_barra.minha_tabela = nil
|
||||
_detalhes:ScheduleWindowUpdate (2, true)
|
||||
Details:ScheduleWindowUpdate (2, true)
|
||||
end
|
||||
|
||||
return spec
|
||||
@@ -476,10 +476,10 @@ do
|
||||
for spellid, _ in pairs(Actor.spells._ActorTable) do
|
||||
local spec = SpecSpellList [spellid]
|
||||
if (spec) then
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
Details.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor:SetSpecId(spec)
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.classe = Details.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
Details:SendEvent("UNIT_SPEC", nil, Actor:GetUnitId(), spec, Actor.serial)
|
||||
@@ -490,7 +490,7 @@ do
|
||||
|
||||
if (Actor.minha_barra and type(Actor.minha_barra) == "table") then
|
||||
Actor.minha_barra.minha_tabela = nil
|
||||
_detalhes:ScheduleWindowUpdate (2, true)
|
||||
Details:ScheduleWindowUpdate (2, true)
|
||||
end
|
||||
|
||||
return spec
|
||||
@@ -500,7 +500,7 @@ do
|
||||
end
|
||||
|
||||
if (Actor.classe == "HUNTER") then
|
||||
local container_misc = _detalhes.tabela_vigente[4]
|
||||
local container_misc = Details.tabela_vigente[4]
|
||||
local index = container_misc._NameIndexTable [Actor.nome]
|
||||
if (index) then
|
||||
local misc_actor = container_misc._ActorTable [index]
|
||||
@@ -510,10 +510,10 @@ do
|
||||
local spec = SpecSpellList [spellid]
|
||||
if (spec) then
|
||||
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
Details.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor:SetSpecId(spec)
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.classe = Details.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
Details:SendEvent("UNIT_SPEC", nil, Actor:GetUnitId(), spec, Actor.serial)
|
||||
@@ -524,7 +524,7 @@ do
|
||||
|
||||
if (Actor.minha_barra and type(Actor.minha_barra) == "table") then
|
||||
Actor.minha_barra.minha_tabela = nil
|
||||
_detalhes:ScheduleWindowUpdate (2, true)
|
||||
Details:ScheduleWindowUpdate (2, true)
|
||||
end
|
||||
|
||||
return spec
|
||||
@@ -534,13 +534,13 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
local spec = _detalhes:GetSpec (Actor.nome)
|
||||
local spec = Details:GetSpec (Actor.nome)
|
||||
if (spec) then
|
||||
|
||||
_detalhes.cached_specs [Actor.serial] = spec
|
||||
Details.cached_specs [Actor.serial] = spec
|
||||
|
||||
Actor:SetSpecId(spec)
|
||||
Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.classe = Details.SpecIDToClass [spec] or Actor.classe
|
||||
Actor.need_refresh = true
|
||||
Actor.guessing_spec = nil
|
||||
|
||||
@@ -550,21 +550,21 @@ do
|
||||
|
||||
if (Actor.minha_barra and type(Actor.minha_barra) == "table") then
|
||||
Actor.minha_barra.minha_tabela = nil
|
||||
_detalhes:ScheduleWindowUpdate (2, true)
|
||||
Details:ScheduleWindowUpdate (2, true)
|
||||
end
|
||||
|
||||
return spec
|
||||
end
|
||||
|
||||
if (_detalhes.streamer_config.quick_detection) then
|
||||
if (Details.streamer_config.quick_detection) then
|
||||
if (tries and tries < 30) then
|
||||
t[3] = tries + 1
|
||||
_detalhes:ScheduleTimer("GuessSpec", 1, t)
|
||||
Details:ScheduleTimer("GuessSpec", 1, t)
|
||||
end
|
||||
else
|
||||
if (tries and tries < 10) then
|
||||
t[3] = tries + 1
|
||||
_detalhes:ScheduleTimer("GuessSpec", 3, t)
|
||||
Details:ScheduleTimer("GuessSpec", 3, t)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -574,7 +574,7 @@ do
|
||||
end
|
||||
|
||||
|
||||
function _detalhes:AddColorString (player_name, class)
|
||||
function Details:AddColorString (player_name, class)
|
||||
--check if the class colors exists
|
||||
local classColors = _G.RAID_CLASS_COLORS
|
||||
if (classColors) then
|
||||
@@ -590,9 +590,9 @@ function _detalhes:AddColorString (player_name, class)
|
||||
return player_name
|
||||
end
|
||||
|
||||
function _detalhes:AddRoleIcon (player_name, role, size)
|
||||
function Details:AddRoleIcon (player_name, role, size)
|
||||
--check if is a valid role
|
||||
local roleIcon = _detalhes.role_texcoord [role]
|
||||
local roleIcon = Details.role_texcoord [role]
|
||||
if (type(player_name) == "string" and roleIcon and role ~= "NONE") then
|
||||
--add the role icon
|
||||
size = size or 14
|
||||
@@ -603,13 +603,13 @@ function _detalhes:AddRoleIcon (player_name, role, size)
|
||||
return player_name
|
||||
end
|
||||
|
||||
function _detalhes:AddClassOrSpecIcon (playerName, class, spec, iconSize, useAlphaIcons)
|
||||
function Details:AddClassOrSpecIcon (playerName, class, spec, iconSize, useAlphaIcons)
|
||||
|
||||
local size = iconSize or 16
|
||||
|
||||
if (spec) then
|
||||
local specString = ""
|
||||
local L, R, T, B = unpack(_detalhes.class_specs_coords [spec])
|
||||
local L, R, T, B = unpack(Details.class_specs_coords [spec])
|
||||
if (L) then
|
||||
if (useAlphaIcons) then
|
||||
specString = "|TInterface\\AddOns\\Details\\images\\spec_icons_normal_alpha:" .. size .. ":" .. size .. ":0:0:512:512:" .. (L * 512) .. ":" .. (R * 512) .. ":" .. (T * 512) .. ":" .. (B * 512) .. "|t"
|
||||
@@ -622,7 +622,7 @@ function _detalhes:AddClassOrSpecIcon (playerName, class, spec, iconSize, useAlp
|
||||
|
||||
if (class) then
|
||||
local classString = ""
|
||||
local L, R, T, B = unpack(_detalhes.class_coords [class])
|
||||
local L, R, T, B = unpack(Details.class_coords [class])
|
||||
if (L) then
|
||||
local imageSize = 128
|
||||
if (useAlphaIcons) then
|
||||
|
||||
@@ -149,7 +149,7 @@ function Details.InstallRaidInfo()
|
||||
{boss = "Sylvanas Windrunner", portrait = 4071443},
|
||||
}
|
||||
|
||||
_detalhes:InstallEncounter ({
|
||||
Details:InstallEncounter ({
|
||||
id = INSTANCE_MAPID, --map id
|
||||
ej_id = INSTANCE_EJID, --encounter journal id
|
||||
name = InstanceName,
|
||||
@@ -240,7 +240,7 @@ function Details.InstallRaidInfo()
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:InstallEncounter ({
|
||||
Details:InstallEncounter ({
|
||||
id = INSTANCE_MAPID, --map id
|
||||
ej_id = INSTANCE_EJID, --encounter journal id
|
||||
name = InstanceName,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--[[this file save the data when player leave the game]]
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local addonName, Details222 = ...
|
||||
|
||||
function _detalhes:WipeConfig()
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
@@ -5,7 +5,7 @@ do
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--On The Fly SpellCache
|
||||
|
||||
local Details = _G._detalhes
|
||||
local Details = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local addonName, Details222 = ...
|
||||
local _
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
do
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local addonName, Details222 = ...
|
||||
|
||||
--import potion list from the framework
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
local _
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local addonName, Details222 = ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user