Wikia

WoWWiki

API CanGrantLevel

Talk0
102,090pages on
this wiki
Revision as of 21:57, September 13, 2008 by Xelron (Talk | contribs)

WoW API < CanGrantLevel
status = CanGrantLevel("unit")


Arguments

("unit")
unit 
UnitId or a name, returns true if you can grant a level to the target or nil if not


Returns

status 
nil if false, true if you have levels to grant


Example

local status = CanGrantLevel("target")
if status then
 ChatFrame1:AddMessage("I can grant levels to my friend!")
else
 ChatFrame1:AddMessage("I am out of free levels for now.")
end

Result

Outputs in the chat frame either if you can or if you can't grant levels to your target right now.

Around Wikia's network

Random Wiki