12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 27 ■ API <strong>Reference</strong> 829factionName—Name <strong>of</strong> the faction that controls the zone (only applies ifpvpType is friendly or hostile) (string)GetZoneTextReturns the name <strong>of</strong> the zone in which the player is located.zone = GetZoneText()Returns:zone—Name <strong>of</strong> the current zone (string)GiveMasterLootAwardsalootitemtoagroupmember.GiveMasterLoot(slot, index)Has no effect if the player is not the loot master or if no loot or c<strong>and</strong>idatematching the given parameters exists.Arguments:slot—Index <strong>of</strong> a loot slot (between 1 <strong>and</strong> GetNumLootItems())(number)index—Index <strong>of</strong> a loot c<strong>and</strong>idate (see GetMasterLootC<strong>and</strong>idate())(number)GlyphMatchesSocketReturns whether a socket is eligible <strong>for</strong> the glyph currently awaiting a target.match = GlyphMatchesSocket(socket)Only valid during glyph application: when the player has activated the glyphitem but be<strong>for</strong>e she has chosen the glyph slot to put it in (i.e. the glowing h<strong>and</strong>cursor is showing).Arguments:socket—Which glyph socket to query (between 1 <strong>and</strong> NUM_GLYPH_SLOTS)(number, glyphIndex)Returns:match—1 if the glyph awaiting a target fits the given socket; nil if it doesn’t fitor if no glyph is awaiting a target (1nil)GrantLevelGrants a level to the player’s Recruit-a-Friend partner.GrantLevel(“unit“)Does not immediately cause the partner character to level up: that player isgiven a chance to accept or decline the <strong>of</strong>fered level.Arguments:unit—Unit to gift a level (string, unitID)GuildControlAddRankAdds a new rank to the player’s guild.GuildControlAddRank(“name“)The newly added rank becomes the lowest rank in the guild.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!