|
|
@ -95,11 +95,17 @@ class ItemSet{ |
|
|
|
friend class ItemInfo; |
|
|
|
friend class ItemInfo; |
|
|
|
static std::map<std::string,ItemSet>sets; |
|
|
|
static std::map<std::string,ItemSet>sets; |
|
|
|
std::array<Stats,8>setBonuses; |
|
|
|
std::array<Stats,8>setBonuses; |
|
|
|
|
|
|
|
std::string name; |
|
|
|
public: |
|
|
|
public: |
|
|
|
|
|
|
|
//NO CONSTRUCTOR REQUIRED!
|
|
|
|
//Specify the piece count(1-8) for a set bonus to be applied.
|
|
|
|
//Specify the piece count(1-8) for a set bonus to be applied.
|
|
|
|
static void AddSetBonus(std::string setName,int pieceCount,Stats&bonuses); |
|
|
|
static void AddSetBonus(std::string setName,int pieceCount,Stats&bonuses); |
|
|
|
//Gets a set bonus based on number of pieces (1-8)
|
|
|
|
//Gets a set bonus based on number of pieces (1-8)
|
|
|
|
const Stats&operator[](int setPieces)const; |
|
|
|
const Stats&operator[](int setPieces)const; |
|
|
|
|
|
|
|
const std::string&GetSetName()const; |
|
|
|
|
|
|
|
bool operator<(const ItemSet&rhs)const{ |
|
|
|
|
|
|
|
return name<rhs.name; |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
class Item{ |
|
|
|
class Item{ |
|
|
@ -127,6 +133,7 @@ public: |
|
|
|
bool IsBlank(); |
|
|
|
bool IsBlank(); |
|
|
|
static Item BLANK; |
|
|
|
static Item BLANK; |
|
|
|
bool operator==(const Item&rhs)const; |
|
|
|
bool operator==(const Item&rhs)const; |
|
|
|
|
|
|
|
const std::optional<const ItemSet const*>ItemSet()const; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
class Inventory{ |
|
|
|
class Inventory{ |
|
|
@ -186,7 +193,7 @@ class ItemInfo{ |
|
|
|
EquipSlot slot; |
|
|
|
EquipSlot slot; |
|
|
|
EnhancementInfo enhancement; |
|
|
|
EnhancementInfo enhancement; |
|
|
|
Decal*img; |
|
|
|
Decal*img; |
|
|
|
std::string set; |
|
|
|
std::string set=""; |
|
|
|
//Returns true if the item can be used, false otherwise
|
|
|
|
//Returns true if the item can be used, false otherwise
|
|
|
|
std::string useFunc=""; |
|
|
|
std::string useFunc=""; |
|
|
|
//Custom properties for this specific item's script.
|
|
|
|
//Custom properties for this specific item's script.
|
|
|
@ -212,9 +219,7 @@ public: |
|
|
|
float CastTime(); |
|
|
|
float CastTime(); |
|
|
|
float CooldownTime(); |
|
|
|
float CooldownTime(); |
|
|
|
EquipSlot Slot(); |
|
|
|
EquipSlot Slot(); |
|
|
|
bool HasItemSet(); |
|
|
|
const std::optional<const ItemSet const*>ItemSet()const; |
|
|
|
//NOTE: Not every item has a set! Verify with HasItemSet() first!
|
|
|
|
|
|
|
|
const ItemSet&ItemSet()const; |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
class ItemOverlay{ |
|
|
|
class ItemOverlay{ |
|
|
|