gameobject summoner
Port From (https://github.com/TrinityCore/TrinityCore/commit/5f545f540216d3b94c26e4aeda50c8bb8d5c3d74)
This commit is contained in:
@@ -876,10 +876,14 @@ namespace Game.Entities
|
||||
TempSummon summon = creature.ToTempSummon();
|
||||
if (summon != null)
|
||||
{
|
||||
Unit summoner = summon.GetSummoner();
|
||||
WorldObject summoner = summon.GetSummoner();
|
||||
if (summoner != null)
|
||||
if (summoner.IsTypeId(TypeId.Unit) && summoner.IsAIEnabled())
|
||||
summoner.ToCreature().GetAI().SummonedCreatureDies(creature, attacker);
|
||||
{
|
||||
if (summoner.IsCreature())
|
||||
summoner.ToCreature().GetAI()?.SummonedCreatureDies(creature, attacker);
|
||||
else if (summoner.IsGameObject())
|
||||
summoner.ToGameObject().GetAI()?.SummonedCreatureDies(creature, attacker);
|
||||
}
|
||||
}
|
||||
|
||||
// Dungeon specific stuff, only applies to players killing creatures
|
||||
|
||||
Reference in New Issue
Block a user