[11562] Additional comments and corrections to SMSG_LOOT_MONEY_NOTIFY

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2011-05-29 14:05:11 +02:00
parent 539e77b08f
commit e0c92f50f4
2 changed files with 10 additions and 2 deletions

View file

@ -234,6 +234,9 @@ void WorldSession::HandleLootMoneyOpcode( WorldPacket & /*recv_data*/ )
if (pLoot) if (pLoot)
{ {
// This portion with SMSG_LOOT_MONEY_NOTIFY is possibly in wrong order.
// 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();
@ -257,13 +260,18 @@ 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); // unknown data << uint8(0); // Control the text displayed, but apparently always 0 in group cases
(*i)->GetSession()->SendPacket(&data); (*i)->GetSession()->SendPacket(&data);
} }
} }
else else
{ {
WorldPacket data(SMSG_LOOT_MONEY_NOTIFY, 4+1);
data << uint32(pLoot->gold);
data << uint8(1); // 1 is "you loot..."
player->GetSession()->SendPacket(&data);
player->ModifyMoney( pLoot->gold ); player->ModifyMoney( pLoot->gold );
player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY, pLoot->gold); player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY, pLoot->gold);
} }

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "11561" #define REVISION_NR "11562"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__