aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/SmartScripts
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2017-12-31 03:23:42 +0100
committerShauren <shauren.trinity@gmail.com>2021-04-16 20:22:13 +0200
commitbce43de7f3fba618c370f2aba327d23dd30d1cdd (patch)
tree85b786bfa8f5103aaafa0ec01e93b337c29d4a15 /src/server/game/AI/SmartScripts
parent8eb3c61f1aea5610cf68fb622f41850d2b934c51 (diff)
Core/AI: Some more refactoring prep for #19930. CreatureAI::EnterCombat is now called CreatureAI::JustEngagedWith. There's also two new methods on UnitAI, though they're never invoked right now.
(cherry picked from commit 6113b9dec2e0081c36c36c2974a28ed0693bc601)
Diffstat (limited to 'src/server/game/AI/SmartScripts')
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp2
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 6ee8f6faefb..1651c794412 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -557,7 +557,7 @@ void SmartAI::JustReachedHome()
me->GetMotionMaster()->MoveIdle(); // wait the order of leader
}
-void SmartAI::EnterCombat(Unit* enemy)
+void SmartAI::JustEngagedWith(Unit* enemy)
{
if (IsAIControlled())
me->InterruptNonMeleeSpells(false); // must be before ProcessEvents
diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h
index 596625d7b4d..10aa34cc4a1 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.h
+++ b/src/server/game/AI/SmartScripts/SmartAI.h
@@ -84,7 +84,7 @@ class TC_GAME_API SmartAI : public CreatureAI
void JustReachedHome() override;
// Called for reaction at enter to combat if not in combat yet (enemy can be nullptr)
- void EnterCombat(Unit* enemy) override;
+ void JustEngagedWith(Unit* enemy) override;
// Called for reaction at stopping attack at no attackers or targets
void EnterEvadeMode(EvadeReason why = EVADE_REASON_OTHER) override;