Release 5559:

- All Details! internal events callback are now secure calls.
        - Added slash commands: /details 'softtoggle' 'softshow' 'softhide'. Use them to manipulate the window visibility while using auto hide.
        - Fixed mythic dungeon graphic window showing up when the user leaves the dungeon before completing it.
This commit is contained in:
Tercio
2018-04-13 10:46:36 -03:00
parent af907e7ffa
commit 1823dab929
3 changed files with 52 additions and 8 deletions
+5 -5
View File
File diff suppressed because one or more lines are too long
+14 -3
View File
@@ -235,21 +235,32 @@ end
function mythicDungeonCharts:OnEndMythicDungeon()
if (mythicDungeonCharts.ChartTable and mythicDungeonCharts.ChartTable.Running) then
--> stop capturinfg
mythicDungeonCharts.ChartTable.Running = false
mythicDungeonCharts.ChartTable.ElapsedTime = time() - mythicDungeonCharts.ChartTable.StartTime
mythicDungeonCharts.ChartTable.EndTime = time()
mythicDungeonCharts.ChartTable.Ticker:Cancel()
local name, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo()
mythicDungeonCharts.ChartTable.DungeonName = name
mythicDungeonCharts:Debug ("Dungeon ended, chart data capture stopped")
--> check if is inside the dungeon
--> many players just leave the dungeon in order the re-enter and start the run again, the chart window is showing in these cases data to an imcomplete run.
local isInsideDungeon = IsInInstance()
if (not isInsideDungeon) then
mythicDungeonCharts:Debug ("OnEndMythicDungeon() player wasn't inside the dungeon.")
return
end
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 = 20
C_Timer.After (_detalhes.mythic_plus.delay_to_show_graphic or 20, mythicDungeonCharts.ShowChart)
if (verbosemode) then
mythicDungeonCharts:Debug ("OnEndMythicDungeon() success")
mythicDungeonCharts:Debug ("OnEndMythicDungeon() success!")
end
else
mythicDungeonCharts:Debug ("Dungeon ended, no chart data was running")
+33
View File
@@ -54,6 +54,39 @@ function SlashCmdList.DETAILS (msg, editbox)
_detalhes:ShutDownAllInstances()
end
elseif (command == "softhide") then
for instanceID, instance in _detalhes:ListInstances() do
if (instance:IsEnabled()) then
if (instance.hide_in_combat_type > 1) then
instance:SetWindowAlphaForCombat (true)
end
end
end
elseif (command == "softshow") then
for instanceID, instance in _detalhes:ListInstances() do
if (instance:IsEnabled()) then
if (instance.hide_in_combat_type > 1) then
instance:SetWindowAlphaForCombat (false)
end
end
end
elseif (command == "softtoggle") then
for instanceID, instance in _detalhes:ListInstances() do
if (instance:IsEnabled()) then
if (instance.hide_in_combat_type > 1) then
if (instance.baseframe:GetAlpha() > 0.1) then
--show
instance:SetWindowAlphaForCombat (true)
else
--hide
instance:SetWindowAlphaForCombat (false)
end
end
end
end
elseif (command == Loc ["STRING_SLASH_SHOW"] or command == Loc ["STRING_SLASH_SHOW_ALIAS1"] or command == "show") then
_detalhes.LastShowCommand = GetTime()