载入中...
搜索中...
未找到
ActionDamageSink.h
浏览该文件的文档.
1#pragma once
2
4#include "common/Export.h"
5#include "common/SubjectRef.h"
6
7#include <functional>
8#include <memory>
9#include <optional>
10#include <vector>
11
12namespace eve::rpg {
13
16 ecs::EntityHandle actor;
18};
19
29using RPGDamageResolver = std::function<std::optional<RPGDamageTarget>(ecs::EntityHandle)>;
30
40
52public:
54 explicit RPGActionDamageSink(RPGDamageResolver resolver);
56 ~RPGActionDamageSink() override;
59
61 [[nodiscard]] bool supports(ecs::EntityHandle target) const override;
74 [[nodiscard]] Result<void> apply(const action::ActionDamageBinding& binding,
75 const action::ActionNotifyContext& context) override;
77 [[nodiscard]] std::vector<RPGActionDamageReceipt> takeReceipts();
78
79private:
80 struct Impl;
81 std::unique_ptr<Impl> impl_;
82};
83
84} // namespace eve::rpg
Typed instantaneous combat-damage action contract.
LogicalId target
#define EVENGINE_API_PLATFORM
Definition Export.h:107
eve::action::ActionVfxBinding binding
Stable reference to a runtime gameplay subject.
const VegetationPresetContext & context
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Strong, domain-neutral reference to a runtime subject.
Definition SubjectRef.h:26
Optional target-domain adapter for timeline damage.
static constexpr StrongUint64 zero() noexcept
Returns the zero value for this strong type.
Scoped action damage provider using RPG Vitals as the sole health authority. @ownership Host owns thi...
RPGActionDamageSink(const RPGActionDamageSink &)=delete
RPGActionDamageSink & operator=(const RPGActionDamageSink &)=delete
RPG 模块的基础实体:把属性 / 状态 / 技能三张表挂到一个 ECS 实体上。
std::function< std::optional< RPGDamageTarget >(ecs::EntityHandle)> RPGDamageResolver
Resolve a live action entity to an RPG actor and stable reward identity. @ownership Callback captures...
Owning validated damage request authored on an action timeline.
Context linking a routed event to its action execution.
Owning post-commit observation; no actor pointers survive dispatch.
action::ActionExecutionId execution
Owning identity projection; the host owns the mapping, ECS owns the actor.