TrinityCore
Loading...
Searching...
No Matches
MovementPacketSender Class Reference

#include <MovementPacketSender.h>

Static Public Member Functions

static void SendSpeedChangeToMover (Unit *unit, UnitMoveType mtype, float newRate)
 
static void SendSpeedChangeToObservers (Unit *unit, UnitMoveType mtype, float newRate)
 
static void SendSpeedChangeToAll (Unit *unit, UnitMoveType mtype, float newRate)
 
static MovementChangeType GetChangeTypeByMoveType (UnitMoveType moveType)
 

Static Private Attributes

static Opcodes const moveTypeToOpcode [MAX_MOVE_TYPE][3]
 

Detailed Description

movement flag changes for player controlled units:

‍APPLY

{ // Step1 Sent by the server to the mover's client // Step2 Sent back by the mover's client to the server // Step3 Sent to observers (all of these should be renamed to SMSG! Confirmed by sniff analysis) { SMSG_FORCE_MOVE_ROOT, CMSG_FORCE_MOVE_ROOT_ACK, MSG_MOVE_ROOT }, { SMSG_MOVE_WATER_WALK, CMSG_MOVE_WATER_WALK_ACK, MSG_MOVE_WATER_WALK }, { SMSG_MOVE_SET_HOVER, CMSG_MOVE_HOVER_ACK, MSG_MOVE_HOVER }, { SMSG_MOVE_SET_CAN_FLY, CMSG_MOVE_SET_CAN_FLY_ACK, MSG_MOVE_UPDATE_CAN_FLY }, { SMSG_MOVE_SET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY, CMSG_MOVE_SET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY_ACK, MSG_MOVE_UPDATE_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY }, { SMSG_MOVE_FEATHER_FALL, CMSG_MOVE_FEATHER_FALL_ACK, MSG_MOVE_FEATHER_FALL }, { SMSG_MOVE_GRAVITY_DISABLE, CMSG_MOVE_GRAVITY_DISABLE_ACK, MSG_MOVE_GRAVITY_CHNG } },

‍UNAPPLY

{ { SMSG_FORCE_MOVE_UNROOT, CMSG_FORCE_MOVE_UNROOT_ACK, MSG_MOVE_UNROOT }, { SMSG_MOVE_LAND_WALK, CMSG_MOVE_WATER_WALK_ACK, MSG_MOVE_WATER_WALK }, { SMSG_MOVE_UNSET_HOVER, CMSG_MOVE_HOVER_ACK, MSG_MOVE_HOVER }, { SMSG_MOVE_UNSET_CAN_FLY, CMSG_MOVE_SET_CAN_FLY_ACK, MSG_MOVE_UPDATE_CAN_FLY }, { SMSG_MOVE_UNSET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY, CMSG_MOVE_SET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY_ACK, MSG_MOVE_UPDATE_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY }, { SMSG_MOVE_NORMAL_FALL, CMSG_MOVE_FEATHER_FALL_ACK, MSG_MOVE_FEATHER_FALL }, { SMSG_MOVE_GRAVITY_ENABLE, CMSG_MOVE_GRAVITY_ENABLE_ACK, MSG_MOVE_GRAVITY_CHNG } }


Speed changes on player controlled units: // Step1 Sent by the server to the mover's client // Step2 Sent back by the mover's client to the server // Step3 Sent to observers { SMSG_FORCE_WALK_SPEED_CHANGE, CMSG_FORCE_WALK_SPEED_CHANGE_ACK, MSG_MOVE_SET_WALK_SPEED }, { SMSG_FORCE_RUN_SPEED_CHANGE, CMSG_FORCE_RUN_SPEED_CHANGE_ACK, MSG_MOVE_SET_RUN_SPEED }, { SMSG_FORCE_RUN_BACK_SPEED_CHANGE, CMSG_FORCE_RUN_BACK_SPEED_CHANGE_ACK, MSG_MOVE_SET_RUN_BACK_SPEED }, { SMSG_FORCE_SWIM_SPEED_CHANGE, CMSG_FORCE_SWIM_SPEED_CHANGE_ACK, MSG_MOVE_SET_SWIM_SPEED }, { SMSG_FORCE_SWIM_BACK_SPEED_CHANGE, CMSG_FORCE_SWIM_BACK_SPEED_CHANGE_ACK, MSG_MOVE_SET_SWIM_BACK_SPEED }, { SMSG_FORCE_TURN_RATE_CHANGE, CMSG_FORCE_TURN_RATE_CHANGE_ACK, MSG_MOVE_SET_TURN_RATE }, { SMSG_FORCE_FLIGHT_SPEED_CHANGE, CMSG_FORCE_FLIGHT_SPEED_CHANGE_ACK, MSG_MOVE_SET_FLIGHT_SPEED }, { SMSG_FORCE_FLIGHT_BACK_SPEED_CHANGE, CMSG_FORCE_FLIGHT_BACK_SPEED_CHANGE_ACK, MSG_MOVE_SET_FLIGHT_BACK_SPEED }, { SMSG_FORCE_PITCH_RATE_CHANGE, CMSG_FORCE_PITCH_RATE_CHANGE_ACK, MSG_MOVE_SET_PITCH_RATE },


Other type of changes // Step1 Sent by the server to the mover's client // Step2 Sent back by the mover's client to the server // Step3 Sent to observers { SMSG_MOVE_SET_COLLISION_HGT, CMSG_MOVE_SET_COLLISION_HGT_ACK, MSG_MOVE_SET_COLLISION_HGT }, { MSG_MOVE_TELEPORT_ACK, MSG_MOVE_TELEPORT_ACK, MSG_MOVE_TELEPORT }, { SMSG_MOVE_KNOCK_BACK, CMSG_MOVE_KNOCK_BACK_ACK, MSG_MOVE_KNOCK_BACK },


movement flag changes for server controlled units: (these player movement flags have no equivalent in spline: SET_CAN_FLY and SET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY) apply { SMSG_SPLINE_MOVE_GRAVITY_DISABLE, SMSG_SPLINE_MOVE_ROOT, SMSG_SPLINE_MOVE_WATER_WALK, SMSG_SPLINE_MOVE_FEATHER_FALL, SMSG_SPLINE_MOVE_SET_HOVER, } unapply { SMSG_SPLINE_MOVE_GRAVITY_ENABLE, SMSG_SPLINE_MOVE_UNROOT, SMSG_SPLINE_MOVE_LAND_WALK, SMSG_SPLINE_MOVE_NORMAL_FALL, SMSG_SPLINE_MOVE_UNSET_HOVER, }

Definition at line 97 of file MovementPacketSender.h.

Member Function Documentation

◆ GetChangeTypeByMoveType()

MovementChangeType MovementPacketSender::GetChangeTypeByMoveType ( UnitMoveType  moveType)
static
  • knocback *‍/* movement flag change *‍/

Definition at line 40 of file MovementPacketSender.cpp.

+ Here is the caller graph for this function:

◆ SendSpeedChangeToAll()

void MovementPacketSender::SendSpeedChangeToAll ( Unit unit,
UnitMoveType  mtype,
float  newRate 
)
static

Definition at line 94 of file MovementPacketSender.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendSpeedChangeToMover()

void MovementPacketSender::SendSpeedChangeToMover ( Unit unit,
UnitMoveType  mtype,
float  newRate 
)
static
  • height change *‍/* teleport *‍/

Definition at line 58 of file MovementPacketSender.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendSpeedChangeToObservers()

void MovementPacketSender::SendSpeedChangeToObservers ( Unit unit,
UnitMoveType  mtype,
float  newRate 
)
static

Definition at line 81 of file MovementPacketSender.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ moveTypeToOpcode

Opcodes const MovementPacketSender::moveTypeToOpcode
staticprivate
Initial value:
=
{
}
@ SMSG_FORCE_TURN_RATE_CHANGE
Definition Opcodes.h:763
@ MSG_MOVE_SET_SWIM_BACK_SPEED
Definition Opcodes.h:242
@ MSG_MOVE_SET_TURN_RATE
Definition Opcodes.h:245
@ SMSG_FORCE_WALK_SPEED_CHANGE
Definition Opcodes.h:759
@ SMSG_SPLINE_SET_FLIGHT_SPEED
Definition Opcodes.h:930
@ SMSG_FORCE_FLIGHT_BACK_SPEED_CHANGE
Definition Opcodes.h:928
@ MSG_MOVE_SET_PITCH_RATE
Definition Opcodes.h:1144
@ SMSG_SPLINE_SET_SWIM_SPEED
Definition Opcodes.h:797
@ SMSG_FORCE_RUN_SPEED_CHANGE
Definition Opcodes.h:255
@ SMSG_FORCE_SWIM_BACK_SPEED_CHANGE
Definition Opcodes.h:761
@ SMSG_SPLINE_SET_FLIGHT_BACK_SPEED
Definition Opcodes.h:931
@ SMSG_FORCE_RUN_BACK_SPEED_CHANGE
Definition Opcodes.h:257
@ SMSG_FORCE_FLIGHT_SPEED_CHANGE
Definition Opcodes.h:926
@ SMSG_FORCE_SWIM_SPEED_CHANGE
Definition Opcodes.h:259
@ MSG_MOVE_SET_RUN_SPEED
Definition Opcodes.h:234
@ MSG_MOVE_SET_FLIGHT_SPEED
Definition Opcodes.h:923
@ MSG_MOVE_SET_WALK_SPEED
Definition Opcodes.h:238
@ SMSG_SPLINE_SET_WALK_SPEED
Definition Opcodes.h:798
@ SMSG_SPLINE_SET_RUN_BACK_SPEED
Definition Opcodes.h:796
@ MSG_MOVE_SET_SWIM_SPEED
Definition Opcodes.h:240
@ MSG_MOVE_SET_FLIGHT_BACK_SPEED
Definition Opcodes.h:925
@ SMSG_SPLINE_SET_RUN_SPEED
Definition Opcodes.h:795
@ SMSG_FORCE_PITCH_RATE_CHANGE
Definition Opcodes.h:1145
@ SMSG_SPLINE_SET_TURN_RATE
Definition Opcodes.h:800
@ SMSG_SPLINE_SET_PITCH_RATE
Definition Opcodes.h:1147
@ SMSG_SPLINE_SET_SWIM_BACK_SPEED
Definition Opcodes.h:799
@ MSG_MOVE_SET_RUN_BACK_SPEED
Definition Opcodes.h:236

Definition at line 27 of file MovementPacketSender.h.


The documentation for this class was generated from the following files: