<Frame name="BattleHerald_WorldStateManager"> |
<Scripts> |
<OnLoad> |
self:RegisterEvent("PLAYER_ENTERING_WORLD"); self:RegisterEvent("PLAYER_ENTERING_BATTLEGROUND"); |
self:RegisterEvent("PLAYER_ENTERING_WORLD"); |
self:RegisterEvent("PLAYER_ENTERING_BATTLEGROUND"); |
self:RegisterEvent("VARIABLES_LOADED"); |
-- Register for scale update |
BattleHerald_RegisterOptionHandler("Battleground UI", "WORLD_FRAME_SCALE", BattleHerald_UpdateWorldFrameScale); |
</OnLoad> |
<OnEvent> |
if (event == "VARIABLES_LOADED") then |
local scale = BattleHerald_GetUserOption("WORLD_FRAME_SCALE"); |
if (scale) then |
BattleHerald_UpdateWorldFrameScale("WORLD_FRAME_SCALE", scale); |
end |
return; |
end |
|
if (BattleHerald_IsCTFActive()) then |
BattleHerald_SwitchWorldStateFrame("CTF"); |
elseif (BattleHerald_IsEOTSActive()) then |