gameobject summoner
Port From (https://github.com/TrinityCore/TrinityCore/commit/5f545f540216d3b94c26e4aeda50c8bb8d5c3d74)
This commit is contained in:
@@ -72,7 +72,7 @@ namespace Scripts.Pets
|
||||
|
||||
if (me.IsSummon() && !me.GetThreatManager().GetFixateTarget())
|
||||
{ // find new target
|
||||
Unit summoner = me.ToTempSummon().GetSummoner();
|
||||
Unit summoner = me.ToTempSummon().GetSummonerUnit();
|
||||
|
||||
List<Unit> targets = new();
|
||||
foreach (var pair in summoner.GetCombatManager().GetPvPCombatRefs())
|
||||
|
||||
@@ -55,9 +55,13 @@ namespace Scripts.Pets
|
||||
{
|
||||
public npc_pet_pri_shadowfiend(Creature creature) : base(creature) { }
|
||||
|
||||
public override void IsSummonedBy(Unit summoner)
|
||||
public override void IsSummonedBy(WorldObject summoner)
|
||||
{
|
||||
if (summoner.HasAura(SpellIds.GlyphOfShadowFiend))
|
||||
Unit unitSummoner = summoner.ToUnit();
|
||||
if (unitSummoner == null)
|
||||
return;
|
||||
|
||||
if (unitSummoner.HasAura(SpellIds.GlyphOfShadowFiend))
|
||||
DoCastAOE(SpellIds.ShadowFiendDeath);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user