aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Groups/Group.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Groups/Group.cpp')
-rw-r--r--src/server/game/Groups/Group.cpp35
1 files changed, 32 insertions, 3 deletions
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index 09b251984ee..abc4b19f3f2 100644
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -890,12 +890,25 @@ void Group::SendLooter(Creature* creature, Player* groupLooter)
WorldPacket data(SMSG_LOOT_LIST, (8+8));
data << uint64(creature->GetGUID());
- data << uint8(0); // unk1
if (groupLooter)
- data.append(groupLooter->GetPackGUID());
+ {
+ if (GetLootMethod() == MASTER_LOOT)
+ {
+ data.append(groupLooter->GetPackGUID());
+ data << uint8(0);
+ }
+ else
+ {
+ data << uint8(0);
+ data.append(groupLooter->GetPackGUID());
+ }
+ }
else
+ {
+ data << uint8(0);
data << uint8(0);
+ }
BroadcastPacket(&data, false);
}
@@ -1196,10 +1209,26 @@ void Group::NeedBeforeGreed(Loot* loot, WorldObject* lootedObject)
}
}
-void Group::MasterLoot(Loot* /*loot*/, WorldObject* pLootedObject)
+void Group::MasterLoot(Loot* loot, WorldObject* pLootedObject)
{
TC_LOG_DEBUG("network", "Group::MasterLoot (SMSG_LOOT_MASTER_LIST)");
+ for (std::vector<LootItem>::iterator i = loot->items.begin(); i != loot->items.end(); ++i)
+ {
+ if (i->freeforall)
+ continue;
+
+ i->is_blocked = !i->is_underthreshold;
+ }
+
+ for (std::vector<LootItem>::iterator i = loot->quest_items.begin(); i != loot->quest_items.end(); ++i)
+ {
+ if (!i->follow_loot_rules)
+ continue;
+
+ i->is_blocked = !i->is_underthreshold;
+ }
+
uint32 real_count = 0;
WorldPacket data(SMSG_LOOT_MASTER_LIST, 1 + GetMembersCount() * 8);