2024-09-26 12:41:38 -04:00
|
|
|
local frame = CreateFrame("Frame", "DismountAddonFrame");
|
|
|
|
|
frame:RegisterEvent("UNIT_SPELLCAST_SENT");
|
|
|
|
|
|
|
|
|
|
local function OnEvent(self, event, ...)
|
|
|
|
|
if event == "UNIT_SPELLCAST_SENT" then
|
|
|
|
|
local unit, target, castGUID, spellID = ...;
|
|
|
|
|
if not IsFlying() then
|
2024-09-26 15:32:14 -04:00
|
|
|
if KittenDismount_disabledSpells[spellID] then
|
2024-09-26 12:41:38 -04:00
|
|
|
Dismount()
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
frame:SetScript("OnEvent", OnEvent)
|
|
|
|
|
|
2024-09-26 15:32:14 -04:00
|
|
|
local function OnAddonLoaded()
|
|
|
|
|
KittenDismount_SetDismountArray()
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
EventUtil.ContinueOnAddOnLoaded("KittenDismount", OnAddonLoaded);
|
|
|
|
|
|
2024-09-26 12:41:38 -04:00
|
|
|
-- Hi Kitten!
|