载入中...
搜索中...
未找到
eve::rpg::RPGActionDamageSink类 参考final

Scoped action damage provider using RPG Vitals as the sole health authority. @ownership Host owns this nonmovable sink and the resolver's captured mapping. @lifetime Destroy the sink before captured owners; actor destruction is handle-checked. @thread Create, dispatch, poll and destroy on the simulation owner thread. @reentrancy Resolver calls are synchronous without locks and must not reenter. 更多...

#include <ActionDamageSink.h>

类 eve::rpg::RPGActionDamageSink 继承关系图:
eve::action::IActionDamageSink

类

struct  Impl
 

Public 成员函数

 RPGActionDamageSink (RPGDamageResolver resolver)
 Register a provider with an owning callback; an empty callback accepts no targets.
 
 ~RPGActionDamageSink () override
 Unregister before releasing transient receipts and the resolver.
 
 RPGActionDamageSink (const RPGActionDamageSink &)=delete
 
RPGActionDamageSink & operator= (const RPGActionDamageSink &)=delete
 
bool supports (ecs::EntityHandle target) const override
 Query the host mapping and current ECS generation without mutation.
 
Result< void > apply (const action::ActionDamageBinding &binding, const action::ActionNotifyContext &context) override
 Settle one timeline hit against authoritative hp and queue its committed receipt.
 
std::vector< RPGActionDamageReceipt > takeReceipts ()
 Transfer and clear all owning receipts in commit order; consume once per host step.
 
- Public 成员函数 继承自 eve::action::IActionDamageSink
virtual ~IActionDamageSink ()=default
 Releases IActionDamageSink resources.
 

额外继承的成员函数

- 静态 Public 属性 继承自 eve::action::IActionDamageSink
static constexpr const char * capabilityName = "eve.action.damage-sink"
 

详细描述

Scoped action damage provider using RPG Vitals as the sole health authority. @ownership Host owns this nonmovable sink and the resolver's captured mapping. @lifetime Destroy the sink before captured owners; actor destruction is handle-checked. @thread Create, dispatch, poll and destroy on the simulation owner thread. @reentrancy Resolver calls are synchronous without locks and must not reenter.

备注
Registers the existing eve.action.damage-sink capability. Owns no actors, CombatState or persistent data. Supports hp damage; poise/knockback are explicitly Unsupported. The host must select exactly one damage provider per target.

在文件 ActionDamageSink.h 第 51 行定义.

构造及析构函数说明

◆ RPGActionDamageSink() [1/2]

eve::rpg::RPGActionDamageSink::RPGActionDamageSink ( RPGDamageResolver  resolver)
explicit

Register a provider with an owning callback; an empty callback accepts no targets.

在文件 ActionDamageSink.cpp 第 25 行定义.

◆ ~RPGActionDamageSink()

eve::rpg::RPGActionDamageSink::~RPGActionDamageSink ( )
override

Unregister before releasing transient receipts and the resolver.

在文件 ActionDamageSink.cpp 第 29 行定义.

◆ RPGActionDamageSink() [2/2]

eve::rpg::RPGActionDamageSink::RPGActionDamageSink ( const RPGActionDamageSink &  )
delete

成员函数说明

◆ apply()

Result< void > eve::rpg::RPGActionDamageSink::apply ( const action::ActionDamageBinding &  binding,
const action::ActionNotifyContext &  context 
)
overridevirtual

Settle one timeline hit against authoritative hp and queue its committed receipt.

返回
Applied, preview NoOp, or a structured failure without a receipt or health mutation. @ownership Inputs are borrowed only for this call; queued receipts own their identities. @thread Simulation owner thread; no concurrent registry mutation. @reentrancy Does not call scripts; the resolver must obey its non-reentrant contract.
备注
Uses injected tick and no random stream. Hosts decide critical rolls upstream. Only a positive-to-zero transition reports killed; repeated hits on a corpse do not. Delivery deduplication belongs to the timeline producer, not execution ID (multi-hit is valid). @cost One RPG settlement including attribute staging, more expensive than a Vitals read; invoked once per authored hit, never as a per-frame health synchronization.

实现了 eve::action::IActionDamageSink.

在文件 ActionDamageSink.cpp 第 37 行定义.

引用了 adapter, eve::Applied, applied, binding, context, eve::Result< T >::failure(), eve::rpg::VitalsSystem::getCurrent(), eve::SubjectRef::nil(), eve::NoOp, eve::NotFound, request, source, eve::settlement::SettlementRequest::source, eve::StaleHandle, eve::Status::success(), eve::Result< T >::success(), target , 以及 eve::Unsupported.

◆ operator=()

RPGActionDamageSink & eve::rpg::RPGActionDamageSink::operator= ( const RPGActionDamageSink &  )
delete

◆ supports()

bool eve::rpg::RPGActionDamageSink::supports ( ecs::EntityHandle  target) const
overridevirtual

Query the host mapping and current ECS generation without mutation.

实现了 eve::action::IActionDamageSink.

在文件 ActionDamageSink.cpp 第 31 行定义.

引用了 target.

◆ takeReceipts()

std::vector< RPGActionDamageReceipt > eve::rpg::RPGActionDamageSink::takeReceipts ( )

Transfer and clear all owning receipts in commit order; consume once per host step.

在文件 ActionDamageSink.cpp 第 82 行定义.

引用了 result.


该类的文档由以下文件生成: