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.

950 Part IV ■ <strong>Reference</strong>ProtectedProtectedSpellStopTargetingCancels the spell currently awaiting a target.When auto-self cast is not enabled <strong>and</strong> the player casts a spell that requires atarget, the cursor changes to a glowing h<strong>and</strong> so the user can select a target. Thisfunction cancels targeting mode so the player can cast another spell.SpellTargetItemCasts the spell currently awaiting a target on an item.SpellTargetItem(itemID) or SpellTargetItem(“itemName“) or iSpellTargetItem(“itemLink“)Usable when the player has attempted to cast a spell (e.g. an Enchanting recipeor the ‘‘Use:’’ effect <strong>of</strong> a sharpening stone or fishing lure) but the spell requiresa target be<strong>for</strong>e it can begin casting (i.e. the glowing h<strong>and</strong> cursor is showing).ProtectedArguments:itemID—An item’s ID (number)itemName—An item’s name (string)itemLink—An item’s hyperlink, or any string containing the itemString portion<strong>of</strong> an item link (string)SpellTargetUnitCasts the spell currently awaiting a target on a unit.SpellTargetUnit(“unit“) or SpellTargetUnit(“name“)Arguments:unit—A unit to target (string, unitID)name—The name <strong>of</strong> a unit to target; only valid <strong>for</strong> player, pet, <strong>and</strong> party/raidmembers (string)SplitContainerItemPicks up only part <strong>of</strong> a stack <strong>of</strong> items from one <strong>of</strong> the player’s bags or othercontainers.SplitContainerItem(container, slot, amount)Has no effect if the given amount is greater than the number <strong>of</strong> items stacked inthe slot.Arguments:container—Index <strong>of</strong> one <strong>of</strong> the player’s bags or other containers (number,containerID)slot—Index <strong>of</strong> an item slot within the container (number, containerSlotID)amount—Number <strong>of</strong> items from the stack to pick up (number)SplitGuildBankItemPicks up only part <strong>of</strong> a stack <strong>of</strong> items from the guild bank.SplitGuildBankItem(tab, slot, amount)Has no effect if the given amount is greater than the number <strong>of</strong> items stacked inthe slot.

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

Saved successfully!

Ooh no, something went wrong!