Skip to content

Commit

Permalink
Merge pull request #480 from Flamanis/OnModeChanged-use-LastModo
Browse files Browse the repository at this point in the history
Use LastModo on OnModeChanged
  • Loading branch information
Tercioo authored Mar 24, 2023
2 parents 8feb599 + 703b4a7 commit 383f21e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions classes/class_instance.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3028,9 +3028,9 @@ end
---@param instance instance
function Details222.Instances.OnModeChanged(instance)
local modeId = instance:GetMode()

if (modeId == modo_alone) then
if (instance:IsRaidMode()) then
if (instance.LastModo == modo_raid) then
Details.RaidTables:DisableRaidMode(instance)
end

Expand All @@ -3040,17 +3040,17 @@ function Details222.Instances.OnModeChanged(instance)
instance:SoloMode(true)

elseif (modeId == modo_raid) then
if (instance:IsSoloMode()) then
if (instance.LastModo == modo_alone) then
instance:SoloMode(false)
end
instance:ChangeIcon()
Details.RaidTables:EnableRaidMode(instance)

elseif (modeId == modo_grupo or modeId == modo_all) then
if (instance:IsSoloMode()) then
if (instance.LastModo == modo_alone) then
instance:SoloMode(false)

elseif (instance:IsRaidMode()) then
elseif (instance.LastModo == modo_raid) then
Details.RaidTables:DisableRaidMode(instance)
end

Expand Down

0 comments on commit 383f21e

Please sign in to comment.