From e0c92f50f4bb39d76638cbe35b0f76841fd6d030 Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Sun, 29 May 2011 14:05:11 +0200 Subject: [PATCH] [11562] Additional comments and corrections to SMSG_LOOT_MONEY_NOTIFY Signed-off-by: NoFantasy --- src/game/LootHandler.cpp | 10 +++++++++- src/shared/revision_nr.h | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/game/LootHandler.cpp b/src/game/LootHandler.cpp index 3aeb4f1db..7d1de63d6 100644 --- a/src/game/LootHandler.cpp +++ b/src/game/LootHandler.cpp @@ -234,6 +234,9 @@ void WorldSession::HandleLootMoneyOpcode( WorldPacket & /*recv_data*/ ) 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 { Group *group = player->GetGroup(); @@ -257,13 +260,18 @@ void WorldSession::HandleLootMoneyOpcode( WorldPacket & /*recv_data*/ ) WorldPacket data(SMSG_LOOT_MONEY_NOTIFY, 4+1); 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); } } 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->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_MONEY, pLoot->gold); } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 69008bb55..e66a1347e 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11561" + #define REVISION_NR "11562" #endif // __REVISION_NR_H__