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