进程级职业定义注册表。 更多...
#include <Class.h>
静态 Public 成员函数 | |
| static void | registerClass (const ClassDefinition &def) |
| Registers class. | |
| static const ClassDefinition * | find (const std::string &id) |
| Find a registered class definition by id. | |
| static bool | remove (const std::string &id) |
| Remove a class by id (compatibility facade returning whether it was present). | |
| static void | clear () |
| Clears . | |
| static int | count () |
| Returns the number of . | |
| static int | loadFromJson (const std::string &json, std::string *error=nullptr) |
| 从 JSON 数组/对象批量注册。元素形如: { "id":"warrior","displayName":"战士", "traits":["mighty"], "learnSkills":[{"skillId":"power_strike","level":2}], "tags":["physical"] } | |
详细描述
成员函数说明
◆ clear()
|
static |
◆ count()
|
static |
Returns the number of .
引用了 size.
◆ find()
|
static |
Find a registered class definition by id.
- 返回
- Borrowed nullable definition owned by the process-local registry. @ownership ClassRegistry owns the definition; callers must not delete or mutate it. @lifetime Valid until remove(), clear(), or replacement of the same id; copy data before registry mutation.
引用了 t.
被这些函数引用 eve::rpg::ClassSystem::checkLevelSkills(), eve::rpg::ClassSystem::getLearnCount(), eve::rpg::ClassSystem::getLearnLevelAt(), eve::rpg::ClassSystem::getLearnSkillIdAt() , 以及 eve::rpg::ClassSystem::setClass().
◆ loadFromJson()
|
static |
从 JSON 数组/对象批量注册。元素形如: { "id":"warrior","displayName":"战士", "traits":["mighty"], "learnSkills":[{"skillId":"power_strike","level":2}], "tags":["physical"] }
引用了 eve::json::Value::at(), eve::rpg::ClassDefinition::displayName, error, eve::rpg::ClassDefinition::extra, eve::json::Value::get(), eve::json::Value::getInt(), eve::json::Value::getString(), eve::rpg::ClassDefinition::id, eve::rpg::ClassDefinition::learnSkills, eve::rpg::ClassLearnSkill::level, n, eve::json::Document::parse(), eve::json::Document::root(), root, eve::json::Value::size(), eve::rpg::ClassLearnSkill::skillId, eve::rpg::ClassDefinition::tags, eve::rpg::ClassDefinition::traits , 以及 eve::json::Document::valid().
◆ registerClass()
|
static |
◆ remove()
|
static |
该类的文档由以下文件生成: