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
@@ -3679,7 +3679,7 @@ namespace Game.Maps
summon.SetCreatedBySpell(spellId);
summon.SetHomePosition(pos);
summon.InitStats(duration);
summon.InitStats(summoner, duration);
summon.SetPrivateObjectOwner(privateObjectOwner);
if (smoothPhasingInfo != null)
@@ -3710,7 +3710,7 @@ namespace Game.Maps
return null;
}
summon.InitSummon();
summon.InitSummon(summoner);
// call MoveInLineOfSight for nearby creatures
AIRelocationNotifier notifier = new(summon);