aboutsummaryrefslogtreecommitdiff
path: root/src/game/LootMgr.h
diff options
context:
space:
mode:
authorTrazom62 <none@none>2010-03-11 22:55:02 +0100
committerTrazom62 <none@none>2010-03-11 22:55:02 +0100
commited8c5ef6ffdbeadb600990fe683f5e20e8f31759 (patch)
treea9628a30089fae19083326d8f38aa2b45f11b8cd /src/game/LootMgr.h
parentd9f257a18c8e7984168d52b2d89b8e1582e27925 (diff)
Implement group loot for chest having GroupLootRules (go type=3, data15=1).
Implement round robin loot. Implement round robin for underthreshold items (group loot and need befor greed). Fix "all players pass" bug on creature. Add SMSG_LOOT_LIST message to indicate looter (round robin or master). And some other minor loot bugs. Fixes issue #167. Fixes issue #247. --HG-- branch : trunk
Diffstat (limited to 'src/game/LootMgr.h')
-rw-r--r--src/game/LootMgr.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/game/LootMgr.h b/src/game/LootMgr.h
index 3db547e0836..2e095fb35ba 100644
--- a/src/game/LootMgr.h
+++ b/src/game/LootMgr.h
@@ -56,10 +56,11 @@ enum LootMethod
enum PermissionTypes
{
- ALL_PERMISSION = 0,
- GROUP_PERMISSION = 1,
- MASTER_PERMISSION = 2,
- NONE_PERMISSION = 3
+ ALL_PERMISSION = 0,
+ GROUP_PERMISSION = 1,
+ MASTER_PERMISSION = 2,
+ ROUND_ROBIN_PERMISSION = 3,
+ NONE_PERMISSION = 4,
};
enum LootType
@@ -77,6 +78,15 @@ enum LootType
LOOT_INSIGNIA = 21 // unsupported by client, sending LOOT_CORPSE instead
};
+// type of Loot Item in Loot View
+enum LootSlotType
+{
+ LOOT_SLOT_TYPE_ALLOW_LOOT = 0, // player can loot the item.
+ LOOT_SLOT_TYPE_ROLL_ONGOING = 1, // roll is ongoing. player cannot loot.
+ LOOT_SLOT_TYPE_MASTER = 2, // item can only be distributed by group loot master.
+ LOOT_SLOT_TYPE_LOCKED = 3, // item is shown in red. player cannot loot.
+};
+
class Player;
class LootStore;
@@ -248,6 +258,7 @@ struct Loot
std::vector<LootItem> items;
uint32 gold;
uint8 unlootedCount;
+ uint64 roundRobinPlayer; // GUID of the player having the Round-Robin ownership for the loot. If 0, round robin owner has released.
LootType loot_type; // required for achievement system
Loot(uint32 _gold = 0) : gold(_gold), unlootedCount(0), loot_type(LOOT_CORPSE) {}
@@ -279,6 +290,7 @@ struct Loot
quest_items.clear();
gold = 0;
unlootedCount = 0;
+ roundRobinPlayer = 0;
i_LootValidatorRefManager.clearReferences();
}
@@ -299,6 +311,8 @@ struct Loot
LootItem* LootItemInSlot(uint32 lootslot, Player* player, QuestItem** qitem = NULL, QuestItem** ffaitem = NULL, QuestItem** conditem = NULL);
uint32 GetMaxSlotInLootFor(Player* player) const;
+ bool hasItemFor(Player* player) const;
+ bool hasOverThresholdItem() const;
private:
void FillNotNormalLootFor(Player* player);