Core/Creatures: Added possibility to automatically despawn personal summons on quest remove

Port From (https://github.com/TrinityCore/TrinityCore/commit/b3dce0ac08d4f740505037aff2cad7685444db15)
This commit is contained in:
hondacrx
2024-02-05 17:36:50 -05:00
parent 9546ef12eb
commit aa696fb176
7 changed files with 52 additions and 5 deletions
+1
View File
@@ -437,6 +437,7 @@ namespace Game
GetPlayer().TakeQuestSourceItem(questId, true); // remove quest src item from player
GetPlayer().AbandonQuest(questId); // remove all quest items player received before abandoning quest. Note, this does not remove normal drop items that happen to be quest requirements.
GetPlayer().RemoveActiveQuest(questId);
GetPlayer().DespawnPersonalSummonsForQuest(questId);
Log.outInfo(LogFilter.Network, "Player {0} abandoned quest {1}", GetPlayer().GetGUID().ToString(), questId);