From 6ca13239faea4932754cf04f6a7d1de64171f746 Mon Sep 17 00:00:00 2001 From: Dinkledork <118951051+Day36512@users.noreply.github.com> Date: Sat, 2 Mar 2024 17:09:37 -0700 Subject: [PATCH] Prevent Slowing due to health percentage I've noticed wandering bots slow if their health is low much like normal creatures so thought it might be good to add an exception in to make them more player-like. --- src/server/game/Entities/Unit/Unit.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 05b67f50f1080d..961fb58afa3a9c 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -15308,7 +15308,10 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced) && !IsPet() && !(IsControlledByPlayer() && IsVehicle()) && !(creature->HasMechanicTemplateImmunity(MECHANIC_SNARE)) - && !(creature->IsDungeonBoss())) + && !(creature->IsDungeonBoss()) + //npcbots: prevent slowing due to health percentage + && !creature->IsNPCBot()) + //end npcbot { // 1.6% for each % under 30. // use min(0, health-30) so that we don't boost mobs above 30.