Core/Loot: Correct some values sent for roll packets
This commit is contained in:
@@ -429,7 +429,7 @@ void WorldSession::HandleLootMethodOpcode(WorldPacket & recv_data)
|
||||
group->SendUpdate();
|
||||
}
|
||||
|
||||
void WorldSession::HandleLootRoll(WorldPacket &recv_data)
|
||||
void WorldSession::HandleLootRoll(WorldPacket& recvData)
|
||||
{
|
||||
Group* group = GetPlayer()->GetGroup();
|
||||
if (!group)
|
||||
@@ -438,15 +438,15 @@ void WorldSession::HandleLootRoll(WorldPacket &recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
uint64 Guid;
|
||||
uint32 NumberOfPlayers;
|
||||
uint64 guid;
|
||||
uint32 itemSlot;
|
||||
uint8 rollType;
|
||||
recv_data >> Guid; //guid of the item rolled
|
||||
recv_data >> NumberOfPlayers;
|
||||
recv_data >> rollType; //0: pass, 1: need, 2: greed
|
||||
recvData >> guid; // guid of the item rolled
|
||||
recvData >> itemSlot;
|
||||
recvData >> rollType; // 0: pass, 1: need, 2: greed
|
||||
|
||||
// everything's fine, do it
|
||||
group->CountRollVote(GetPlayer()->GetGUID(), Guid, NumberOfPlayers, rollType);
|
||||
group->CountRollVote(GetPlayer()->GetGUID(), guid, rollType);
|
||||
|
||||
switch (rollType)
|
||||
{
|
||||
|
||||
@@ -220,16 +220,18 @@ void WorldSession::HandleLootOpcode(WorldPacket & recv_data)
|
||||
GetPlayer()->InterruptNonMeleeSpells(false);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLootReleaseOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleLootReleaseOpcode(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_LOOT_RELEASE");
|
||||
|
||||
// cheaters can modify lguid to prevent correct apply loot release code and re-loot
|
||||
// use internal stored guid
|
||||
recv_data.read_skip<uint64>(); // guid;
|
||||
uint64 guid;
|
||||
recvData >> guid;
|
||||
|
||||
if (uint64 lguid = GetPlayer()->GetLootGUID())
|
||||
DoLootRelease(lguid);
|
||||
if (lguid == guid)
|
||||
DoLootRelease(lguid);
|
||||
}
|
||||
|
||||
void WorldSession::DoLootRelease(uint64 lguid)
|
||||
|
||||
Reference in New Issue
Block a user