mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-03-15 21:35:09 +00:00
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:
@@ -52,15 +52,16 @@ public:
|
||||
PlayerbotsSecureLoginServerScript()
|
||||
: 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)
|
||||
return true;
|
||||
|
||||
auto const oldPos = packet.rpos();
|
||||
WorldPacket& pkt = const_cast<WorldPacket&>(packet);
|
||||
auto const oldPos = pkt.rpos();
|
||||
ObjectGuid loginGuid;
|
||||
packet >> loginGuid;
|
||||
packet.rpos(oldPos);
|
||||
pkt >> loginGuid;
|
||||
pkt.rpos(oldPos);
|
||||
|
||||
if (!loginGuid)
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user