载入中...
搜索中...
未找到
EquipmentSystem.h
浏览该文件的文档.
1#pragma once
2
14#include "common/Result.h"
15
16#include <string>
17#include <vector>
18
19#include "common/Export.h"
20
21namespace eve::inventory {
22class EquipmentSet;
23}
24
25namespace eve::rpg {
26
27class RPGActor;
28
31 std::string attribute;
32 std::string op = "add";
33 double value = 0.0;
34 int priority = 0;
35};
36
42public:
44 static void registerItemStat(const std::string &itemId, const EquipmentStat &stat);
46 static int registerItemStatsFromJson(const std::string &itemId, const std::string &json);
48 static void clearItemStats(const std::string &itemId);
50 static void clearAll();
52 static int statItemCount();
53
58 static int syncEquipModifiers(RPGActor *actor, eve::inventory::EquipmentSet *equip);
59};
60
61} // namespace eve::rpg
LogicalId itemId
#define EVENGINE_API_PLATFORM
Definition Export.h:107
Move-only, checked operation results for the common layer.
EVENGINE_API_FOUNDATION public API.
Definition Equipment.h:19
装备加成系统。 @thread 调用线程应与 RPGActor 的 ECS 线程一致。
属性 / 状态 / 技能三表合一的 ECS 实体。
Definition RPGActor.h:34
运行时容器:固定格数的背包 / 箱子 / 商店栏等。 行为由 InventorySystem 提供;本类暴露便于脚本绑定的薄封装方法。
RPG 模块的基础实体:把属性 / 状态 / 技能三张表挂到一个 ECS 实体上。
一件物品的一条属性加成规格。