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> 773index—Which item to query (from 1 to GetNumQuestChoices(), GetNumQuestItems(), or GetNumQuestRewards(), depending on the value <strong>of</strong> theitemType argument) (number)Returns:name—The name <strong>of</strong> the item (string)texture—Path to a texture <strong>for</strong> the item’s icon (string)numItems—Number <strong>of</strong> the item required or rewarded (number)quality—The quality <strong>of</strong> the item (number)0—Poor4—Epic1—Common5—Legendary2—Uncommon6—Artifact3—RareisUsable—1 if the player can currently use/equip the item; otherwise nil(1nil)GetQuestItemLinkReturns a hyperlink <strong>for</strong> an item in a questgiver dialog.link = GetQuestItemLink(“itemType“, index)Only valid when the questgiver UI is showing the accept/decline, progress, orcompletion stages <strong>of</strong> a quest dialog (between the QUEST_DETAIL <strong>and</strong>QUEST_FINISHED, QUEST_PROGRESS <strong>and</strong> QUEST_FINISHED,orQUEST_COMPLETE <strong>and</strong> QUEST_FINISHED events); otherwise may return nil ora value from the most recently displayed quest.Arguments:itemType—Token identifying one <strong>of</strong> the possible sets <strong>of</strong> items (string)choice—Items from which the player may choose a rewardrequired—Items required to complete the questreward—Items given as reward <strong>for</strong> the questindex—Index <strong>of</strong> an item in the set (between 1 <strong>and</strong> GetNumQuestChoices(),GetNumQuestItems(),orGetNumQuestRewards(), according to itemType)(number)Returns:link—A hyperlink <strong>for</strong> the item (string)GetQuestLinkReturns a hyperlink <strong>for</strong> an entry in the player’s quest log.link = GetQuestLink(questIndex)Arguments:questIndex—Index <strong>of</strong> a quest in the quest log (between 1 <strong>and</strong>GetNumQuestLogEntries()) (number)Returns:link—A hyperlink <strong>for</strong> the quest (string, hyperlink)

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

Saved successfully!

Ooh no, something went wrong!