载入中...
搜索中...
未找到
eve::inventory::ItemDefinition结构体 参考

物品模板(进程级注册表中的定义,不含运行时数量)。 更多...

#include <ItemTypes.h>

Public 成员函数

bool hasTag (const std::string &tag) const
 
std::string getExtra (const std::string &key, const std::string &fallback={}) const
 

Public 属性

std::string id
 
std::string displayName
 
int maxStack = 1
 
float weight = 0.f
 
float volume = 0.f
 
std::vector< std::string > tags
 
std::string category
 
std::string equipSlot
 非空表示建议装备槽名;是否可装备由 EquipmentSet 槽位配置最终决定。
 
std::unordered_map< std::string, std::string > extra
 

详细描述

物品模板(进程级注册表中的定义,不含运行时数量)。

在文件 ItemTypes.h13 行定义.

成员函数说明

◆ getExtra()

std::string eve::inventory::ItemDefinition::getExtra ( const std::string &  key,
const std::string &  fallback = {} 
) const

在文件 Item.cpp15 行定义.

引用了 extra.

◆ hasTag()

bool eve::inventory::ItemDefinition::hasTag ( const std::string &  tag) const

在文件 Item.cpp11 行定义.

引用了 tags.

被这些函数引用 eve::inventory::EquipmentSet::canEquipFromBag() , 以及 eve::inventory::InventorySystem::findItemByTag().

类成员变量说明

◆ category

std::string eve::inventory::ItemDefinition::category

在文件 ItemTypes.h20 行定义.

◆ displayName

std::string eve::inventory::ItemDefinition::displayName

在文件 ItemTypes.h15 行定义.

被这些函数引用 eve::inventory::ItemRegistry::registerItem().

◆ equipSlot

std::string eve::inventory::ItemDefinition::equipSlot

非空表示建议装备槽名;是否可装备由 EquipmentSet 槽位配置最终决定。

在文件 ItemTypes.h22 行定义.

被这些函数引用 eve::inventory::EquipmentSet::canEquipFromBag().

◆ extra

std::unordered_map<std::string, std::string> eve::inventory::ItemDefinition::extra

在文件 ItemTypes.h23 行定义.

被这些函数引用 getExtra().

◆ id

std::string eve::inventory::ItemDefinition::id

◆ maxStack

int eve::inventory::ItemDefinition::maxStack = 1

◆ tags

std::vector<std::string> eve::inventory::ItemDefinition::tags

在文件 ItemTypes.h19 行定义.

被这些函数引用 eve::inventory::InventorySystem::ensureBuiltins() , 以及 hasTag().

◆ volume

float eve::inventory::ItemDefinition::volume = 0.f

◆ weight

float eve::inventory::ItemDefinition::weight = 0.f

该结构体的文档由以下文件生成: