-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
local f = CreateFrame("Frame", "DismountMe", UIParent) | ||
f:RegisterEvent("UI_ERROR_MESSAGE") | ||
f:RegisterEvent("TAXIMAP_OPENED") | ||
|
||
f:SetScript("OnEvent", function(self, event, arg1, arg2, ...) | ||
--print("arg1:", arg1, "| arg2:", arg2) | ||
if event == "UI_ERROR_MESSAGE" then | ||
if arg1 == 50 then | ||
if arg2 == "You must be standing to do that" then | ||
DoEmote("STAND") | ||
elseif arg2 == "You are mounted" then | ||
Dismount() | ||
end | ||
elseif arg1 == 213 then | ||
if arg2 == "You are already mounted! Dismount first." then | ||
Dismount() | ||
end | ||
elseif arg1 == 504 then | ||
if arg2 == "You can't do that while mounted." then | ||
Dismount() | ||
end | ||
end | ||
elseif event == "TAXIMAP_OPENED" then | ||
Dismount() | ||
end | ||
end) | ||
|
||
f:Hide() |