mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-02 07:07:29 +01:00
Core/Opcodes: updated CMSG_SET_SHEATHED to new packet class (#24393)
* Core/Packets: Added SMSG_LEARNED_SPELLS packet (cherry picked from commit51026f28bd) Co-authored-by: chemicstry <chemicstry@gmail.com> * Core/Opcodes: updated CMSG_SET_SHEATHED to new packet class (cherry picked from commit7eb02e945f) # Conflicts: # src/server/game/Entities/Unit/Unit.cpp # src/server/game/Handlers/CombatHandler.cpp # src/server/game/Server/Packets/CombatPackets.cpp # src/server/game/Server/Packets/CombatPackets.h # src/server/game/Server/Protocol/Opcodes.cpp * rename opcode name CMSG_SETSHEATHED -> CMSG_SET_SHEATHED * Revert "Core/Packets: Added SMSG_LEARNED_SPELLS packet" This reverts commit 7beefdfb162f503067a519193f704ac15809779f. Co-authored-by: chemicstry <chemicstry@gmail.com>
This commit is contained in:
@@ -66,18 +66,15 @@ void WorldSession::HandleAttackStopOpcode(WorldPackets::Combat::AttackStop& /*pa
|
||||
GetPlayer()->AttackStop();
|
||||
}
|
||||
|
||||
void WorldSession::HandleSetSheathedOpcode(WorldPacket& recvData)
|
||||
void WorldSession::HandleSetSheathedOpcode(WorldPackets::Combat::SetSheathed& packet)
|
||||
{
|
||||
uint32 sheathed;
|
||||
recvData >> sheathed;
|
||||
|
||||
if (sheathed >= MAX_SHEATH_STATE)
|
||||
if (packet.CurrentSheathState >= MAX_SHEATH_STATE)
|
||||
{
|
||||
TC_LOG_ERROR("network", "Unknown sheath state %u ??", sheathed);
|
||||
TC_LOG_ERROR("network", "Unknown sheath state %u ??", packet.CurrentSheathState);
|
||||
return;
|
||||
}
|
||||
|
||||
GetPlayer()->SetSheath(SheathState(sheathed));
|
||||
_player->SetSheath(SheathState(packet.CurrentSheathState));
|
||||
}
|
||||
|
||||
void WorldSession::SendAttackStop(Unit const* enemy)
|
||||
|
||||
Reference in New Issue
Block a user