Skip to content

Commit

Permalink
Prevent Slowing due to health percentage
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 3, 2024
1 parent 595a4c5 commit 6ca1323
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 @@ -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.
Expand Down

0 comments on commit 6ca1323

Please sign in to comment.