Core/AI: Add a new LeavingWorld AI hook

Port From (https://github.com/TrinityCore/TrinityCore/commit/2642fb1a489e4b79a17bbb63127c8b3ce2823e1e)
This commit is contained in:
hondacrx
2021-10-08 10:33:53 -04:00
parent f8990e440b
commit 72018b983c
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -435,6 +435,9 @@ namespace Game.Entities
if (IsInWorld)
{
m_duringRemoveFromWorld = true;
if (IsAIEnabled)
GetAI().LeavingWorld();
if (IsVehicle())
RemoveVehicleKit(true);