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:
sevi authored and GitHub committed 2023-12-01 16:07:39 +01:00
1 parent b4811b7a5d
commit 986c129bc0
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);
}
}