载入中...
搜索中...
未找到
eve::inventory::ItemStack结构体 参考
容器中的一格堆叠(空槽:itemId 为空或 quantity <= 0)。 更多...
#include <ItemTypes.h>
Public 成员函数 | |
| bool | empty () const |
| void | clear () |
| bool | hasTag (const std::string &tag) const |
| std::string | getProp (const std::string &key, const std::string &fallback={}) const |
| void | setProp (const std::string &key, const std::string &value) |
Public 属性 | |
| int | instanceId = 0 |
| std::string | itemId |
| int | quantity = 0 |
| float | durability = -1.f |
| < 0 表示不适用 | |
| std::unordered_map< std::string, std::string > | props |
| std::vector< std::string > | tags |
详细描述
容器中的一格堆叠(空槽:itemId 为空或 quantity <= 0)。
在文件 ItemTypes.h 第 30 行定义.
成员函数说明
◆ clear()
| void eve::inventory::ItemStack::clear | ( | ) |
引用了 durability, instanceId, itemId, props, quantity , 以及 tags.
◆ empty()
|
inline |
在文件 ItemTypes.h 第 38 行定义.
◆ getProp()
| std::string eve::inventory::ItemStack::getProp | ( | const std::string & | key, |
| const std::string & | fallback = {} |
||
| ) | const |
◆ hasTag()
| bool eve::inventory::ItemStack::hasTag | ( | const std::string & | tag | ) | const |
◆ setProp()
| void eve::inventory::ItemStack::setProp | ( | const std::string & | key, |
| const std::string & | value | ||
| ) |
类成员变量说明
◆ durability
| float eve::inventory::ItemStack::durability = -1.f |
◆ instanceId
| int eve::inventory::ItemStack::instanceId = 0 |
在文件 ItemTypes.h 第 31 行定义.
被这些函数引用 clear().
◆ itemId
| std::string eve::inventory::ItemStack::itemId |
在文件 ItemTypes.h 第 32 行定义.
被这些函数引用 clear(), empty() , 以及 eve::inventory::InventorySystem::unequipToBag().
◆ props
| std::unordered_map<std::string, std::string> eve::inventory::ItemStack::props |
在文件 ItemTypes.h 第 35 行定义.
◆ quantity
| int eve::inventory::ItemStack::quantity = 0 |
在文件 ItemTypes.h 第 33 行定义.
◆ tags
| std::vector<std::string> eve::inventory::ItemStack::tags |
在文件 ItemTypes.h 第 36 行定义.
该结构体的文档由以下文件生成:
- src/modules/inventory/ItemTypes.h
- src/modules/inventory/Item.cpp