fix(Core/Pet): Fixed set hunter pet's speed on load. (#15206)

This commit is contained in:
UltraNix
2023-03-04 21:41:10 +01:00
committed by GitHub
parent d68913d1df
commit ac0581bd43
3 changed files with 18 additions and 17 deletions

View File

@@ -459,17 +459,8 @@ bool Creature::InitEntry(uint32 Entry, const CreatureData* data)
SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0f);
float runSpeed = cinfo->speed_run;
if (Pet* pet = ToPet())
{
if (pet->isControlled() && pet->GetOwnerGUID().IsPlayer())
{
runSpeed = 1.15f;
}
}
SetSpeed(MOVE_WALK, cinfo->speed_walk);
SetSpeed(MOVE_RUN, runSpeed);
SetSpeed(MOVE_RUN, cinfo->speed_run);
SetSpeed(MOVE_SWIM, cinfo->speed_swim);
SetSpeed(MOVE_FLIGHT, cinfo->speed_flight);