Mercurial > wow > mylilpony
comparison libMyLilPony/libMyLilPony_mountFunctions.lua @ 7:d96c15f7477b
Updated documentation for API.
author | syzler |
---|---|
date | Tue, 05 Apr 2011 02:05:57 +0000 |
parents | 21d6611a1307 |
children | b1e344c17ab5 |
comparison
equal
deleted
inserted
replaced
6:21d6611a1307 | 7:d96c15f7477b |
---|---|
163 -- The function checks the buffs of the specified unit against the mount spellbook for matches. | 163 -- The function checks the buffs of the specified unit against the mount spellbook for matches. |
164 -- As a result, the function will only likely work against player characters. | 164 -- As a result, the function will only likely work against player characters. |
165 -- Does nothing if the specified unit's mount is already summoned. | 165 -- Does nothing if the specified unit's mount is already summoned. |
166 -- @param unit The unit frame name (e.g. "target", "player", "focus") of the unit whose mount is desired. | 166 -- @param unit The unit frame name (e.g. "target", "player", "focus") of the unit whose mount is desired. |
167 -- @return A Boolean value indicating whether or not a mount was successfully summoned. | 167 -- @return A Boolean value indicating whether or not a mount was successfully summoned. |
168 -- @usage MyLilPony.CallMountByMatch("target") | 168 -- @usage MyLilPony.CallMountByMatch("target"); |
169 function MyLilPony.CallMountByMatch(unit) | 169 function MyLilPony.CallMountByMatch(unit) |
170 local result = false; | 170 local result = false; |
171 local unitBuffs = MyLilPony.GetUnitBuffs(unit); | 171 local unitBuffs = MyLilPony.GetUnitBuffs(unit); |
172 local countMounts = GetNumCompanions("MOUNT"); | 172 local countMounts = GetNumCompanions("MOUNT"); |
173 for i = 1, countMounts do | 173 for i = 1, countMounts do |
187 -- @return A Boolean value indicating whether or not a mount was successfully summoned. | 187 -- @return A Boolean value indicating whether or not a mount was successfully summoned. |
188 -- @usage local filter = function (i) | 188 -- @usage local filter = function (i) |
189 -- local _, name, _, _, summoned = GetCompanionInfo("MOUNT", i); | 189 -- local _, name, _, _, summoned = GetCompanionInfo("MOUNT", i); |
190 -- return not summoned and string.match(name, pattern); | 190 -- return not summoned and string.match(name, pattern); |
191 -- end | 191 -- end |
192 -- return MyLilPony.CallMountByFilter(filter); | 192 -- MyLilPony.CallMountByFilter(filter); |
193 function MyLilPony.CallMountByFilter(filter) | 193 function MyLilPony.CallMountByFilter(filter) |
194 local countMounts = GetNumCompanions("MOUNT"); | 194 local countMounts = GetNumCompanions("MOUNT"); |
195 if countMounts > 0 then | 195 if countMounts > 0 then |
196 local results = {}; | 196 local results = {}; |
197 local countResults = 0; | 197 local countResults = 0; |