Core/Objects: Use player as summoner for personal clones

Port From (https://github.com/TrinityCore/TrinityCore/commit/79c605436942d652c50e4cfeac9d1b20a86a2343)
This commit is contained in:
hondacrx
2022-05-05 10:02:40 -04:00
parent fcdcb69fe5
commit 39ec9e309f
3 changed files with 29 additions and 17 deletions
+2 -2
View File
@@ -1473,12 +1473,12 @@ namespace Game.Entities
return null;
}
public TempSummon SummonPersonalClone(Position pos, TempSummonType despawnType = TempSummonType.ManualDespawn, TimeSpan despawnTime = default, uint vehId = 0, uint spellId = 0, ObjectGuid privateObjectOwner = default)
public TempSummon SummonPersonalClone(Position pos, TempSummonType despawnType = TempSummonType.ManualDespawn, TimeSpan despawnTime = default, uint vehId = 0, uint spellId = 0, Player privateObjectOwner = null)
{
Map map = GetMap();
if (map != null)
{
TempSummon summon = map.SummonCreature(GetEntry(), pos, null, (uint)despawnTime.TotalMilliseconds, this, spellId, vehId, privateObjectOwner, new SmoothPhasingInfo(GetGUID(), true, true));
TempSummon summon = map.SummonCreature(GetEntry(), pos, null, (uint)despawnTime.TotalMilliseconds, privateObjectOwner, spellId, vehId, privateObjectOwner.GetGUID(), new SmoothPhasingInfo(GetGUID(), true, true));
if (summon != null)
{
summon.SetTempSummonType(despawnType);