RPG-facing attribute operations backed by the canonical AttributeSet. 更多...
#include <AttributeSystem.h>
静态 Public 成员函数 | |
| static AttributeOpTable & | customOps () |
| Process-wide custom policy registry used only for Custom modifiers. | |
| static void | setBase (RPGActor *actor, const std::string &attribute, double value) |
| Set a base value; invalid actor or attribute is a compatibility no-op. | |
| static double | getBase (RPGActor *actor, const std::string &attribute) |
| Read a base value, returning zero for a missing actor/attribute. | |
| static void | modifyBase (RPGActor *actor, const std::string &attribute, double delta) |
| Add a delta to a base value. | |
| static bool | hasAttribute (RPGActor *actor, const std::string &attribute) |
| Query whether an attribute exists on the actor. | |
| static eve::Result< ModifierId > | addModifier (RPGActor *actor, AttributeModifier modifier) |
| Add one canonical modifier to an actor. | |
| static std::string | addModifier (RPGActor *actor, const std::string &attribute, const std::string &source, const std::string &operation, double value, int priority=0) |
| Compatibility string facade for existing RPG/effects callers. | |
| static eve::Result< void > | removeModifier (RPGActor *actor, const ModifierId &modifierId) |
| Remove by canonical modifier id with a structured result. | |
| static bool | removeModifier (RPGActor *actor, const std::string &attribute, const std::string &modifierId) |
| Compatibility boolean removal facade. | |
| static eve::Result< int > | removeModifiersBySource (RPGActor *actor, const std::string &attribute, const std::string &source) |
| Remove source modifiers with a structured count result. | |
| static int | removeAllModifiersBySource (RPGActor *actor, const std::string &source) |
| Compatibility all-attribute source removal facade. | |
| static double | getFinal (RPGActor *actor, const std::string &attribute) |
| Compute the final value through the canonical attributes engine. | |
| static void | invalidate (RPGActor *actor, const std::string &attribute) |
| Mark a canonical attribute value dirty for its next built-in read. | |
详细描述
RPG-facing attribute operations backed by the canonical AttributeSet.
The string overloads are retained for existing scripts and effects. New C++ code should use the Result overloads and AttributeOperation enum.
在文件 AttributeSystem.h 第 29 行定义.
成员函数说明
◆ addModifier() [1/2]
|
static |
Add one canonical modifier to an actor.
- 返回
- The generated or supplied modifier id, or structured rejection.
在文件 AttributeSystem.cpp 第 49 行定义.
被这些函数引用 eve::rpg::RPGActor::addAttributeModifier(), eve::rpg::RPGActor::addAttributeModifier(), addModifier(), eve::rpg::TraitSystem::apply() , 以及 eve::rpg::EquipmentSystem::syncEquipModifiers().
◆ addModifier() [2/2]
|
static |
Compatibility string facade for existing RPG/effects callers.
- 返回
- Empty string when the request is rejected.
在文件 AttributeSystem.cpp 第 54 行定义.
引用了 addModifier(), eve::attributes::AttributeModifier::attribute, customOps(), operation, eve::attributes::AttributeModifier::operation, eve::attributes::parseAttributeOperation(), eve::attributes::AttributeModifier::policyId, priority, eve::attributes::AttributeModifier::priority, source, eve::attributes::AttributeModifier::source, value , 以及 eve::attributes::AttributeModifier::value.
◆ customOps()
|
static |
Process-wide custom policy registry used only for Custom modifiers.
在文件 AttributeSystem.cpp 第 28 行定义.
引用了 eve::rpg::table().
被这些函数引用 addModifier() , 以及 getFinal().
◆ getBase()
|
static |
Read a base value, returning zero for a missing actor/attribute.
在文件 AttributeSystem.cpp 第 37 行定义.
◆ getFinal()
|
static |
Compute the final value through the canonical attributes engine.
在文件 AttributeSystem.cpp 第 103 行定义.
引用了 customOps().
被这些函数引用 eve::rpg::SkillConditionContext::attribute(), eve::rpg::RPGActor::getFinalAttribute(), eve::rpg::VitalsSystem::getMax(), eve::rpg::BattleSystem::resolveHit() , 以及 eve::rpg::Battle::startRound().
◆ hasAttribute()
|
static |
Query whether an attribute exists on the actor.
在文件 AttributeSystem.cpp 第 45 行定义.
被这些函数引用 eve::rpg::SkillConditionContext::attribute() , 以及 eve::rpg::RPGActor::hasAttribute().
◆ invalidate()
|
static |
Mark a canonical attribute value dirty for its next built-in read.
在文件 AttributeSystem.cpp 第 107 行定义.
◆ modifyBase()
|
static |
Add a delta to a base value.
在文件 AttributeSystem.cpp 第 41 行定义.
◆ removeAllModifiersBySource()
|
static |
Compatibility all-attribute source removal facade.
在文件 AttributeSystem.cpp 第 98 行定义.
引用了 source.
被这些函数引用 eve::rpg::TraitSystem::remove(), eve::rpg::TraitSystem::removeAll(), eve::rpg::RPGActor::removeAllAttributeModifiersBySource(), eve::rpg::TraitSystem::removeBySource(), eve::rpg::TraitSystem::removeByTrait() , 以及 eve::rpg::EquipmentSystem::syncEquipModifiers().
◆ removeModifier() [1/2]
|
static |
Remove by canonical modifier id with a structured result.
在文件 AttributeSystem.cpp 第 81 行定义.
被这些函数引用 eve::rpg::RPGActor::removeAttributeModifier() , 以及 eve::rpg::RPGActor::removeAttributeModifier().
◆ removeModifier() [2/2]
|
static |
Compatibility boolean removal facade.
在文件 AttributeSystem.cpp 第 86 行定义.
◆ removeModifiersBySource()
|
static |
Remove source modifiers with a structured count result.
在文件 AttributeSystem.cpp 第 92 行定义.
引用了 source.
被这些函数引用 eve::rpg::RPGActor::removeAttributeModifiersBySource().
◆ setBase()
|
static |
Set a base value; invalid actor or attribute is a compatibility no-op.
在文件 AttributeSystem.cpp 第 33 行定义.
引用了 value.
该类的文档由以下文件生成:
- src/modules/rpg/AttributeSystem.h
- src/modules/rpg/AttributeSystem.cpp