diff options
Diffstat (limited to 'src/server/game/AI/CreatureAI.cpp')
-rw-r--r-- | src/server/game/AI/CreatureAI.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index 1b5b6809e8d..87ad5851e39 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -194,36 +194,6 @@ void CreatureAI::EnterEvadeMode(EvadeReason why) me->GetVehicleKit()->Reset(true); } -void CreatureAI::SetGazeOn(Unit* target) -{ - if (me->IsValidAttackTarget(target)) - { - if (!me->IsFocusing(nullptr, true) && target != me->GetVictim()) - AttackStart(target); - me->SetReactState(REACT_PASSIVE); - } -} - -bool CreatureAI::UpdateVictimWithGaze() -{ - if (!me->IsEngaged()) - return false; - - if (me->HasReactState(REACT_PASSIVE)) - { - if (me->GetVictim()) - return true; - else - me->SetReactState(REACT_AGGRESSIVE); - } - - if (Unit* victim = me->SelectVictim()) - if (!me->IsFocusing(nullptr, true) && victim != me->GetVictim()) - AttackStart(victim); - - return me->GetVictim() != nullptr; -} - bool CreatureAI::UpdateVictim() { if (!me->IsEngaged()) |