diff --git a/src/game/Entities/Player.cpp b/src/game/Entities/Player.cpp index 1a73bef0780..609444113bb 100644 --- a/src/game/Entities/Player.cpp +++ b/src/game/Entities/Player.cpp @@ -21461,11 +21461,71 @@ void Player::SendInitialPacketsAfterAddToMap() auraList.front()->ApplyModifier(true, true); } - if (IsImmobilizedState()) // TODO: Figure out if this protocol is correct - SendMoveRoot(true); + WorldPacket setCompoundState(SMSG_MULTIPLE_MOVES, 100); + setCompoundState << uint32(0); // size placeholder + + // manual send package (have code in HandleEffect(this, AURA_EFFECT_HANDLE_SEND_FOR_CLIENT, true); that must not be re-applied. + if (IsImmobilizedState()) + { + auto const counter = GetSession()->GetOrderCounter(); + setCompoundState << uint8(2 + GetPackGUID().size() + 4); + setCompoundState << uint16(SMSG_FORCE_MOVE_ROOT); + setCompoundState << GetPackGUID(); + setCompoundState << uint32(counter); + GetSession()->GetAnticheat()->OrderSent(SMSG_FORCE_MOVE_ROOT, counter); + GetSession()->IncrementOrderCounter(); + } + + if (HasAuraType(SPELL_AURA_FEATHER_FALL)) + { + auto const counter = GetSession()->GetOrderCounter(); + setCompoundState << uint8(2 + GetPackGUID().size() + 4); + setCompoundState << uint16(SMSG_MOVE_FEATHER_FALL); + setCompoundState << GetPackGUID(); + setCompoundState << uint32(counter); + GetSession()->GetAnticheat()->OrderSent(SMSG_MOVE_FEATHER_FALL, counter); + GetSession()->IncrementOrderCounter(); + } + + if (HasAuraType(SPELL_AURA_WATER_WALK)) + { + auto const counter = GetSession()->GetOrderCounter(); + setCompoundState << uint8(2 + GetPackGUID().size() + 4); + setCompoundState << uint16(SMSG_MOVE_WATER_WALK); + setCompoundState << GetPackGUID(); + setCompoundState << uint32(counter); + GetSession()->GetAnticheat()->OrderSent(SMSG_MOVE_WATER_WALK, counter); + GetSession()->IncrementOrderCounter(); + } + + if (HasAuraType(SPELL_AURA_HOVER)) + { + auto const counter = GetSession()->GetOrderCounter(); + setCompoundState << uint8(2 + GetPackGUID().size() + 4); + setCompoundState << uint16(SMSG_MOVE_SET_HOVER); + setCompoundState << GetPackGUID(); + setCompoundState << uint32(counter); + GetSession()->GetAnticheat()->OrderSent(SMSG_MOVE_SET_HOVER, counter); + GetSession()->IncrementOrderCounter(); + } if (m_pendingMountId) - SendCollisionHeightUpdate(CalculateCollisionHeight(m_pendingMountId)); + { + auto const counter = GetSession()->GetOrderCounter(); + setCompoundState << uint8(2 + GetPackGUID().size() + 4 + 4); + setCompoundState << uint16(SMSG_MOVE_SET_COLLISION_HGT); + setCompoundState << GetPackGUID(); + setCompoundState << uint32(counter); + setCompoundState << float(CalculateCollisionHeight(m_pendingMountId)); + GetSession()->GetAnticheat()->OrderSent(SMSG_MOVE_SET_COLLISION_HGT, counter); + GetSession()->IncrementOrderCounter(); + } + + if (setCompoundState.size() > 4) + { + setCompoundState.put(0, setCompoundState.size() - 4); + SendDirectMessage(setCompoundState); + } SendAurasForTarget(this); diff --git a/src/game/Server/Opcodes.h b/src/game/Server/Opcodes.h index 5ab5e816e46..3dc50515658 100644 --- a/src/game/Server/Opcodes.h +++ b/src/game/Server/Opcodes.h @@ -1344,7 +1344,7 @@ enum Opcodes CMSG_COMMENTATOR_SKIRMISH_QUEUE_COMMAND = 0x51B,// lua: CommentatorSetSkirmishMatchmakingMode/CommentatorRequestSkirmishQueueData/CommentatorRequestSkirmishMode/CommentatorStartSkirmishMatch SMSG_COMMENTATOR_SKIRMISH_QUEUE_RESULT1 = 0x51C,// event EVENT_COMMENTATOR_SKIRMISH_QUEUE_REQUEST, CGCommentator::QueueNode SMSG_COMMENTATOR_SKIRMISH_QUEUE_RESULT2 = 0x51D,// event EVENT_COMMENTATOR_SKIRMISH_QUEUE_REQUEST - SMSG_MULTIPLE_MOVES = 0x51E,// TODO: Implement from TC + SMSG_MULTIPLE_MOVES = 0x51E, NUM_MSG_TYPES = 0x51F };