mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/SAI: allow to start waypoint movement for a creature that is in combat. (#23426)
(cherry picked from commit d6e3660115)
This commit is contained in:
@@ -45,12 +45,6 @@ bool SmartAI::IsAIControlled() const
|
||||
|
||||
void SmartAI::StartPath(bool run/* = false*/, uint32 pathId/* = 0*/, bool repeat/* = false*/, Unit* invoker/* = nullptr*/, uint32 nodeId/* = 1*/)
|
||||
{
|
||||
if (me->IsEngaged()) // no wp movement in combat
|
||||
{
|
||||
TC_LOG_ERROR("scripts.ai.sai", "SmartAI::StartPath: Creature wanted to start waypoint movement (pathId: %u) while in combat, ignoring. (%s)", pathId, me->GetGUID().ToString().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
if (HasEscortState(SMART_ESCORT_ESCORTING))
|
||||
StopPath();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user