hondacrx
2021-12-07 20:42:47 -05:00
parent b7e4c2fd76
commit c37e1c9f7d
17 changed files with 91 additions and 46 deletions
+1 -1
View File
@@ -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())
+6 -2
View File
@@ -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);
}
}
+6 -2
View File
@@ -311,10 +311,14 @@ namespace Scripts.World.EmeraldDragons
public npc_spirit_shade(Creature creature) : base(creature) { }
public override void IsSummonedBy(Unit summoner)
public override void IsSummonedBy(WorldObject summoner)
{
Unit unitSummoner = summoner.ToUnit();
if (unitSummoner == null)
return;
_summonerGuid = summoner.GetGUID();
me.GetMotionMaster().MoveFollow(summoner, 0.0f, 0.0f);
me.GetMotionMaster().MoveFollow(unitSummoner, 0.0f, 0.0f);
}
public override void MovementInform(MovementGeneratorType moveType, uint data)
+2 -2
View File
@@ -522,7 +522,7 @@ namespace Scripts.World.NpcSpecial
return null;
}
public void UpdateAI(uint diff)
public override void UpdateAI(uint diff)
{
base.UpdateAI(diff);
@@ -2044,7 +2044,7 @@ namespace Scripts.World.NpcSpecial
summonerGUID.Clear();
}
public override void IsSummonedBy(Unit summoner)
public override void IsSummonedBy(WorldObject summoner)
{
if (summoner.IsTypeId(TypeId.Player))
{