Implement global loot system Fixes #619

This should allow us to emulate lives global tables

The options available to filter tables are min_level, max_level, race,
rare, raid, race, class, bodytype, and zone.

race, class, bodytype, and zone are a pipe | separated list of IDs
This commit is contained in:
Michael Cook (mackal)
2018-02-10 22:15:21 -05:00
parent 0b97db9fd2
commit c5e4bb08f4
23 changed files with 372 additions and 27 deletions
+3
View File
@@ -185,6 +185,7 @@ public:
void AddItem(uint32 itemid, uint16 charges, bool equipitem = true, uint32 aug1 = 0, uint32 aug2 = 0, uint32 aug3 = 0, uint32 aug4 = 0, uint32 aug5 = 0, uint32 aug6 = 0);
void AddLootTable();
void AddLootTable(uint32 ldid);
void CheckGlobalLootTables();
void DescribeAggro(Client *towho, Mob *mob, bool verbose);
void RemoveItem(uint32 item_id, uint16 quantity = 0, uint16 slot = 0);
void CheckMinMaxLevel(Mob *them);
@@ -197,6 +198,7 @@ public:
uint32 CountLoot();
inline uint32 GetLoottableID() const { return loottable_id; }
virtual void UpdateEquipmentLight();
inline bool DropsGlobalLoot() const { return !skip_global_loot; }
inline uint32 GetCopper() const { return copper; }
inline uint32 GetSilver() const { return silver; }
@@ -562,6 +564,7 @@ protected:
private:
uint32 loottable_id;
bool skip_global_loot;
bool p_depop;
};