One owned runtime effect fact. 更多...
#include <EffectTypes.h>
Public 成员函数 | |
| eve::Result< void > | addTag (const std::string &tag) |
| Adds a tag while retaining deterministic lexical order. | |
| eve::Result< void > | removeTag (const std::string &tag) |
| Removes a tag; an absent tag is an explicit NoOp result. | |
| bool | hasTag (const std::string &tag) const |
| Returns whether this effect has a tag. | |
| int | tagCount () const |
| Returns the number of tags. | |
| std::string | tagAt (int index) const |
| Returns a tag by lexical index, or an empty string. | |
Public 属性 | |
| std::string | id |
| std::string | subject |
| std::string | type |
| std::string | source |
| std::string | stackKey |
| int | priority = 0 |
| double | duration = 0.0 |
| double | remaining = -1.0 |
| double | period = 0.0 |
| Copied periodic interval; the common container owns its accumulator. | |
| double | periodElapsed = 0.0 |
| Elapsed time since the last periodic tick, owned by the instance lifecycle. | |
| double | magnitude = 0.0 |
| std::uint32_t | stackCount = 1 |
| EffectPayload | payload |
| std::vector< std::string > | tags |
| EffectPolicy | policy |
| Typed application policy projected from the current definition. | |
| eve::EffectId | identity |
| UUID-backed identity for persistence/event boundaries; nil in the legacy facade. | |
| eve::definition::InstanceIdentity | definitionIdentity |
| Canonical definition link used by the typed definition adapter. | |
| eve::definition::ReloadPolicy | reloadPolicy = eve::definition::ReloadPolicy::KeepInstanceValues |
详细描述
One owned runtime effect fact.
This object has lifecycle state only. It does not know how magnitude is settled, how tags affect an actor, or how a period causes damage/healing.
在文件 EffectTypes.h 第 127 行定义.
成员函数说明
◆ addTag()
| eve::Result< void > eve::effects::EffectInstance::addTag | ( | const std::string & | tag | ) |
Adds a tag while retaining deterministic lexical order.
在文件 EffectTypes.cpp 第 75 行定义.
引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::NoOp, eve::Status::success(), eve::Result< T >::success(), tag , 以及 tags.
◆ hasTag()
| bool eve::effects::EffectInstance::hasTag | ( | const std::string & | tag | ) | const |
◆ removeTag()
| eve::Result< void > eve::effects::EffectInstance::removeTag | ( | const std::string & | tag | ) |
Removes a tag; an absent tag is an explicit NoOp result.
在文件 EffectTypes.cpp 第 83 行定义.
引用了 eve::Applied, eve::NoOp, eve::Status::success(), eve::Result< T >::success(), tag , 以及 tags.
◆ tagAt()
| std::string eve::effects::EffectInstance::tagAt | ( | int | index | ) | const |
Returns a tag by lexical index, or an empty string.
在文件 EffectTypes.cpp 第 94 行定义.
◆ tagCount()
| int eve::effects::EffectInstance::tagCount | ( | ) | const |
类成员变量说明
◆ definitionIdentity
| eve::definition::InstanceIdentity eve::effects::EffectInstance::definitionIdentity |
Canonical definition link used by the typed definition adapter.
The legacy type string remains a one-way projection for old callers; new code checks this identity against the current definition generation.
在文件 EffectTypes.h 第 154 行定义.
◆ duration
| double eve::effects::EffectInstance::duration = 0.0 |
在文件 EffectTypes.h 第 134 行定义.
◆ id
| std::string eve::effects::EffectInstance::id |
在文件 EffectTypes.h 第 128 行定义.
◆ identity
| eve::EffectId eve::effects::EffectInstance::identity |
UUID-backed identity for persistence/event boundaries; nil in the legacy facade.
在文件 EffectTypes.h 第 147 行定义.
◆ magnitude
| double eve::effects::EffectInstance::magnitude = 0.0 |
在文件 EffectTypes.h 第 140 行定义.
◆ payload
| EffectPayload eve::effects::EffectInstance::payload |
在文件 EffectTypes.h 第 142 行定义.
◆ period
| double eve::effects::EffectInstance::period = 0.0 |
Copied periodic interval; the common container owns its accumulator.
在文件 EffectTypes.h 第 137 行定义.
◆ periodElapsed
| double eve::effects::EffectInstance::periodElapsed = 0.0 |
Elapsed time since the last periodic tick, owned by the instance lifecycle.
在文件 EffectTypes.h 第 139 行定义.
◆ policy
| EffectPolicy eve::effects::EffectInstance::policy |
Typed application policy projected from the current definition.
在文件 EffectTypes.h 第 145 行定义.
◆ priority
| int eve::effects::EffectInstance::priority = 0 |
在文件 EffectTypes.h 第 133 行定义.
◆ reloadPolicy
| eve::definition::ReloadPolicy eve::effects::EffectInstance::reloadPolicy = eve::definition::ReloadPolicy::KeepInstanceValues |
在文件 EffectTypes.h 第 155 行定义.
◆ remaining
| double eve::effects::EffectInstance::remaining = -1.0 |
在文件 EffectTypes.h 第 135 行定义.
◆ source
| std::string eve::effects::EffectInstance::source |
在文件 EffectTypes.h 第 131 行定义.
◆ stackCount
| std::uint32_t eve::effects::EffectInstance::stackCount = 1 |
在文件 EffectTypes.h 第 141 行定义.
◆ stackKey
| std::string eve::effects::EffectInstance::stackKey |
在文件 EffectTypes.h 第 132 行定义.
◆ subject
| std::string eve::effects::EffectInstance::subject |
在文件 EffectTypes.h 第 129 行定义.
◆ tags
| std::vector<std::string> eve::effects::EffectInstance::tags |
在文件 EffectTypes.h 第 143 行定义.
被这些函数引用 addTag(), eve::effects::EffectDefinitionRuntime::applyTo(), hasTag(), removeTag(), tagAt() , 以及 tagCount().
◆ type
| std::string eve::effects::EffectInstance::type |
在文件 EffectTypes.h 第 130 行定义.
该结构体的文档由以下文件生成:
- src/modules/effects/EffectTypes.h
- src/modules/effects/EffectTypes.cpp