Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/aoe_loot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void AOELootPlayer::OnPlayerLogin(Player* player)
ChatHandler(session).PSendModuleSysMessage(MODULE_STRING, AOE_LOGIN_MESSAGE);
}

bool AOELootServer::CanPacketReceive(WorldSession* session, WorldPacket& packet)
bool AOELootServer::CanPacketReceive(WorldSession* session, WorldPacket const& packet)
{
// Only handle loot packets
if (packet.GetOpcode() != CMSG_LOOT)
Expand Down Expand Up @@ -71,8 +71,9 @@ bool AOELootServer::CanPacketReceive(WorldSession* session, WorldPacket& packet)
range = 100.0f;

// Read target GUID from packet
WorldPacket packetCopy(packet);
ObjectGuid targetGuid;
packet >> targetGuid;
packetCopy >> targetGuid;

if (!targetGuid)
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/aoe_loot.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class AOELootServer : public ServerScript
public:
AOELootServer() : ServerScript("AOELootServer", { SERVERHOOK_CAN_PACKET_RECEIVE }) {}

bool CanPacketReceive(WorldSession* session, WorldPacket& packet) override;
bool CanPacketReceive(WorldSession* session, WorldPacket const& packet) override;

private:
// Helper function - Check if loot is valid
Expand Down
Loading