Skip to content

Commit

Permalink
Prevent Slowing due to health percentage (#5)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Day36512 authored Mar 16, 2024
1 parent c7fd1c8 commit 8f1d46f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/server/game/Entities/Unit/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15311,7 +15311,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.
Expand Down

0 comments on commit 8f1d46f

Please sign in to comment.