mirror of
https://forgejo.merr.is/annika/KittenDismount.git
synced 2025-12-11 11:55:25 -05:00
23 lines
552 B
Lua
23 lines
552 B
Lua
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
|
|
if KittenDismount_disabledSpells[spellID] then
|
|
Dismount()
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
frame:SetScript("OnEvent", OnEvent)
|
|
|
|
local function OnAddonLoaded()
|
|
KittenDismount_SetDismountArray()
|
|
end
|
|
|
|
EventUtil.ContinueOnAddOnLoaded("KittenDismount", OnAddonLoaded);
|
|
|
|
-- Hi Kitten!
|