Core/SAI: Add SMART_ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER

Port From (https://github.com/TrinityCore/TrinityCore/commit/f383c0ea214cc4da2d02b81e26297d77ff59c7ed)
This commit is contained in:
hondacrx
2022-02-27 14:29:40 -05:00
parent a36cc8ba2e
commit 6df3ca3a3b
5 changed files with 65 additions and 6 deletions
@@ -1442,6 +1442,22 @@ namespace Game.Entities
return null;
}
public TempSummon SummonPersonalClone(TempSummonType despawnType = TempSummonType.ManualDespawn, uint despawnTime = 0, uint vehId = 0, uint spellId = 0, ObjectGuid privateObjectOwner = default)
{
Map map = GetMap();
if (map != null)
{
TempSummon summon = map.SummonCreature(GetEntry(), GetPosition(), null, despawnTime, this, spellId, vehId, privateObjectOwner);
if (summon != null)
{
summon.SetTempSummonType(despawnType);
return summon;
}
}
return null;
}
public GameObject SummonGameObject(uint entry, float x, float y, float z, float ang, Quaternion rotation, uint respawnTime, GameObjectSummonType summonType = GameObjectSummonType.TimedOrCorpseDespawn)
{
if (x == 0 && y == 0 && z == 0)