Originally Posted by Dolgubon
Yes the according function should check it, but it is never called after a reloading, until the player enters or edits combat.
|
I think that's not true, because:
Code:
function testplugin:Initialize()
self.inCombat = IsUnitInCombat("player")
EVENT_MANAGER:RegisterForEvent(self.name, EVENT_PLAYER_COMBAT_STATE, self.OnPlayerCombatState)
inCombat=false
end
After reloadui the addon will be initialized, retrieve the combat state via IsUnitInCombat("player") and set the addon's display accordingly.
Originally Posted by ArtOfShred
(...)
There's one additional issue you might run into - if you reload UI during combat, the combat state event does not fire upon reloading UI (...)
|
IsUnitInCombat() doesn't need a combat state event to fire as it will always return the native code's combat state information. Just verified it.