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:
+14
-3
@@ -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")
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user