From 6113b9dec2e0081c36c36c2974a28ed0693bc601 Mon Sep 17 00:00:00 2001 From: Treeston Date: Sun, 31 Dec 2017 03:23:42 +0100 Subject: 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. --- src/server/game/AI/SmartScripts/SmartAI.cpp | 2 +- src/server/game/AI/SmartScripts/SmartAI.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/game/AI/SmartScripts') diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index 393b748b53a..083d6a8c796 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -555,7 +555,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 43911dda04c..e7ea26891b8 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.h +++ b/src/server/game/AI/SmartScripts/SmartAI.h @@ -83,7 +83,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; -- cgit v1.2.3