Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function hookBattlefieldMinimap()
- function UpdateThis()
- print(1)
- end
- hooksecurefunc("BattlefieldMinimap_OnUpdate", UpdateThis)
- end
- if IsAddonLoaded("Blizzard_BattlefieldMinimap") then
- hookBattlefieldMinimap()
- else
- local frame = CreateFrame("Frame")
- frame:RegisterEvent("ADDON_LOADED")
- frame:SetScript("OnEvent", function(self, event, ...)
- if ... == "Blizzard_BattlefieldMinimap" then
- print("Caught Blizzard_BattlefieldMinimap loading")
- hookBattlefieldMinimap()
- frame:UnregisterEvent("ADDON_LOADED")
- frame:SetScript("OnEvent", nil)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement