aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Pet
diff options
context:
space:
mode:
authorChaouki Dhib <chaodhib@gmail.com>2016-04-16 01:36:32 +0200
committerTreeston <treeston.mmoc@gmail.com>2016-04-16 01:36:32 +0200
commitdc3327f9c5f80c36000356829159c060d916f62b (patch)
treeae3c2cca31cb576ffc227fd182ef762b7e6a2f0a /src/server/scripts/Pet
parent22c0a5426416ffb6feb48f6109e93e9a7cdf6840 (diff)
Core/Movement: Clean up and improvements on Unit::SetSpeed (#16843)
- Clean up of Unit::SetSpeed (mostly cherry picks from the 6.x branch): - the opcode sent depends on the unit. until now, MSG_MOVE_SET_* were sent for every units which isn't like retail behavior. - Removed the unused method parameter "forced" from Unit::SetSpeed - Renamed Unit::SetSpeed to SetSpeedRate - Removed the unused method parameter "forced" from Unit::UpdateSpeed - Added utility method Unit::SetSpeed which take the new flat value.
Diffstat (limited to 'src/server/scripts/Pet')
-rw-r--r--src/server/scripts/Pet/pet_dk.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/scripts/Pet/pet_dk.cpp b/src/server/scripts/Pet/pet_dk.cpp
index 80b3a00774b..113b14a0d54 100644
--- a/src/server/scripts/Pet/pet_dk.cpp
+++ b/src/server/scripts/Pet/pet_dk.cpp
@@ -103,8 +103,8 @@ class npc_pet_dk_ebon_gargoyle : public CreatureScript
//! HACK: Creature's can't have MOVEMENTFLAG_FLYING
// Fly Away
me->SetCanFly(true);
- me->SetSpeed(MOVE_FLIGHT, 0.75f, true);
- me->SetSpeed(MOVE_RUN, 0.75f, true);
+ me->SetSpeedRate(MOVE_FLIGHT, 0.75f);
+ me->SetSpeedRate(MOVE_RUN, 0.75f);
float x = me->GetPositionX() + 20 * std::cos(me->GetOrientation());
float y = me->GetPositionY() + 20 * std::sin(me->GetOrientation());
float z = me->GetPositionZ() + 40;