From 0b64a60d5ce91f07276ab2f06363b9f10effad48 Mon Sep 17 00:00:00 2001 From: Treeston Date: Mon, 29 Jan 2018 01:57:15 +0100 Subject: [PATCH] Game/AI: Remove some unused old logic. # Conflicts: # src/server/game/AI/CreatureAI.cpp --- src/server/game/AI/CreatureAI.cpp | 30 ------------------------------ src/server/game/AI/CreatureAI.h | 3 --- 2 files changed, 33 deletions(-) diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index 285e8efb020..6dc57a4747b 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -244,36 +244,6 @@ void CreatureAI::EnterEvadeMode(EvadeReason why) Reset(); } -void CreatureAI::SetGazeOn(Unit* target) -{ - if (me->IsValidAttackTarget(target)) - { - if (!me->HasSpellFocus() && 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->HasSpellFocus() && 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 706abff452e..77acc6f27fd 100644 --- a/src/server/game/AI/CreatureAI.h +++ b/src/server/game/AI/CreatureAI.h @@ -75,9 +75,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);