aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2018-01-29 01:57:15 +0100
committerShauren <shauren.trinity@gmail.com>2021-06-19 01:35:40 +0200
commit75a3b2f122f04a70f3e9eeed21cbe71d131c425f (patch)
tree13e3ca284c0a68e866b15fadf95e4aec5aa89584
parent428bf60f7fd021cb8d55eb2acbdaa8f3d4969ae7 (diff)
Game/AI: Remove some unused old logic.
(cherry picked from commit c69584a9673ac2edb95b930c024fbd15374cb185)
-rw-r--r--src/server/game/AI/CreatureAI.cpp30
-rw-r--r--src/server/game/AI/CreatureAI.h3
2 files changed, 0 insertions, 33 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())
diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h
index abd18e9e883..30ba99a4abf 100644
--- a/src/server/game/AI/CreatureAI.h
+++ b/src/server/game/AI/CreatureAI.h
@@ -52,9 +52,6 @@ class TC_GAME_API CreatureAI : public UnitAI
Creature* const me;
bool UpdateVictim();
- bool UpdateVictimWithGaze();
-
- void SetGazeOn(Unit* target);
Creature* DoSummon(uint32 entry, Position const& pos, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
Creature* DoSummon(uint32 entry, WorldObject* obj, float radius = 5.0f, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);