mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
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>
This commit is contained in:
@@ -58,7 +58,7 @@ struct npc_pet_hunter_snake_trap : public ScriptedAI
|
||||
me->LoadCreaturesAddon(true);
|
||||
me->SetLootRecipient(nullptr);
|
||||
me->ResetPlayerDamageReq();
|
||||
me->SetLastDamagedTime(0);
|
||||
me->ClearLastLeashExtensionTimePtr();
|
||||
|
||||
me->AddUnitState(UNIT_STATE_EVADE);
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
|
||||
Reference in New Issue
Block a user