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

装备加成系统。 @thread 调用线程应与 RPGActor 的 ECS 线程一致。 更多...

#include <EquipmentSystem.h>

静态 Public 成员函数

static void registerItemStat (const std::string &itemId, const EquipmentStat &stat)
 为某物品 id 注册一条属性加成。
 
static int registerItemStatsFromJson (const std::string &itemId, const std::string &json)
 批量注册某物品的属性加成;返回成功条数。
 
static void clearItemStats (const std::string &itemId)
 清除某物品的加成。
 
static void clearAll ()
 清除全部物品加成注册。
 
static int statItemCount ()
 已注册加成的物品数量。
 
static int syncEquipModifiers (RPGActor *actor, eve::inventory::EquipmentSet *equip)
 把装备栏当前装备同步为 actor 属性修改器(先清旧再施加)。
 

详细描述

装备加成系统。 @thread 调用线程应与 RPGActor 的 ECS 线程一致。

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

成员函数说明

◆ clearAll()

void eve::rpg::EquipmentSystem::clearAll ( )
static

清除全部物品加成注册。

在文件 EquipmentSystem.cpp 第 56 行定义.

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

◆ clearItemStats()

void eve::rpg::EquipmentSystem::clearItemStats ( const std::string &  itemId)
static

清除某物品的加成。

在文件 EquipmentSystem.cpp 第 54 行定义.

引用了 itemId.

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

◆ registerItemStat()

void eve::rpg::EquipmentSystem::registerItemStat ( const std::string &  itemId,
const EquipmentStat &  stat 
)
static

为某物品 id 注册一条属性加成。

在文件 EquipmentSystem.cpp 第 23 行定义.

引用了 eve::rpg::EquipmentStat::attribute , 以及 itemId.

◆ registerItemStatsFromJson()

int eve::rpg::EquipmentSystem::registerItemStatsFromJson ( const std::string &  itemId,
const std::string &  json 
)
static

◆ statItemCount()

int eve::rpg::EquipmentSystem::statItemCount ( )
static

已注册加成的物品数量。

在文件 EquipmentSystem.cpp 第 58 行定义.

引用了 size.

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

◆ syncEquipModifiers()

int eve::rpg::EquipmentSystem::syncEquipModifiers ( RPGActor *  actor,
eve::inventory::EquipmentSet *  equip 
)
static

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