fix(Core/Unit): Reduce mobs speed when low on health (#7932)

This commit is contained in:
patou01 2021-11-04 14:43:24 +01:00 committed by GitHub
parent da42426783
commit ea2c880fc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 9 deletions

View file

@ -115,9 +115,6 @@ namespace Movement
moveFlagsForSpeed &= ~MOVEMENTFLAG_WALKING;
args.velocity = unit->GetSpeed(SelectSpeedType(moveFlagsForSpeed));
if (Creature* creature = unit->ToCreature())
if (creature->HasSearchedAssistance())
args.velocity *= 0.66f;
}
// limit the speed in the same way the client does