aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities/Unit
diff options
context:
space:
mode:
authorDDuarte <dnpd.dd@gmail.com>2014-10-25 15:41:42 +0100
committerDDuarte <dnpd.dd@gmail.com>2014-10-25 15:42:16 +0100
commitf37e5b9afd6b9d45afaf2c951d4fac0b72832865 (patch)
tree79e76963809a2bc512dd3ef43056fb106816dae3 /src/server/game/Entities/Unit
parentc67fa90f3e4afd95141546676a959e89d2ac73ef (diff)
Core/Opcodes: Support opcodes with the same ids and different direction
- Split enum Opcodes in enum OpcodeMisc/OpcodeClient/OpcodeServer - Old MSGs are temporarly in the enum OpcodeClient - Split _internalTable of OpcodeTable in two tables, one for CMSG opcodes and another for SMSG opcodes Note: most added static_cast<OpcodeX> will be removed once WorldPacket is split in two classes (ServerPacket/ClientPacket, see #13434)
Diffstat (limited to 'src/server/game/Entities/Unit')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 601194dc2d1..6ff17c9b7cc 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -10768,7 +10768,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
propagateSpeedChange();
- static Opcodes const moveTypeToOpcode[MAX_MOVE_TYPE][3] =
+ static OpcodeServer const moveTypeToOpcode[MAX_MOVE_TYPE][3] =
{
{SMSG_SPLINE_MOVE_SET_WALK_SPEED, SMSG_MOVE_SET_WALK_SPEED, SMSG_MOVE_UPDATE_WALK_SPEED },
{SMSG_SPLINE_MOVE_SET_RUN_SPEED, SMSG_MOVE_SET_RUN_SPEED, SMSG_MOVE_UPDATE_RUN_SPEED },
@@ -15613,7 +15613,7 @@ void Unit::WriteMovementInfo(WorldPacket& data, Movement::ExtraMovementStatusEle
MovementStatusElements const* sequence = GetMovementStatusElementsSequence(data.GetOpcode());
if (!sequence)
{
- TC_LOG_ERROR("network", "Unit::WriteMovementInfo: No movement sequence found for opcode %s", GetOpcodeNameForLogging(data.GetOpcode()).c_str());
+ TC_LOG_ERROR("network", "Unit::WriteMovementInfo: No movement sequence found for opcode %s", GetOpcodeNameForLogging(static_cast<OpcodeServer>(data.GetOpcode())).c_str());
return;
}
@@ -16317,9 +16317,9 @@ bool Unit::SetSwim(bool enable)
RemoveUnitMovementFlag(MOVEMENTFLAG_SWIMMING);
if (enable)
- Movement::PacketSender(this, SMSG_SPLINE_MOVE_START_SWIM, NULL_OPCODE).Send();
+ Movement::PacketSender(this, SMSG_SPLINE_MOVE_START_SWIM, static_cast<OpcodeServer>(NULL_OPCODE)).Send();
else
- Movement::PacketSender(this, SMSG_SPLINE_MOVE_STOP_SWIM, NULL_OPCODE).Send();
+ Movement::PacketSender(this, SMSG_SPLINE_MOVE_STOP_SWIM, static_cast<OpcodeServer>(NULL_OPCODE)).Send();
return true;
}