WoW API: CanSummonFriend

From AddOn Studio
Revision as of 13:37, 14 August 2008 by WoWWiki>Vladinator (New page: {{wowapi}} __NOTOC__ <!-- List return values and arguments as well as function name, follow Blizzard usage convention for args --> CanSummonFriend("unit") == Arguments == <!-- List each...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < CanSummonFriend

CanSummonFriend("unit")

Arguments

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


Returns

Nothing


Example

local t = "Zuotheshaman"; 
if CanSummonFriend(t) then 
  SendChatMessage("I am summoning you!","WHISPER",nil,t) 
  SummonFriend(t) 
end 


Result

If you can summon the target, you whisper and summon him/her to you. Check out SummonFriend() for details about that function.