mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02: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:
parent
a695ac77fa
commit
d6f396ab50
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user