#pragma once #include #include #include #include #include "constants.h" namespace cursebreaker { struct CraftingItemEntry { uint16_t itemId{}; uint16_t amount{}; }; // Struct for item crafting requirements struct ItemCrafting { WorkbenchType workbench; SkillType craftingskill; std::vector craftingitems; std::string checks; ItemCrafting() = default; }; // Main item struct struct Item { uint16_t id = 0; uint16_t price = 0; uint16_t abilityid = 0; uint16_t learnabilityid = 0; SkillType skill = SkillType::none; ItemCategory category = ItemCategory::none; ItemType slot = ItemType::resource; Tool tool = Tool::none; GenstatType generation = GenstatType::none; uint8_t level = 0; uint8_t foodlevel = 0; uint8_t foodamount = 0; uint8_t foodfrequency = 0; uint8_t foodtime = 0; uint8_t maxstack = 0; uint8_t book = 0; bool stackable : 1; bool twohanded : 1; bool undroppable : 1; bool hidemilestone : 1; std::string name; std::string description; std::string comment; std::vector stats; std::vector craftings; Item() = default; }; // Items configuration functions bool loadItemsFromXML(const std::string& filepath); const Item* getItemById(uint16_t id); const std::unordered_map& getAllItems(); } // namespace cursebreaker