Core/Creatures: Allow summons to be initialized properly when summoner is not in world yet

Port From (https://github.com/TrinityCore/TrinityCore/commit/7881f0ef5ff79b691a5abb9cd727755f49afba47)
This commit is contained in:
hondacrx
2023-05-30 05:08:45 -04:00
parent 12fabb103c
commit 11575d6d39
4 changed files with 37 additions and 39 deletions
+2 -2
View File
@@ -532,14 +532,14 @@ namespace Game.Entities
// because the current GameObjectModel cannot be moved without recreating
summon.AddUnitState(UnitState.IgnorePathfinding);
summon.InitStats(duration);
summon.InitStats(summoner, duration);
if (!map.AddToMap(summon))
return null;
_staticPassengers.Add(summon);
summon.InitSummon();
summon.InitSummon(summoner);
summon.SetTempSummonType(summonType);
return summon;