载入中...
搜索中...
未找到
Item.cpp
浏览该文件的文档.
static int loadFromJson(const std::string &json, std::string *error=nullptr)
从 JSON 数组或单对象批量注册,返回成功数量。 元素形如: { "id": "potion.hp", "displayName": "治疗药水", "maxStack": 20,...
Definition Item.cpp:84
static Document parse(const std::string &text, std::string *error=nullptr)
Parse.
Definition Json.cpp:581
std::string getString(const char *key, const std::string &fallback={}) const
Returns the string.
Definition Json.cpp:427
std::vector< std::string > getStringArray(const char *key) const
Returns the string array.
Definition Json.cpp:439
std::unordered_map< std::string, std::string > getStringMap(const char *key) const
Definition Json.cpp:461
运行时容器:固定格数的背包 / 箱子 / 商店栏等。 行为由 InventorySystem 提供;本类暴露便于脚本绑定的薄封装方法。
Definition AvatarInstance.h:37
std::unordered_map< std::string, std::string > extra
Definition ItemTypes.h:25
std::string getExtra(const std::string &key, const std::string &fallback={}) const
Returns the extra.
Definition Item.cpp:15
std::string getProp(const std::string &key, const std::string &fallback={}) const
Returns the prop.
Definition Item.cpp:33
std::unordered_map< std::string, std::string > props
Definition ItemTypes.h:39