Core/Quests: implement the option to cast spells upon abandoning quests (#434)
* Core/Quest: Implement a way to cast Spells on Quest Abandon. * Core/Player: add a missing ; * Core/Quest: moved the Abandon Spell away from a own table into quest_template_addon.
This commit is contained in:
5 files changed
+32
-2
No files matched your search
@@ -14595,6 +14595,10 @@ void Player::AbandonQuest(uint32 questId)
|
||||
if (ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(quest->ItemDrop[i]))
|
||||
if (quest->ItemDropQuantity[i] > 0 && itemTemplate->GetBonding() == BIND_QUEST)
|
||||
DestroyItemCount(quest->ItemDrop[i], 9999, true);
|
||||
|
||||
// If Quest has a Abandon Spell cast it now
|
||||
if (quest->GetQuestAbandonSpell() != 0)
|
||||
CastSpell(this, quest->GetQuestAbandonSpell(), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user