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> 563Causes an error message (UI_ERROR_MESSAGE) if the item on the cursor cannotbe equipped. Does nothing if the cursor does not contain an item.AutoLootMailItemAutomatically takes any attached items <strong>and</strong> money from a mail message.AutoLootMailItem(mailID)If the message does not have body text (which can be saved as a permanentcopy), also deletes the message.Arguments:mailID—Index <strong>of</strong> a message in the player’s inbox (between 1 <strong>and</strong>GetInboxNumItems()) (number)AutoStoreGuildBankItemWithdraws the item(s) from a slot in the guild bank, automatically adding tothe player’s bags.AutoStoreGuildBankItem(tab, slot)Arguments:tab—Index <strong>of</strong> a guild bank tab (between 1 <strong>and</strong> GetNumGuildBankTabs())(number)slot—Index <strong>of</strong> an item slot in the guild bank tab (between 1 <strong>and</strong>MAX_GUILDBANK_SLOTS_PER_TAB) (number)BankButtonIDToInvSlotIDReturns the inventoryID corresponding to a bank item or bag slot.inventoryID = BankButtonIDToInvSlotID(buttonID [, isBag])Arguments:buttonID—Numeric ID <strong>of</strong> an item or bag slot in the bank UI (number)isBag (optional)—1 if the given ID corresponds to a bank bag slot; nil if the IDcorresponds to an item slot (1nil)Returns:inventoryID—An inventory slot ID usable with various Inventory API functions(number, inventoryID)Example:-- While mousing over a button in the banklocal button = GetMouseFocus()print(“Inventory Slot:“, BankButtonIDToInvSlotID(button:GetID(),ibutton.isBag))ConfirmationBarberShopResetResets barber shop options to the currently worn styles.Changes the underlying data (<strong>and</strong> thus the character’s appearance) only; thedefault barbershop UI does not update.BindEnchantConfirms enchanting an item (when the item will become soulbound as aresult).

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

Saved successfully!

Ooh no, something went wrong!