mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
fix(Core/Pet): Standardize pet run speed at 115% rate. (#9478)
Fixes #9230
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "Pet.h"
|
||||
#include "Player.h"
|
||||
#include "PoolMgr.h"
|
||||
#include "ScriptedGossip.h"
|
||||
@@ -408,8 +409,17 @@ bool Creature::InitEntry(uint32 Entry, const CreatureData* data)
|
||||
|
||||
SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0f);
|
||||
|
||||
SetSpeed(MOVE_WALK, cinfo->speed_walk);
|
||||
SetSpeed(MOVE_RUN, cinfo->speed_run);
|
||||
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_SWIM, 1.0f); // using 1.0 rate
|
||||
SetSpeed(MOVE_FLIGHT, 1.0f); // using 1.0 rate
|
||||
|
||||
|
||||
Reference in New Issue
Block a user