mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-15 08:16:08 +00:00
feat(Core/Packet): CMSG_SET_SHEATHED
This commit is contained in:
committed by
GitHub
parent
a775ddcb5b
commit
1f90a18a58
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "CreatureAI.h"
|
||||
#include "CombatPackets.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectDefines.h"
|
||||
@@ -70,18 +71,15 @@ void WorldSession::HandleAttackStopOpcode(WorldPacket& /*recvData*/)
|
||||
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)
|
||||
{
|
||||
LOG_ERROR("network.opcode", "Unknown sheath state {} ??", sheathed);
|
||||
LOG_ERROR("network.opcode", "Unknown sheath state {} ??", 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