载入中...
搜索中...
未找到
eve::rpg::ClassRegistry类 参考

进程级职业定义注册表。 更多...

#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"] }
 

详细描述

进程级职业定义注册表。

在文件 Class.h 第 41 行定义.

成员函数说明

◆ clear()

void eve::rpg::ClassRegistry::clear ( )
static

Clears .

在文件 Class.cpp 第 40 行定义.

被这些函数引用 eve::rpg::RPG::clearClassDefinitions().

◆ count()

int eve::rpg::ClassRegistry::count ( )
static

Returns the number of .

在文件 Class.cpp 第 42 行定义.

引用了 size.

被这些函数引用 eve::rpg::RPG::getClassDefinitionCount().

◆ find()

const ClassDefinition * eve::rpg::ClassRegistry::find ( const std::string &  id)
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.

在文件 Class.cpp 第 32 行定义.

引用了 t.

被这些函数引用 eve::rpg::ClassSystem::checkLevelSkills(), eve::rpg::ClassSystem::getLearnCount(), eve::rpg::ClassSystem::getLearnLevelAt(), eve::rpg::ClassSystem::getLearnSkillIdAt() , 以及 eve::rpg::ClassSystem::setClass().

◆ loadFromJson()

int eve::rpg::ClassRegistry::loadFromJson ( const std::string &  json,
std::string *  error = nullptr 
)
static

◆ registerClass()

void eve::rpg::ClassRegistry::registerClass ( const ClassDefinition &  def)
static

Registers class.

在文件 Class.cpp 第 27 行定义.

引用了 eve::rpg::ClassDefinition::id.

◆ remove()

bool eve::rpg::ClassRegistry::remove ( const std::string &  id)
static

Remove a class by id (compatibility facade returning whether it was present).

在文件 Class.cpp 第 38 行定义.


该类的文档由以下文件生成: