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> 741Returns:link—A hyperlink <strong>for</strong> the item (string, hyperlink)GetMerchantItemMaxStackReturns the maximum number <strong>of</strong> an item allowed in a single purchase.maxStack = GetMerchantItemMaxStack(index)Determines the largest value usable <strong>for</strong> the second argument (quantity)<strong>of</strong>BuyMerchantItem() when purchasing the item. For most items, this is thesame as the maximum stack size <strong>of</strong> the item. Returns 1 <strong>for</strong> items purchased inbundles (e.g. food or drink in groups <strong>of</strong> 5, ammunition in groups <strong>of</strong> 200, etc), assuch items can only be purchased one bundle at a time.Arguments:index—Index <strong>of</strong> an item in the vendor’s listing (between 1 <strong>and</strong>GetMerchantNumItems()) (number)Returns:maxStack—Largest number <strong>of</strong> items allowed in a single purchase (number)Example:-- Buys the largest quantity possible in one purchase <strong>for</strong>-- the given indexBuyMerchantItem(index, GetMerchantItemMaxStack(index))GetMerchantNumItemsReturns the number <strong>of</strong> different items available <strong>for</strong> purchase from a vendor.numMerchantItems = GetMerchantNumItems()Returns:numMerchantItems—Number <strong>of</strong> different items available <strong>for</strong> purchase(number)GetMinimapZoneTextReturns the name <strong>of</strong> the current area (as displayed in the Minimap).zoneText = GetMinimapZoneText()Matches GetSubZoneText(), GetRealZoneText() or GetZoneText().Returns:zoneText—Name <strong>of</strong> the area containing the player’s current location (string)GetMirrorTimerInfoReturns in<strong>for</strong>mation about special countdown timers.timer, value, maxvalue, scale, paused, label = GetMirrorTimerInfo(index)Arguments:index—Index <strong>of</strong> an available timer (between 1 <strong>and</strong> MIRRORTIMER_NUMTIMERS)(number)Returns:timer—Non-localized token identifying the type <strong>of</strong> timer (string)

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

Saved successfully!

Ooh no, something went wrong!