mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[11572] "Apparently, SMSG_LOOT_MONEY_NOTIFY is sent after SMSG_LOOT_CLEAR_MONEY"
So what problem, fixed ;) * Also avoid "share" if single group memeber near loot. * Use same order of money/achievement update in single and group mode.
This commit is contained in:
parent
f45b03f256
commit
442e06090d
2 changed files with 7 additions and 10 deletions
|
|
@ -234,9 +234,8 @@ void WorldSession::HandleLootMoneyOpcode( WorldPacket & /*recv_data*/ )
|
||||||
|
|
||||||
if (pLoot)
|
if (pLoot)
|
||||||
{
|
{
|
||||||
// This portion with SMSG_LOOT_MONEY_NOTIFY is possibly in wrong order.
|
pLoot->NotifyMoneyRemoved();
|
||||||
// Apparently, SMSG_LOOT_MONEY_NOTIFY is sent after SMSG_LOOT_CLEAR_MONEY as
|
|
||||||
// example (same with SMSG_LOOT_LIST which is normally last when it's sent)
|
|
||||||
if (!guid.IsItem() && player->GetGroup()) //item can be looted only single player
|
if (!guid.IsItem() && player->GetGroup()) //item can be looted only single player
|
||||||
{
|
{
|
||||||
Group *group = player->GetGroup();
|
Group *group = player->GetGroup();
|
||||||
|
|
@ -260,28 +259,26 @@ void WorldSession::HandleLootMoneyOpcode( WorldPacket & /*recv_data*/ )
|
||||||
|
|
||||||
WorldPacket data(SMSG_LOOT_MONEY_NOTIFY, 4+1);
|
WorldPacket data(SMSG_LOOT_MONEY_NOTIFY, 4+1);
|
||||||
data << uint32(money_per_player);
|
data << uint32(money_per_player);
|
||||||
data << uint8(0); // Control the text displayed, but apparently always 0 in group cases
|
data << uint8(playersNear.size() > 1 ? 0 : 1);// 0 is "you share of loot..."
|
||||||
|
|
||||||
(*i)->GetSession()->SendPacket(&data);
|
(*i)->GetSession()->SendPacket(&data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
player->ModifyMoney( pLoot->gold );
|
||||||
|
player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY, pLoot->gold);
|
||||||
|
|
||||||
WorldPacket data(SMSG_LOOT_MONEY_NOTIFY, 4+1);
|
WorldPacket data(SMSG_LOOT_MONEY_NOTIFY, 4+1);
|
||||||
data << uint32(pLoot->gold);
|
data << uint32(pLoot->gold);
|
||||||
data << uint8(1); // 1 is "you loot..."
|
data << uint8(1); // 1 is "you loot..."
|
||||||
player->GetSession()->SendPacket(&data);
|
player->GetSession()->SendPacket(&data);
|
||||||
|
|
||||||
player->ModifyMoney( pLoot->gold );
|
|
||||||
player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY, pLoot->gold);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pLoot->gold = 0;
|
pLoot->gold = 0;
|
||||||
|
|
||||||
if (pItem)
|
if (pItem)
|
||||||
pItem->SetLootState(ITEM_LOOT_CHANGED);
|
pItem->SetLootState(ITEM_LOOT_CHANGED);
|
||||||
|
|
||||||
pLoot->NotifyMoneyRemoved();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11571"
|
#define REVISION_NR "11572"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue