Core/Objects: Move personal summon handling from TemporarySummon/GameObject to WorldObject and check it using dedicated guid field
Port From (https://github.com/TrinityCore/TrinityCore/commit/1082a6645e96c611b3145b5d6208fc4db6e4b2d3)
This commit is contained in:
@@ -3913,7 +3913,7 @@ namespace Game.Maps
|
||||
}
|
||||
}
|
||||
|
||||
public TempSummon SummonCreature(uint entry, Position pos, SummonPropertiesRecord properties = null, uint duration = 0, Unit summoner = null, uint spellId = 0, uint vehId = 0, bool visibleBySummonerOnly = false)
|
||||
public TempSummon SummonCreature(uint entry, Position pos, SummonPropertiesRecord properties = null, uint duration = 0, Unit summoner = null, uint spellId = 0, uint vehId = 0, bool personalSpawn = false)
|
||||
{
|
||||
var mask = UnitTypeMask.Summon;
|
||||
if (properties != null)
|
||||
@@ -3995,7 +3995,9 @@ namespace Game.Maps
|
||||
summon.SetCreatedBySpell(spellId);
|
||||
summon.SetHomePosition(pos);
|
||||
summon.InitStats(duration);
|
||||
summon.SetVisibleBySummonerOnly(visibleBySummonerOnly);
|
||||
|
||||
if (personalSpawn && summoner != null)
|
||||
summon.SetPrivateObjectOwner(summoner.IsPrivateObject() ? summoner.GetPrivateObjectOwner() : summoner.GetGUID());
|
||||
|
||||
AddToMap(summon.ToCreature());
|
||||
summon.InitSummon();
|
||||
|
||||
Reference in New Issue
Block a user