载入中...
搜索中...
未找到
StatusTypes.h
浏览该文件的文档.
1#pragma once
3
4// 状态(buff/debuff)系统的运行时兼容投影与 adapter metadata。
5//
6// 活动生命周期事实由 effects::EffectContainer / effects::EffectInstance 独占。
7// 本文件中的 StatusInstance 只是在旧 RPG API 和 callback 边界生成的 owning
8// projection;它不是 RPGActor::Statuses 中的第二份活动实例存储。
9
11
12#include <cstdint>
13#include <string>
14#include <unordered_map>
15#include <utility>
16#include <vector>
17
18namespace eve::rpg {
19
28 int instanceId = 0;
29 std::string effectId;
30 std::string source;
31 int stacks = 1;
32 float remaining = -1.f;
33 float periodAccum = 0.f;
34
36 std::vector<std::pair<std::string, std::string>> appliedModifiers;
37
42 std::unordered_map<std::string, std::string> props;
43};
44
52 double periodAccum = 0.0;
53 std::vector<std::pair<std::string, std::string>> appliedModifiers;
54 std::unordered_map<std::string, std::string> props;
55};
56
59 std::uint32_t expired = 0;
60 std::uint32_t ticks = 0;
61 double elapsedSeconds = 0.0;
62};
63
71 class RPGActor *actor = nullptr;
72 int instanceId = 0;
73 std::string effectId;
74 std::string source;
75 int stacks = 1;
76};
77
86 class RPGActor *actor = nullptr;
87 int instanceId = 0;
88 std::string effectId;
89 std::string source;
90 std::string action;
91 int stacks = 0;
92 std::string reason;
93};
94
95} // namespace eve::rpg
Owning effect storage and lifecycle-only executor.
Share string attribute map operations through the Windows Foundation DLL.
属性 / 状态 / 技能三表合一的 ECS 实体。
Definition RPGActor.h:34
RPG 模块的基础实体:把属性 / 状态 / 技能三张表挂到一个 ECS 实体上。
状态生命周期变更事件(施加 / 刷新 / 叠层 / 延长 / 移除 / 到期 / 拒绝)。 与 StatusTickEvent 分开:tick 是周期性数值触发,change 是实例结构变化。
Definition StatusTypes.h:85
std::string reason
reject / 自定义条件失败时的说明;其它情况可空
Definition StatusTypes.h:92
RPG executor state associated with one canonical effect instance id.
Definition StatusTypes.h:51
std::unordered_map< std::string, std::string > props
Definition StatusTypes.h:54
std::vector< std::pair< std::string, std::string > > appliedModifiers
Definition StatusTypes.h:53
Legacy RPG projection of one effects::EffectInstance.
Definition StatusTypes.h:27
float remaining
剩余时间(秒);-1 表示 infinite(永久,直到手动移除)
Definition StatusTypes.h:32
std::string source
施加来源标签(施法者 id / 技能 id / 自定义),供查询与批量移除
Definition StatusTypes.h:30
std::vector< std::pair< std::string, std::string > > appliedModifiers
若该效果在 apply 时直接写入了属性修改器,记录 (属性名, 修改器 id) 以便精确撤销。
Definition StatusTypes.h:36
std::unordered_map< std::string, std::string > props
运行时自定义键值(图标路径、UI 着色、脚本标记……)。 与 EffectDefinition::extra(定义侧)互补:extra 是模板数据,props 是实例数据。
Definition StatusTypes.h:42
float periodAccum
周期效果:距离上次 tick 的累积时间
Definition StatusTypes.h:33
周期性状态触发的 tick 事件。周期效果(period > 0)不会自动修改属性, 而是每个周期产生一个 tick 事件交给上层(脚本或 C++ 结算系统)处理—— 这样伤害/治疗类周期效果可以完整地...
Definition StatusTypes.h:70
class RPGActor * actor
Definition StatusTypes.h:71
Summary returned by the checked RPG status executor update.
Definition StatusTypes.h:58