Core/SAI: Support SMART_TARGET_POSITION in SMART_ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER

Port From (https://github.com/TrinityCore/TrinityCore/commit/a270005de1122d18ea4b4e01b114a87bc0e7c0eb)
This commit is contained in:
hondacrx
2022-02-27 15:07:03 -05:00
parent d4a339f29a
commit 9f72f655ab
2 changed files with 24 additions and 11 deletions
+2 -2
View File
@@ -1442,12 +1442,12 @@ namespace Game.Entities
return null;
}
public TempSummon SummonPersonalClone(TempSummonType despawnType = TempSummonType.ManualDespawn, uint despawnTime = 0, uint vehId = 0, uint spellId = 0, ObjectGuid privateObjectOwner = default)
public TempSummon SummonPersonalClone(Position pos, 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);
TempSummon summon = map.SummonCreature(GetEntry(), pos, null, despawnTime, this, spellId, vehId, privateObjectOwner);
if (summon != null)
{
summon.SetTempSummonType(despawnType);