Core/Creature: temporary summons are now dynamic flagged (oversight in dynspawn). This fixes issues with vehicle kit resets breaking AI.

Port From (https://github.com/TrinityCore/TrinityCore/commit/22b754c9e22cfdd9dab998ca45e6724b62760f78)
This commit is contained in:
hondacrx
2020-08-24 19:13:15 -04:00
parent a27c86a385
commit 35c13d69ca
3 changed files with 15 additions and 24 deletions
+9 -3
View File
@@ -213,7 +213,12 @@ namespace Game.Entities
SaveRespawnTime(0, false);
}
AddObjectToRemoveList();
TempSummon summon = ToTempSummon();
if (summon != null)
summon.UnSummon();
else
AddObjectToRemoveList();
}
}
@@ -416,10 +421,11 @@ namespace Game.Entities
{
if (IsAIEnabled && triggerJustAppeared && m_deathState == DeathState.Alive)
{
triggerJustAppeared = false;
GetAI().JustAppeared();
if (m_respawnCompatibilityMode && VehicleKit != null)
VehicleKit.Reset();
triggerJustAppeared = false;
GetAI().JustAppeared();
}
UpdateMovementFlags();