CreatureLib/src/Library/Items/Item.hpp

27 lines
757 B
C++

#ifndef CREATURELIB_ITEM_HPP
#define CREATURELIB_ITEM_HPP
#include <string>
#include <unordered_set>
#include "ItemCategory.hpp"
#include "BattleItemCategory.hpp"
#include "../../GenericTemplates.cpp"
namespace CreatureLib::Library {
class Item {
GetProperty(std::string, Name);
GetProperty(ItemCategory, Category);
GetProperty(BattleItemCategory, BattleCategory);
GetProperty(int32_t , Price);
private:
std::unordered_set<std::string> _flags;
public:
Item(std::string name, ItemCategory category, BattleItemCategory battleCategory, int32_t price,
std::unordered_set<std::string> flags);
bool HasFlag(const std::string& flag) const;
};
}
#endif //CREATURELIB_ITEM_HPP