aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2019-04-28 14:50:33 +0200
committerShauren <shauren.trinity@gmail.com>2021-12-02 00:39:28 +0100
commit841f0452a4e8a6cbf694bb829cd7e573d4c26385 (patch)
tree6e1818541b18bd33c79c035d0e2711963fb1a4db /src
parenta4fcfbb3afe388f90725734b0180ad8322277b7d (diff)
Core/MMaps: Revert PATHFIND_INCOMPLETE handling change in ChaseMovementGenerator in 386b5a6fd948b4866cbd9a8a9892e8777922e9c9 since the current hp reset code in Creature::Update() will reset the hp of bosses as soon as CanNotReachTarget() is true. In case of boss mechanics like Abub'Rekhan at Naxx where the boss throws the player in the air, a PATHFIND_INCOMPLETE path is returned.
The code in Creature::Update() should be modified to wait a few seconds before resetting the hp. PATHFIND_NOPATH / PATHFIND_INCOMPLETE don't really mean that the Creature can't attack the player anyway either. (cherry picked from commit d910ffd77949f422bd08f12079866962fb53c4dc)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Movement/MovementGenerators/ChaseMovementGenerator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Movement/MovementGenerators/ChaseMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/ChaseMovementGenerator.cpp
index 91dae255eda..0e22919e155 100644
--- a/src/server/game/Movement/MovementGenerators/ChaseMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/ChaseMovementGenerator.cpp
@@ -185,7 +185,7 @@ bool ChaseMovementGenerator::Update(Unit* owner, uint32 diff)
owner->UpdateAllowedPositionZ(x, y, z);
bool success = _path->CalculatePath(x, y, z, owner->CanFly());
- if (!success || (_path->GetPathType() & (PATHFIND_NOPATH | PATHFIND_INCOMPLETE)))
+ if (!success || (_path->GetPathType() & (PATHFIND_NOPATH /* | PATHFIND_INCOMPLETE*/)))
{
if (cOwner)
cOwner->SetCannotReachTarget(true);