mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[9584] Continue fix loot roll packets and related code.
* Propertly send itemSlot field and use it with looted target for roll selection. * Remove references to NumberOfPlayers useless data send in args * Fixed long existed bug with roll show when single player from group can roll item. * Fixed possible crash at player leave group while item roll * Fixed wrong item amount in stack in rolls inreasult use non-initilized field as info source. * Remove unused item guid field from Roll and not lost for nothing item guids for this. Thanks for help in research to TOM_RUS and j4r0d.
This commit is contained in:
parent
996a523302
commit
6bfa8d81c6
4 changed files with 75 additions and 62 deletions
|
|
@ -369,11 +369,11 @@ void WorldSession::HandleLootMethodOpcode( WorldPacket & recv_data )
|
|||
|
||||
void WorldSession::HandleLootRoll( WorldPacket &recv_data )
|
||||
{
|
||||
uint64 Guid;
|
||||
uint32 NumberOfPlayers;
|
||||
ObjectGuid lootedTarget;
|
||||
uint32 itemSlot;
|
||||
uint8 rollType;
|
||||
recv_data >> Guid; //guid of the item rolled
|
||||
recv_data >> NumberOfPlayers;
|
||||
recv_data >> lootedTarget; //guid of the item rolled
|
||||
recv_data >> itemSlot;
|
||||
recv_data >> rollType;
|
||||
|
||||
//sLog.outDebug("WORLD RECIEVE CMSG_LOOT_ROLL, From:%u, Numberofplayers:%u, rollType:%u", (uint32)Guid, NumberOfPlayers, rollType);
|
||||
|
|
@ -383,7 +383,7 @@ void WorldSession::HandleLootRoll( WorldPacket &recv_data )
|
|||
return;
|
||||
|
||||
// everything's fine, do it
|
||||
group->CountRollVote(GetPlayer()->GetGUID(), Guid, NumberOfPlayers, rollType);
|
||||
group->CountRollVote(GetPlayer()->GetObjectGuid(), lootedTarget, itemSlot, rollType);
|
||||
|
||||
switch (rollType)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue