Core/Opcodes: updated CMSG_SET_SHEATHED to new packet class (#24393)

* Core/Packets: Added SMSG_LEARNED_SPELLS packet

(cherry picked from commit 51026f28bd)

Co-authored-by: chemicstry <chemicstry@gmail.com>

* Core/Opcodes: updated CMSG_SET_SHEATHED to new packet class

(cherry picked from commit 7eb02e945f)

# 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:
ForesterDev
2020-04-11 21:48:16 +04:00
committed by GitHub
parent 194691f7c3
commit 3e54e798e6
7 changed files with 23 additions and 11 deletions

View File

@@ -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)