Skip to content

Commit

Permalink
Move Bindings to PLAYER_ENTERING_WORLD
Browse files Browse the repository at this point in the history
  • Loading branch information
Rottenbeer committed Jun 7, 2021
1 parent 8985dbb commit 11c4e4f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ItemRack/ItemRack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ function ItemRack.InitEventHandlers()
handler.UNIT_SPELLCAST_FAILED = ItemRack.OnCastingStop
handler.CHARACTER_POINTS_CHANGED = ItemRack.UpdateClassSpecificStuff
handler.PLAYER_TALENT_UPDATE = ItemRack.UpdateClassSpecificStuff
handler.PLAYER_ENTERING_WORLD = ItemRack.OnEnterWorld
-- handler.ACTIVE_TALENT_GROUP_CHANGED = ItemRack.UpdateClassSpecificStuff
-- handler.PET_BATTLE_OPENING_START = ItemRack.OnEnteringPetBattle
-- handler.PET_BATTLE_CLOSE = ItemRack.OnLeavingPetBattle
Expand Down Expand Up @@ -228,6 +229,10 @@ function ItemRack.OnPlayerLogin()
ItemRack.InitEvents()
end

function ItemRack.OnEnterWorld()
ItemRack.SetSetBindings()
end

local loader = CreateFrame("Frame",nil, self, BackdropTemplateMixin and "BackdropTemplate") -- need a new temp frame here, ItemRackFrame is not created yet

loader:RegisterEvent("PLAYER_LOGIN")
Expand Down Expand Up @@ -484,10 +489,10 @@ function ItemRack.InitCore()
ItemRackFrame:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
ItemRackFrame:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED")
ItemRackFrame:RegisterEvent("UNIT_SPELLCAST_FAILED")
ItemRackFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
--end
ItemRack.StartTimer("CooldownUpdate")
ItemRack.ReflectAlpha()
ItemRack.SetSetBindings()

SlashCmdList["ItemRack"] = ItemRack.SlashHandler
SLASH_ItemRack1 = "/itemrack"
Expand Down

0 comments on commit 11c4e4f

Please sign in to comment.