#pragma once #include #include #include #include #include "constants.h" namespace cursebreaker { struct LootEntry { uint16_t itemId{}; uint16_t minAmount{}; uint16_t maxAmount{}; uint16_t chance{}; // percentage chance uint16_t level{}; // minimum level required }; struct LootTable { uint16_t id{}; std::string name; std::string description; std::vector entries; LootTable() = default; }; // Loot configuration functions bool loadLootTablesFromXML(const std::string& filepath, std::unordered_map& lootTables); const LootTable* getLootTableById(uint16_t id, const std::unordered_map& lootTables); const std::unordered_map& getAllLootTables(const std::unordered_map& lootTables); } // namespace cursebreaker