Mercurial > wow > mylilpony
diff MyLilPony.lua @ 19:2ae5f67e313a 1.1.0-b1
Added support for matching any unit's mount via macro options (e.g. /pony [@mouseover] match). The "target" command is now deprecated in favour of the slightly more general "match" (although "target" will continue to work).
author | syzler |
---|---|
date | Sat, 16 Apr 2011 15:23:40 +0000 |
parents | b7966675a105 |
children | 7bc67e937603 |
line wrap: on
line diff
--- a/MyLilPony.lua Sat Apr 16 14:47:47 2011 +0000 +++ b/MyLilPony.lua Sat Apr 16 15:23:40 2011 +0000 @@ -125,7 +125,7 @@ end function MyLilPony.SlashHandler(args) - local arg = SecureCmdOptionParse(args); + local arg, unit = SecureCmdOptionParse(args); if MyLilPony.StringMatchIgnoreCase(arg, "^auto$") then MyLilPony.AutoMount(); elseif MyLilPony.StringMatchIgnoreCase(arg, "^random$") @@ -146,10 +146,13 @@ or MyLilPony.StringMatchIgnoreCase(arg, "^swim$") or MyLilPony.StringMatchIgnoreCase(arg, "^s$") then MyLilPony.CallAquaticMount(); - elseif MyLilPony.StringMatchIgnoreCase(arg, "^target$") + elseif MyLilPony.StringMatchIgnoreCase(arg, "^match$") + or MyLilPony.StringMatchIgnoreCase(arg, "^m$") + or MyLilPony.StringMatchIgnoreCase(arg, "^target$") or MyLilPony.StringMatchIgnoreCase(arg, "^tgt$") or MyLilPony.StringMatchIgnoreCase(arg, "^t$") then - local result = MyLilPony.CallMountByMatch("target"); + if unit == "" or unit == nil then unit = "target" end + local result = MyLilPony.CallMountByMatch(unit); if not result then MyLilPony.Log("No matching mounts were found"); end @@ -190,7 +193,8 @@ MyLilPony.Print(" /mylilpony ground - Summons random ground mount"); MyLilPony.Print(" /mylilpony flying - Summons random flying mount"); MyLilPony.Print(" /mylilpony aquatic - Summons random aquatic mount"); - MyLilPony.Print(" /mylilpony target - Summons same mount as targeted unit"); + MyLilPony.Print(" /mylilpony match - Summons same mount as targeted unit"); + MyLilPony.Print(" /mylilpony [@<UNITID>] match - Summons same mount as specified unit"); MyLilPony.Print(" /mylilpony list <NAME> - Lists mounts matching name"); MyLilPony.Print(" /mylilpony exact <NAME> - Summons mount by exact name"); MyLilPony.Print(" /mylilpony <ID> - Summons mount by spell or creature ID");