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
+8
View File
@@ -28,6 +28,7 @@
#include "spawn2.h"
#include "spawngroup.h"
#include "aa_ability.h"
#include "global_loot_manager.h"
struct ZonePoint
{
@@ -269,6 +270,11 @@ public:
void UpdateHotzone();
std::unordered_map<int, item_tick_struct> tick_items;
inline std::vector<int> GetGlobalLootTables(NPC *mob) const { return m_global_loot.GetGlobalLootTables(mob); }
inline void AddGlobalLootEntry(GlobalLootEntry &in) { return m_global_loot.AddEntry(in); }
inline void ShowZoneGlobalLoot(Client *to) { m_global_loot.ShowZoneGlobalLoot(to); }
inline void ShowNPCGlobalLoot(Client *to, NPC *who) { m_global_loot.ShowNPCGlobalLoot(to, who); }
// random object that provides random values for the zone
EQEmu::Random random;
@@ -347,6 +353,8 @@ private:
QGlobalCache *qGlobals;
Timer hotzone_timer;
GlobalLootManager m_global_loot;
};
#endif