Explicitly registered bridge from Action damage blocks to DamageRuntime. 更多...
#include <ActionDamageSink.h>
Public 成员函数 | |
| CombatActionDamageSink (ActionCombatStateResolver resolver) | |
| Construct with a synchronous resolver copied into the adapter. | |
| ~CombatActionDamageSink () override | |
| Combat action damage sink. | |
| void | setEnabled (bool enabled) |
| Opt this adapter into or out of Action damage dispatch. | |
| void | setWindowState (const CombatActionWindowState &state) noexcept |
| Borrow active combat windows so invulnerability can reject damage. @lifetime The state owner must outlive this sink or be cleared before destruction. | |
| void | clearWindowState () noexcept |
| Clear the borrowed active-window observer. | |
| bool | enabled () const |
| Return whether this exact adapter is currently registered. | |
| bool | supports (ecs::EntityHandle target) const override |
| Whether this sink can resolve the supplied target handle now. | |
| Result< void > | apply (const action::ActionDamageBinding &binding, const action::ActionNotifyContext &context) override |
| Atomically apply one validated damage request. | |
| std::optional< DamageOutcome > | lastOutcome () const |
| Return an owning copy of the latest committed damage outcome. | |
Public 成员函数 继承自 eve::action::IActionDamageSink | |
| virtual | ~IActionDamageSink ()=default |
| Releases IActionDamageSink resources. | |
额外继承的成员函数 | |
静态 Public 属性 继承自 eve::action::IActionDamageSink | |
| static constexpr const char * | capabilityName = "eve.action.damage-sink" |
详细描述
Explicitly registered bridge from Action damage blocks to DamageRuntime.
The game owns entity-to-CombatState resolution and both states. This adapter owns only its resolver, deterministic DamageRuntime, and the latest owning outcome. All methods are owner-thread-only; destruction automatically unregisters the sink.
在文件 ActionDamageSink.h 第 34 行定义.
构造及析构函数说明
◆ CombatActionDamageSink()
|
explicit |
Construct with a synchronous resolver copied into the adapter.
在文件 ActionDamageSink.cpp 第 12 行定义.
◆ ~CombatActionDamageSink()
|
override |
Combat action damage sink.
在文件 ActionDamageSink.cpp 第 15 行定义.
成员函数说明
◆ apply()
|
overridevirtual |
Atomically apply one validated damage request.
Applies .
实现了 eve::action::IActionDamageSink.
在文件 ActionDamageSink.cpp 第 41 行定义.
引用了 eve::Applied, eve::combat::DamageRuntime::apply(), binding, context, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::combat::CombatActionWindowState::isInvulnerable(), eve::SubjectRef::nil(), eve::NoOp, eve::NotFound, request, source, eve::combat::DamageRequest::source, eve::Status::success(), eve::Result< T >::success() , 以及 target.
◆ clearWindowState()
|
noexcept |
Clear the borrowed active-window observer.
在文件 ActionDamageSink.cpp 第 35 行定义.
◆ enabled()
| bool eve::combat::CombatActionDamageSink::enabled | ( | ) | const |
Return whether this exact adapter is currently registered.
在文件 ActionDamageSink.cpp 第 17 行定义.
引用了 index.
被这些函数引用 setEnabled().
◆ lastOutcome()
| std::optional< DamageOutcome > eve::combat::CombatActionDamageSink::lastOutcome | ( | ) | const |
Return an owning copy of the latest committed damage outcome.
在文件 ActionDamageSink.cpp 第 72 行定义.
◆ setEnabled()
| void eve::combat::CombatActionDamageSink::setEnabled | ( | bool | enabled | ) |
Opt this adapter into or out of Action damage dispatch.
在文件 ActionDamageSink.cpp 第 23 行定义.
◆ setWindowState()
|
noexcept |
Borrow active combat windows so invulnerability can reject damage. @lifetime The state owner must outlive this sink or be cleared before destruction.
在文件 ActionDamageSink.cpp 第 31 行定义.
引用了 state.
◆ supports()
|
overridevirtual |
Whether this sink can resolve the supplied target handle now.
Supports.
实现了 eve::action::IActionDamageSink.
在文件 ActionDamageSink.cpp 第 37 行定义.
引用了 target.
该类的文档由以下文件生成:
- src/modules/combat/ActionDamageSink.h
- src/modules/combat/ActionDamageSink.cpp
Public 成员函数 继承自