WoW:API GetRewardSpell: Difference between revisions
No edit summary |
m (Move page script moved page API GetRewardSpell to API GetRewardSpell without leaving a redirect) |
||
(5 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
Returns | {{wowapi}} | ||
Returns information about spell that you get as reward for completing quest currently in gossip frame. | |||
texture, name, isTradeskillSpell, isSpellLearned = GetRewardSpell() | |||
== Returns == | |||
texture, name, isTradeskillSpell, isSpellLearned | |||
:texture - icon of spell. | |||
:name - name of spell. | |||
:isTradeskillSpell - if spell received is a tradeskill or not. This will be true, for example, for quests that upgrade your secondary professions, like fishing quest from Nat Pagle. | |||
:isSpellLearned - if you actually learn a spell and it will appear in your spellbook (true) or if it will be just cast on you (false). | |||
== Details == | |||
Just as almost any other quest gossip function, GetRewardSpell() returns data that refreshes only when you see corresponding gossip page. Any subsequent calls will return same data until next update. You can watch updates for data returned by GetRewardSpell() by registering for QUEST_DETAIL and QUEST_COMPLETE events. This means that if, for example, you talk to some NPC and check details of quest that offers spell reward and then talk to another NPC and check progress gossip page of quest you've accepted previously that offers spell reward too, this function will still return data of spell from first quest because progress page does not show rewards and their data is not updated. |
Latest revision as of 04:46, 15 August 2023
Returns information about spell that you get as reward for completing quest currently in gossip frame.
texture, name, isTradeskillSpell, isSpellLearned = GetRewardSpell()
Returns[edit]
texture, name, isTradeskillSpell, isSpellLearned
- texture - icon of spell.
- name - name of spell.
- isTradeskillSpell - if spell received is a tradeskill or not. This will be true, for example, for quests that upgrade your secondary professions, like fishing quest from Nat Pagle.
- isSpellLearned - if you actually learn a spell and it will appear in your spellbook (true) or if it will be just cast on you (false).
Details[edit]
Just as almost any other quest gossip function, GetRewardSpell() returns data that refreshes only when you see corresponding gossip page. Any subsequent calls will return same data until next update. You can watch updates for data returned by GetRewardSpell() by registering for QUEST_DETAIL and QUEST_COMPLETE events. This means that if, for example, you talk to some NPC and check details of quest that offers spell reward and then talk to another NPC and check progress gossip page of quest you've accepted previously that offers spell reward too, this function will still return data of spell from first quest because progress page does not show rewards and their data is not updated.