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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 27 ■ API <strong>Reference</strong> 603Only protected (i.e. usable only by the Blizzard UI) if the given spell is castable(not passive) <strong>and</strong> is not a trade skill; can be used by addons to cast the ‘‘spells’’that open trade skill windows.ProtectedArguments:spellID—ID <strong>of</strong> the spell to cast (number, spellID)target (optional)—A unit to target with the spell (string, unitID)CastSpellByNameCasts a spell specified by name (optionally on a specified unit).CastSpellByName(“name“ [, “target“])Only protected (i.e. usable only by the Blizzard UI) if the given spell is castable(not passive) <strong>and</strong> is not a trade skill; can be used by addons to cast the ‘‘spells’’that open trade skill windows.No CombatArguments:name—Name <strong>of</strong> a spell to cast (string)target (optional)—A unit to target with the spell (string, unitID)ChangeActionBarPageChanges the current action bar page.ChangeActionBarPage(page)Arguments:page—The action bar page to change to (number)ChangeChatColorChanges the color associated with a chat message type.ChangeChatColor(“messageGroup“, red, green, blue)Arguments:messageGroup—Token identifying a message type (string, chatMsgType)red—Redcomponent<strong>of</strong>thecolorvalue(0.0-1.0)(number)green—Red component <strong>of</strong> the color value (0.0 - 1.0) (number)blue—Redcomponent<strong>of</strong>thecolorvalue(0.0-1.0)(number)ChannelBanBans a character from a chat channel.ChannelBan(“channel“, “fullname“)Has no effect unless the player is a moderator <strong>of</strong> the given channelArguments:channel—Name <strong>of</strong> the channel (string)fullname—Name <strong>of</strong> the character to be banned (string)ChannelInviteInvites a character to join a chat channel.ChannelInvite(“channel“, “name“)

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

Saved successfully!

Ooh no, something went wrong!