AI/TotemAI: Tell Shaman Totems to stay put and stop moving.

Port From (https://github.com/TrinityCore/TrinityCore/commit/007eb8c9311320217fdda0bc0e6c05044254edfe)
This commit is contained in:
hondacrx
2021-12-24 20:20:05 -05:00
parent 925119c2ca
commit bd3768c4ef
3 changed files with 28 additions and 20 deletions
+1
View File
@@ -90,6 +90,7 @@ namespace Game.AI
public override void MoveInLineOfSight(Unit unit) { }
public override void AttackStart(Unit unit) { }
public override void UpdateAI(uint diff) { }
public override void JustAppeared() { }
public override void EnterEvadeMode(EvadeReason why) { }
public override void OnCharmed(bool isNew) { }
}
+2 -1
View File
@@ -534,7 +534,7 @@ namespace Game.AI
break;
case TextEmotes.Soothe:
if (me.IsPet() && me.ToPet().IsPetGhoul())
me.HandleEmoteCommand( Emote.OneshotOmnicastGhoul);
me.HandleEmoteCommand(Emote.OneshotOmnicastGhoul);
break;
}
}
@@ -637,6 +637,7 @@ namespace Game.AI
// default CreatureAI functions which interfere with the PetAI
public override void MoveInLineOfSight(Unit who) { }
public override void MoveInLineOfSight_Safe(Unit who) { }
public override void JustAppeared() { } // we will control following manually
public override void EnterEvadeMode(EvadeReason why) { }
}
}
+7 -1
View File
@@ -25,11 +25,15 @@ namespace Game.AI
{
ObjectGuid _victimGuid;
public TotemAI(Creature c) : base(c)
public TotemAI(Creature creature) : base(creature)
{
_victimGuid = ObjectGuid.Empty;
}
public override void MoveInLineOfSight(Unit who) { }
public override void JustAppeared() { }
public override void EnterEvadeMode(EvadeReason why)
{
me.CombatStop(true);
@@ -77,5 +81,7 @@ namespace Game.AI
else
_victimGuid.Clear();
}
public override void AttackStart(Unit victim) { }
}
}