mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Core/MMaps: Revert PATHFIND_INCOMPLETE handling change in ChaseMovementGenerator in 386b5a6fd9 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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user