CoreUpdate (#2207)

Core PR update.
https://github.com/mod-playerbots/azerothcore-wotlk/pull/178

Core set packet as const, and so had to recast.
This commit is contained in:
Keleborn
2026-03-14 03:50:20 -07:00
committed by GitHub
parent a695ac77fa
commit d6f396ab50

View File

@@ -52,15 +52,16 @@ public:
PlayerbotsSecureLoginServerScript() PlayerbotsSecureLoginServerScript()
: ServerScript("PlayerbotsSecureLoginServerScript", { SERVERHOOK_CAN_PACKET_RECEIVE }) {} : ServerScript("PlayerbotsSecureLoginServerScript", { SERVERHOOK_CAN_PACKET_RECEIVE }) {}
bool CanPacketReceive(WorldSession* /*session*/, WorldPacket& packet) override bool CanPacketReceive(WorldSession* /*session*/, WorldPacket const& packet) override
{ {
if (packet.GetOpcode() != CMSG_PLAYER_LOGIN) if (packet.GetOpcode() != CMSG_PLAYER_LOGIN)
return true; return true;
auto const oldPos = packet.rpos(); WorldPacket& pkt = const_cast<WorldPacket&>(packet);
auto const oldPos = pkt.rpos();
ObjectGuid loginGuid; ObjectGuid loginGuid;
packet >> loginGuid; pkt >> loginGuid;
packet.rpos(oldPos); pkt.rpos(oldPos);
if (!loginGuid) if (!loginGuid)
return true; return true;