mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-03-16 05:45:08 +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()
|
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user