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

Translates a SkillDefinition into the common gameplay action model. 更多...

#include <SkillAction.h>

静态 Public 成员函数

static eve::Result< action::ActionDefinition > makeDefinition (const SkillDefinition &skill)
 Build the common definition for one RPG skill.
 
static eve::Result< action::ActionRequest > makeRequest (const SkillDefinition &skill, std::optional< ecs::EntityHandle > source=std::nullopt, std::optional< ecs::EntityHandle > target=std::nullopt, eve::SimulationTick requestedTick=eve::SimulationTick::zero())
 Build a request for one skill invocation.
 
static eve::Result< action::ActionExecutionId > submit (action::ActionRuntime &runtime, const SkillDefinition &skill, std::optional< ecs::EntityHandle > source=std::nullopt, std::optional< ecs::EntityHandle > target=std::nullopt, eve::SimulationTick requestedTick=eve::SimulationTick::zero())
 Translate and submit one skill to an existing lifecycle owner.
 

详细描述

Translates a SkillDefinition into the common gameplay action model.

This adapter owns no cast timer, phase or target lifecycle. The caller owns one ActionRuntime and may submit the produced values to it. RPG condition, resource-account and effect providers are injected into that runtime.

在文件 SkillAction.h 第 26 行定义.

成员函数说明

◆ makeDefinition()

eve::Result< action::ActionDefinition > eve::rpg::SkillActionAdapter::makeDefinition ( const SkillDefinition &  skill)
static

Build the common definition for one RPG skill.

参数
skillBorrowed definition observed during this call only.
返回
An action definition or a structured mapping failure.

在文件 SkillAction.cpp 第 34 行定义.

引用了 eve::rpg::SkillDefinition::castCondition, eve::rpg::SkillDefinition::castTime, eve::rpg::SkillDefinition::cooldown, eve::rpg::SkillDefinition::cost, eve::action::Explicit, eve::Result< T >::failure(), eve::rpg::SkillDefinition::grantedEffects, eve::rpg::SkillDefinition::id, eve::action::None, status, eve::Result< T >::success(), eve::rpg::SkillDefinition::targetType , 以及 valid.

被这些函数引用 makeRequest() , 以及 submit().

◆ makeRequest()

eve::Result< action::ActionRequest > eve::rpg::SkillActionAdapter::makeRequest ( const SkillDefinition &  skill,
std::optional< ecs::EntityHandle >  source = std::nullopt,
std::optional< ecs::EntityHandle >  target = std::nullopt,
eve::SimulationTick  requestedTick = eve::SimulationTick::zero() 
)
static

Build a request for one skill invocation.

参数
skillBorrowed definition observed during this call only.
sourceOptional source ECS handle; no raw pointer is retained.
targetOptional target ECS handle for non-self skills.
requestedTickDeterministic simulation tick of the request.
返回
An owning action request or a structured mapping failure.

在文件 SkillAction.cpp 第 62 行定义.

引用了 eve::action::ActionRequest::actionId, eve::Diagnostic::error(), eve::action::Explicit, eve::Result< T >::failure(), eve::InvalidArgument, makeDefinition(), eve::action::None, eve::PreconditionViolation, request, source, eve::Result< T >::success(), target , 以及 valid.

被这些函数引用 submit().

◆ submit()

eve::Result< action::ActionExecutionId > eve::rpg::SkillActionAdapter::submit ( action::ActionRuntime &  runtime,
const SkillDefinition &  skill,
std::optional< ecs::EntityHandle >  source = std::nullopt,
std::optional< ecs::EntityHandle >  target = std::nullopt,
eve::SimulationTick  requestedTick = eve::SimulationTick::zero() 
)
static

Translate and submit one skill to an existing lifecycle owner.

参数
runtimeCaller-owned ActionRuntime; it remains the sole state owner.
返回
New execution identity or a checked validation failure.

在文件 SkillAction.cpp 第 88 行定义.

引用了 eve::Result< T >::failure(), makeDefinition(), makeRequest(), request, source , 以及 target.


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