From 18bcdbfd7d62fc531366a0532195bf930a0ca696 Mon Sep 17 00:00:00 2001 From: Treeston Date: Sun, 4 Feb 2018 15:03:05 +0100 Subject: [PATCH] AI/SmartAI: Remove a silly incorrect piece of code that was breaking react state swaps on SAI creatures. Fixes #21353. --- src/server/game/AI/SmartScripts/SmartAI.cpp | 5 ----- src/server/game/AI/SmartScripts/SmartAI.h | 3 --- 2 files changed, 8 deletions(-) diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 3933c02e6a6..c18473a0fec 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -545,11 +545,6 @@ void SmartAI::MoveInLineOfSight(Unit* who) CreatureAI::MoveInLineOfSight(who); } -bool SmartAI::CanAIAttack(Unit const* /*who*/) const -{ - return !(me->HasReactState(REACT_PASSIVE)); -} - bool SmartAI::AssistPlayerInCombatAgainst(Unit* who) { if (me->HasReactState(REACT_PASSIVE) || !IsAIControlled()) diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h index b92bac954c3..0ff54e86338 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -145,9 +145,6 @@ class TC_GAME_API SmartAI : public CreatureAI // Called when creature gets charmed by another unit void OnCharmed(bool apply) override; - // Called when victim is in line of sight - bool CanAIAttack(Unit const* who) const override; - // Used in scripts to share variables void DoAction(int32 param = 0) override;