summaryrefslogtreecommitdiff
path: root/src/server/game/AI/CreatureAI.cpp
diff options
context:
space:
mode:
authorBenjamin Jackson <38561765+heyitsbench@users.noreply.github.com>2024-09-03 15:08:56 -0400
committerGitHub <noreply@github.com>2024-09-03 21:08:56 +0200
commitbf18b9bdfb26fd94cd4dfbd6a911ebae5db98569 (patch)
tree76c2e6e9c01a5499688434473dbfbcf110f19ea4 /src/server/game/AI/CreatureAI.cpp
parent1edac37ac37dfbfdc5f4d1ba36140dc077f06236 (diff)
fix(Core/AI): Improve creature leashing behavior. (#19751)
* Init. https: //github.com/vmangos/core/commit/7d2f1e2923734ea1b983eeaa0208cfd158d4af02 Co-Authored-By: ratkosrb <35845488+ratkosrb@users.noreply.github.com> * Hackfix for pets. * Whoops. * Correct evade uses. * Conflict. * Actually fix grace timer. * Add visibility distance check. Creatures should always fail combat checks in the open world if they're outside of visibility distance, might not be the case for worldbosses. --------- Co-authored-by: ratkosrb <35845488+ratkosrb@users.noreply.github.com>
Diffstat (limited to 'src/server/game/AI/CreatureAI.cpp')
-rw-r--r--src/server/game/AI/CreatureAI.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index 52c1da79d7..17daed82d1 100644
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
@@ -307,7 +307,7 @@ bool CreatureAI::_EnterEvadeMode(EvadeReason /*why*/)
me->LoadCreaturesAddon(true);
me->SetLootRecipient(nullptr);
me->ResetPlayerDamageReq();
- me->SetLastDamagedTime(0);
+ me->ClearLastLeashExtensionTimePtr();
me->SetCannotReachTarget();
if (ZoneScript* zoneScript = me->GetZoneScript() ? me->GetZoneScript() : (ZoneScript*)me->GetInstanceScript())