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

RPG 模块(eve.RPG):Actor 工厂 + 定义注册 + 帧调度 + 事件缓存。 更多...

#include <RPG.h>

类 eve::rpg::RPG 继承关系图:
eve::Module

Public 成员函数

 Module_REG (RPG)
 
 RPG ()=default
 Rpg.
 
 ~RPG () override=default
 Rpg.
 
RPGActor * newActor ()
 创建一个空白 RPGActor。
 
Party * newParty ()
 Create an empty generation-safe party roster.
 
int registerEffectsFromJson (const std::string &json)
 效果定义注册(数据驱动,进程级注册表)。
 
void clearEffectDefinitions ()
 Clears effect definitions.
 
int getEffectDefinitionCount ()
 Returns the effect definition count.
 
int registerSkillsFromJson (const std::string &json)
 技能定义注册。
 
void clearSkillDefinitions ()
 Clears skill definitions.
 
int getSkillDefinitionCount ()
 Returns the skill definition count.
 
int registerQuestsFromJson (const std::string &json)
 任务定义注册。
 
eve::Result< int > replaceQuestsFromJson (const std::string &json)
 Strictly validate and atomically replace the process-local quest catalogue.
 
void clearQuestDefinitions ()
 
int getQuestDefinitionCount ()
 Returns the quest definition count.
 
bool hasQuestDefinition (const std::string &id) const
 Return whether one exact quest definition is present in the current catalogue.
 
eve::Result< int > claimQuestRewards (Tracker *tracker, GameState *gameState, inventory::Bag *bag, const std::string &questId)
 Atomically complete one ready quest and apply all item/attribute rewards.
 
eve::Result< int > collectWorldLoot (Tracker *tracker, GameState *gameState, inventory::Bag *bag, const WorldLootRequest &request)
 Atomically settle one persistent loot object across world, quest, state and inventory owners.
 
eve::Result< BattleVictoryReceipt > settleBattleVictory (RPGActor *actor, Tracker *tracker, GameState *gameState, const BattleVictoryRequest &request)
 Atomically settle one victorious persistent encounter.
 
eve::Result< int > buyFromShop (GameState *gameState, inventory::Bag *bag, const std::string &currencyId, const std::string &itemId, int quantity, double unitPrice)
 Atomically debit GameState currency and add purchased items to Bag.
 
eve::Result< int > sellToShop (GameState *gameState, inventory::Bag *bag, const std::string &currencyId, const std::string &itemId, int quantity, double unitPrice)
 Atomically remove sold items from Bag and credit GameState currency.
 
eve::Result< int > replaceShopOffersFromJson (const std::string &json)
 Strictly validate and atomically replace the authoritative shop catalogue.
 
int getShopOfferCount () const
 Return the committed shop-offer count.
 
void clearShopOffers ()
 Clear the shop catalogue for teardown or failed initial publication rollback.
 
bool hasShopOffer (const std::string &offerId) const
 Return whether an exact shop offer id exists.
 
std::string getShopOfferId (int index) const
 Returns the shop offer id.
 
std::string getShopOfferItemId (int index) const
 Returns the shop offer item id.
 
std::string getShopOfferName (int index) const
 Returns the shop offer name.
 
std::string getShopOfferDescription (int index) const
 Returns the shop offer description.
 
int getShopOfferBuyPrice (int index) const
 Returns the shop offer buy price.
 
int getShopOfferSellPrice (int index) const
 Returns the shop offer sell price.
 
eve::Result< int > buyShopOffer (GameState *gameState, inventory::Bag *bag, const std::string &currencyId, const std::string &offerId, int quantity)
 Buy using the item and price from the authoritative shop catalogue.
 
eve::Result< int > sellShopOffer (GameState *gameState, inventory::Bag *bag, const std::string &currencyId, const std::string &offerId, int quantity)
 Sell using the item and price from the authoritative shop catalogue.
 
eve::Result< int > replaceEncountersFromJson (const std::string &json)
 Strictly replace the data-driven encounter catalogue.
 
void clearEncounters ()
 
bool hasEncounter (const std::string &encounterId) const
 True when encounter.
 
int getEncounterMemberCount (const std::string &encounterId) const
 Returns the encounter member count.
 
RPGActor * newEncounterActor (const std::string &encounterId)
 Create the first member through the single-enemy compatibility facade.
 
RPGActor * newEncounterMemberActor (const std::string &encounterId, int memberIndex)
 Create one indexed member from an encounter composition.
 
std::string getEncounterDisplayName (const std::string &encounterId) const
 Returns the encounter display name.
 
double getEncounterMaxHp (const std::string &encounterId) const
 Returns the encounter max hp.
 
std::string getEncounterMemberDisplayName (const std::string &encounterId, int memberIndex) const
 Returns the encounter member display name.
 
double getEncounterMemberMaxHp (const std::string &encounterId, int memberIndex) const
 Returns the encounter member max hp.
 
eve::Result< int > replaceBattleTacticsFromJson (const std::string &json)
 Strictly replace ordered companion/AI battle tactics.
 
void clearBattleTactics ()
 
eve::Result< std::string > queueBattleTactic (Battle *battle, RPGActor *actor, const std::string &tacticsId)
 Select and queue one action from a registered tactics definition.
 
eve::Result< int > replaceStoryEventsFromJson (const std::string &json)
 Strictly validate and atomically replace versioned story-event content.
 
void clearStoryEvents ()
 Clear story-event content during teardown or content-package rollback.
 
int getStoryEventCount () const
 Return the number of committed story-event definitions.
 
bool hasStoryEvent (const std::string &eventId) const
 Return whether an exact story-event id exists.
 
StoryEventSession * newStoryEventSession ()
 Create an empty caller-owned story-event session.
 
eve::Result< int > replaceStoriesFromDnut (const std::string &source, const std::string &path)
 Strictly compile and atomically publish .dnut story content for the RPG dialect.
 
void clearStories ()
 Clear published .dnut story content during teardown or content rollback.
 
int getStoryCount () const
 Return the number of published .dnut stories.
 
bool hasStory (const std::string &storyId) const
 Return whether an exact .dnut story id exists.
 
RpgStorySession * newStorySession ()
 Create an empty caller-owned .dnut story session.
 
eve::Result< BattleVictoryReceipt > settleEncounterVictory (RPGActor *actor, Tracker *tracker, GameState *gameState, const std::string &encounterId, const std::string &mapId, const std::string &objectId)
 Settle a victory using only rewards declared by the encounter catalogue.
 
Tracker * newTracker ()
 创建一个新的目标追踪器(任务日志 / 成就 / 教程各建一份)。
 
int getLevelUpEventCount () const
 升级事件缓存(上一次 update() 产生的,供脚本轮询)。
 
RPGActor * getLevelUpEventActor (int index) const
 Returns the level up event actor.
 
int getLevelUpEventPreviousLevel (int index) const
 Returns the level up event previous level.
 
int getLevelUpEventNewLevel (int index) const
 Returns the level up event new level.
 
int getVitalsEventCount () const
 生命等资源事件缓存(上一次 update() 产生的,供脚本轮询)。
 
RPGActor * getVitalsEventActor (int index) const
 Returns the vitals event actor.
 
std::string getVitalsEventResource (int index) const
 Returns the vitals event resource.
 
std::string getVitalsEventAction (int index) const
 Returns the vitals event action.
 
double getVitalsEventAmount (int index) const
 Returns the vitals event amount.
 
std::string getVitalsEventSource (int index) const
 Returns the vitals event source.
 
double getVitalsEventCurrent (int index) const
 Returns the vitals event current.
 
double getVitalsEventMax (int index) const
 Returns the vitals event max.
 
int registerItemStatsFromJson (const std::string &itemId, const std::string &json)
 装备加成(物品 id → 属性加成)注册与同步。
 
void clearItemStats (const std::string &itemId)
 Clears item stats.
 
void clearAllItemStats ()
 Clears all item stats.
 
int getItemStatCount ()
 Returns the item stat count.
 
int syncEquipModifiers (RPGActor *actor, inventory::EquipmentSet *equip)
 把装备栏当前装备同步为 actor 属性修改器;返回施加条数。
 
int registerLootTablesFromJson (const std::string &json)
 掉落表注册与 roll。
 
void clearLootTables ()
 Clears loot tables.
 
int getLootTableCount ()
 Returns the loot table count.
 
int rollLoot (const std::string &tableId, inventory::Bag *bag, int seed)
 用种子随机流 roll 掉落表,把命中物品加入背包;返回掉落物品种类数。
 
int registerTraitsFromJson (const std::string &json)
 特征定义注册。
 
void clearTraitDefinitions ()
 Clears trait definitions.
 
int getTraitDefinitionCount ()
 Returns the trait definition count.
 
int registerClassesFromJson (const std::string &json)
 职业定义注册。
 
void clearClassDefinitions ()
 Clears class definitions.
 
int getClassDefinitionCount ()
 Returns the class definition count.
 
int registerSkillDamage (const std::string &skillId, const std::string &damageType, const std::string &formula, const std::string &element, double critChance, int hitChance)
 技能伤害注册(战斗用)与战斗对象。
 
void clearSkillDamage ()
 Clears skill damage.
 
Battle * newBattle ()
 创建一场新的回合制战斗。
 
Result< std::unique_ptr< BattleControl > > newBattleControl (Battle *battle, SubjectRef instance)
 Create a host-neutral control adapter for a caller-owned battle.
 
Result< std::unique_ptr< ProductControl > > newProductControl (SubjectRef instance, GameState *gameState, Tracker *tracker, inventory::Bag *bag)
 Create a unified shop, quest-reward and world-loot control adapter.
 
GameState * newGameState ()
 创建一份新的游戏状态(开关/变量)。
 
WorldState * newWorldState (GameState *gameState)
 Create a typed per-map object-state adapter over one GameState owner.
 
GameState * globalGameState ()
 进程级全局游戏状态(借用,不销毁)。
 
void update (float dt)
 推进 StatusSystem / SkillSystem,并刷新本帧的 tick / change / cast 事件缓存。
 
int getTickEventCount () const
 周期状态 tick 事件(上一次 update() 产生的,供脚本轮询)。
 
RPGActor * getTickEventActor (int index) const
 Returns the actor referenced by a retained tick event, or null for an invalid index.
 
int getTickEventInstanceId (int index) const
 Returns the tick event instance id.
 
std::string getTickEventEffectId (int index) const
 Returns the tick event effect id.
 
std::string getTickEventSource (int index) const
 Returns the tick event source.
 
int getTickEventStacks (int index) const
 Returns the tick event stacks.
 
int getStatusChangeEventCount () const
 状态生命周期变更事件(apply/refresh/extend/stack/remove/expire/reject)。
 
RPGActor * getStatusChangeEventActor (int index) const
 Returns the actor referenced by a status event, or null for an invalid index.
 
int getStatusChangeEventInstanceId (int index) const
 Returns the status change event instance id.
 
std::string getStatusChangeEventEffectId (int index) const
 Returns the status change event effect id.
 
std::string getStatusChangeEventSource (int index) const
 Returns the status change event source.
 
std::string getStatusChangeEventAction (int index) const
 Returns the status change event action.
 
int getStatusChangeEventStacks (int index) const
 Returns the status change event stacks.
 
std::string getStatusChangeEventReason (int index) const
 Returns the status change event reason.
 
int getCastEventCount () const
 技能释放结算事件。
 
RPGActor * getCastEventCaster (int index) const
 Returns the caster referenced by a cast event, or null for an invalid index.
 
RPGActor * getCastEventTarget (int index) const
 Returns the target referenced by a cast event, or null for an invalid index.
 
std::string getCastEventSkillId (int index) const
 Returns the cast event skill id.
 
SettlementContext * newSettlementContext ()
 结算:新建上下文 / 运行流水线 / 配置阶段。
 
void runSettlement (const std::string &pipeline, SettlementContext *ctx)
 Run settlement.
 
int getSettlementStageCount (const std::string &pipeline)
 Returns the settlement stage count.
 
bool hasSettlementStage (const std::string &pipeline, const std::string &stage)
 True when settlement stage.
 
bool setSettlementStageEnabled (const std::string &pipeline, const std::string &stage, bool enabled)
 Sets the settlement stage enabled.
 
bool setSettlementStagePriority (const std::string &pipeline, const std::string &stage, int priority)
 Sets the settlement stage priority.
 
bool removeSettlementStage (const std::string &pipeline, const std::string &stage)
 Removes settlement stage.
 
void clearSettlementPipeline (const std::string &pipeline)
 Clears settlement pipeline.
 
- Public 成员函数 继承自 eve::Module
virtual ~Module ()
 Module.
 
virtual std::string getName () const =0
 Returns the name.
 

详细描述

RPG 模块(eve.RPG):Actor 工厂 + 定义注册 + 帧调度 + 事件缓存。

在文件 RPG.h 第 56 行定义.

构造及析构函数说明

◆ RPG()

eve::rpg::RPG::RPG ( )
default

Rpg.

◆ ~RPG()

eve::rpg::RPG::~RPG ( )
overridedefault

Rpg.

成员函数说明

◆ buyFromShop()

eve::Result< int > eve::rpg::RPG::buyFromShop ( GameState *  gameState,
inventory::Bag *  bag,
const std::string &  currencyId,
const std::string &  itemId,
int  quantity,
double  unitPrice 
)

Atomically debit GameState currency and add purchased items to Bag.

在文件 RPG.cpp 第 108 行定义.

引用了 eve::rpg::ShopTransaction::buy(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 itemId.

◆ buyShopOffer()

eve::Result< int > eve::rpg::RPG::buyShopOffer ( GameState *  gameState,
inventory::Bag *  bag,
const std::string &  currencyId,
const std::string &  offerId,
int  quantity 
)

Buy using the item and price from the authoritative shop catalogue.

在文件 RPG.cpp 第 170 行定义.

引用了 eve::rpg::ShopTransaction::buyOffer(), eve::Diagnostic::error(), eve::Result< T >::failure() , 以及 eve::InvalidArgument.

◆ claimQuestRewards()

eve::Result< int > eve::rpg::RPG::claimQuestRewards ( Tracker *  tracker,
GameState *  gameState,
inventory::Bag *  bag,
const std::string &  questId 
)

Atomically complete one ready quest and apply all item/attribute rewards.

返回
Committed reward-entry count, or a structured failure without observable mutation. @thread Call on the authoritative state owners' simulation thread. @reentrancy Inventory observers run only after the complete state is committed.

在文件 RPG.cpp 第 77 行定义.

引用了 eve::rpg::QuestReward::claim(), eve::Diagnostic::error(), eve::Result< T >::failure() , 以及 eve::InvalidArgument.

◆ clearAllItemStats()

void eve::rpg::RPG::clearAllItemStats ( )

Clears all item stats.

在文件 RPG.cpp 第 346 行定义.

引用了 eve::rpg::EquipmentSystem::clearAll().

◆ clearBattleTactics()

void eve::rpg::RPG::clearBattleTactics ( )

在文件 RPG.cpp 第 233 行定义.

引用了 eve::rpg::BattleTacticsCatalogue::clear().

◆ clearClassDefinitions()

void eve::rpg::RPG::clearClassDefinitions ( )

Clears class definitions.

在文件 RPG.cpp 第 423 行定义.

引用了 eve::rpg::ClassRegistry::clear().

◆ clearEffectDefinitions()

void eve::rpg::RPG::clearEffectDefinitions ( )

Clears effect definitions.

在文件 RPG.cpp 第 51 行定义.

引用了 eve::rpg::EffectRegistry::clear().

◆ clearEncounters()

void eve::rpg::RPG::clearEncounters ( )

在文件 RPG.cpp 第 193 行定义.

引用了 eve::rpg::EncounterCatalogue::clear().

◆ clearItemStats()

void eve::rpg::RPG::clearItemStats ( const std::string &  itemId)

Clears item stats.

在文件 RPG.cpp 第 344 行定义.

引用了 eve::rpg::EquipmentSystem::clearItemStats() , 以及 itemId.

◆ clearLootTables()

void eve::rpg::RPG::clearLootTables ( )

Clears loot tables.

在文件 RPG.cpp 第 358 行定义.

引用了 eve::rpg::LootSystem::clear().

◆ clearQuestDefinitions()

void eve::rpg::RPG::clearQuestDefinitions ( )

在文件 RPG.cpp 第 71 行定义.

引用了 eve::rpg::QuestRegistry::clear().

◆ clearSettlementPipeline()

void eve::rpg::RPG::clearSettlementPipeline ( const std::string &  pipeline)

Clears settlement pipeline.

在文件 RPG.cpp 第 553 行定义.

引用了 eve::rpg::SettlementPipeline::clearPipeline().

◆ clearShopOffers()

void eve::rpg::RPG::clearShopOffers ( )

Clear the shop catalogue for teardown or failed initial publication rollback.

在文件 RPG.cpp 第 134 行定义.

引用了 eve::rpg::ShopCatalogue::clear().

◆ clearSkillDamage()

void eve::rpg::RPG::clearSkillDamage ( )

Clears skill damage.

在文件 RPG.cpp 第 388 行定义.

引用了 eve::rpg::BattleSystem::clearSkillDamage().

◆ clearSkillDefinitions()

void eve::rpg::RPG::clearSkillDefinitions ( )

Clears skill definitions.

在文件 RPG.cpp 第 59 行定义.

引用了 eve::rpg::SkillRegistry::clear().

◆ clearStories()

void eve::rpg::RPG::clearStories ( )

Clear published .dnut story content during teardown or content rollback.

在文件 RPG.cpp 第 250 行定义.

引用了 eve::rpg::RpgStoryCatalogue::clear().

◆ clearStoryEvents()

void eve::rpg::RPG::clearStoryEvents ( )

Clear story-event content during teardown or content-package rollback.

在文件 RPG.cpp 第 241 行定义.

引用了 eve::rpg::StoryEventCatalogue::clear().

◆ clearTraitDefinitions()

void eve::rpg::RPG::clearTraitDefinitions ( )

Clears trait definitions.

在文件 RPG.cpp 第 371 行定义.

引用了 eve::rpg::TraitRegistry::clear().

◆ collectWorldLoot()

eve::Result< int > eve::rpg::RPG::collectWorldLoot ( Tracker *  tracker,
GameState *  gameState,
inventory::Bag *  bag,
const WorldLootRequest &  request 
)

Atomically settle one persistent loot object across world, quest, state and inventory owners.

返回
Committed-effect count, or a structured failure without observable mutation. @thread Call on the authoritative owners' simulation thread. @reentrancy Inventory observers run only after all owners are committed.

在文件 RPG.cpp 第 87 行定义.

引用了 eve::rpg::WorldInteraction::collectLoot(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 request.

◆ getCastEventCaster()

RPGActor * eve::rpg::RPG::getCastEventCaster ( int  index) const

Returns the caster referenced by a cast event, or null for an invalid index.

返回
Borrowed nullable ECS actor pointer from the event projection. @ownership The ECS world owns the actor; the event cache never transfers ownership. @lifetime Valid until actor/world destruction; use a persistent identity or handle after polling. @thread Call on the RPG simulation thread before the next event-producing update. @reentrancy Do not retain across callbacks or event-cache refresh.

在文件 RPG.cpp 第 509 行定义.

引用了 index.

◆ getCastEventCount()

int eve::rpg::RPG::getCastEventCount ( ) const

技能释放结算事件。

在文件 RPG.cpp 第 507 行定义.

◆ getCastEventSkillId()

std::string eve::rpg::RPG::getCastEventSkillId ( int  index) const

Returns the cast event skill id.

在文件 RPG.cpp 第 519 行定义.

引用了 index.

◆ getCastEventTarget()

RPGActor * eve::rpg::RPG::getCastEventTarget ( int  index) const

Returns the target referenced by a cast event, or null for an invalid index.

返回
Borrowed nullable ECS actor pointer from the event projection. @ownership The ECS world owns the actor; the event cache never transfers ownership. @lifetime Valid until actor/world destruction; use a persistent identity or handle after polling. @thread Call on the RPG simulation thread before the next event-producing update. @reentrancy Do not retain across callbacks or event-cache refresh.

在文件 RPG.cpp 第 514 行定义.

引用了 index.

◆ getClassDefinitionCount()

int eve::rpg::RPG::getClassDefinitionCount ( )

Returns the class definition count.

在文件 RPG.cpp 第 425 行定义.

引用了 eve::rpg::ClassRegistry::count().

◆ getEffectDefinitionCount()

int eve::rpg::RPG::getEffectDefinitionCount ( )

Returns the effect definition count.

在文件 RPG.cpp 第 53 行定义.

引用了 eve::rpg::EffectRegistry::count().

◆ getEncounterDisplayName()

std::string eve::rpg::RPG::getEncounterDisplayName ( const std::string &  encounterId) const

Returns the encounter display name.

在文件 RPG.cpp 第 206 行定义.

引用了 eve::rpg::EncounterCatalogue::find().

◆ getEncounterMaxHp()

double eve::rpg::RPG::getEncounterMaxHp ( const std::string &  encounterId) const

Returns the encounter max hp.

在文件 RPG.cpp 第 210 行定义.

引用了 eve::rpg::EncounterCatalogue::find().

◆ getEncounterMemberCount()

int eve::rpg::RPG::getEncounterMemberCount ( const std::string &  encounterId) const

Returns the encounter member count.

在文件 RPG.cpp 第 197 行定义.

引用了 eve::rpg::EncounterCatalogue::memberCount().

◆ getEncounterMemberDisplayName()

std::string eve::rpg::RPG::getEncounterMemberDisplayName ( const std::string &  encounterId,
int  memberIndex 
) const

Returns the encounter member display name.

在文件 RPG.cpp 第 214 行定义.

引用了 eve::rpg::EncounterCatalogue::find().

◆ getEncounterMemberMaxHp()

double eve::rpg::RPG::getEncounterMemberMaxHp ( const std::string &  encounterId,
int  memberIndex 
) const

Returns the encounter member max hp.

在文件 RPG.cpp 第 222 行定义.

引用了 eve::rpg::EncounterCatalogue::find().

◆ getItemStatCount()

int eve::rpg::RPG::getItemStatCount ( )

Returns the item stat count.

在文件 RPG.cpp 第 348 行定义.

引用了 eve::rpg::EquipmentSystem::statItemCount().

◆ getLevelUpEventActor()

RPGActor * eve::rpg::RPG::getLevelUpEventActor ( int  index) const

Returns the level up event actor.

在文件 RPG.cpp 第 288 行定义.

引用了 index.

◆ getLevelUpEventCount()

int eve::rpg::RPG::getLevelUpEventCount ( ) const

升级事件缓存(上一次 update() 产生的,供脚本轮询)。

在文件 RPG.cpp 第 286 行定义.

◆ getLevelUpEventNewLevel()

int eve::rpg::RPG::getLevelUpEventNewLevel ( int  index) const

Returns the level up event new level.

在文件 RPG.cpp 第 298 行定义.

引用了 index.

◆ getLevelUpEventPreviousLevel()

int eve::rpg::RPG::getLevelUpEventPreviousLevel ( int  index) const

Returns the level up event previous level.

在文件 RPG.cpp 第 293 行定义.

引用了 index.

◆ getLootTableCount()

int eve::rpg::RPG::getLootTableCount ( )

Returns the loot table count.

在文件 RPG.cpp 第 360 行定义.

引用了 eve::rpg::LootSystem::count().

◆ getQuestDefinitionCount()

int eve::rpg::RPG::getQuestDefinitionCount ( )

Returns the quest definition count.

在文件 RPG.cpp 第 73 行定义.

引用了 eve::rpg::QuestRegistry::count().

◆ getSettlementStageCount()

int eve::rpg::RPG::getSettlementStageCount ( const std::string &  pipeline)

Returns the settlement stage count.

在文件 RPG.cpp 第 531 行定义.

引用了 eve::rpg::SettlementPipeline::stageCount().

◆ getShopOfferBuyPrice()

int eve::rpg::RPG::getShopOfferBuyPrice ( int  index) const

Returns the shop offer buy price.

在文件 RPG.cpp 第 160 行定义.

引用了 eve::rpg::ShopCatalogue::at() , 以及 index.

◆ getShopOfferCount()

int eve::rpg::RPG::getShopOfferCount ( ) const

Return the committed shop-offer count.

在文件 RPG.cpp 第 132 行定义.

引用了 eve::rpg::ShopCatalogue::count().

◆ getShopOfferDescription()

std::string eve::rpg::RPG::getShopOfferDescription ( int  index) const

Returns the shop offer description.

在文件 RPG.cpp 第 155 行定义.

引用了 eve::rpg::ShopCatalogue::at() , 以及 index.

◆ getShopOfferId()

std::string eve::rpg::RPG::getShopOfferId ( int  index) const

Returns the shop offer id.

在文件 RPG.cpp 第 140 行定义.

引用了 eve::rpg::ShopCatalogue::at() , 以及 index.

◆ getShopOfferItemId()

std::string eve::rpg::RPG::getShopOfferItemId ( int  index) const

Returns the shop offer item id.

在文件 RPG.cpp 第 145 行定义.

引用了 eve::rpg::ShopCatalogue::at() , 以及 index.

◆ getShopOfferName()

std::string eve::rpg::RPG::getShopOfferName ( int  index) const

Returns the shop offer name.

在文件 RPG.cpp 第 150 行定义.

引用了 eve::rpg::ShopCatalogue::at() , 以及 index.

◆ getShopOfferSellPrice()

int eve::rpg::RPG::getShopOfferSellPrice ( int  index) const

Returns the shop offer sell price.

在文件 RPG.cpp 第 165 行定义.

引用了 eve::rpg::ShopCatalogue::at() , 以及 index.

◆ getSkillDefinitionCount()

int eve::rpg::RPG::getSkillDefinitionCount ( )

Returns the skill definition count.

在文件 RPG.cpp 第 61 行定义.

引用了 eve::rpg::SkillRegistry::count().

◆ getStatusChangeEventAction()

std::string eve::rpg::RPG::getStatusChangeEventAction ( int  index) const

Returns the status change event action.

在文件 RPG.cpp 第 492 行定义.

引用了 index.

◆ getStatusChangeEventActor()

RPGActor * eve::rpg::RPG::getStatusChangeEventActor ( int  index) const

Returns the actor referenced by a status event, or null for an invalid index.

返回
Borrowed nullable ECS actor pointer from the event projection. @ownership The ECS world owns the actor; the event cache never transfers ownership. @lifetime Valid until actor/world destruction; use a persistent identity or handle after polling. @thread Call on the RPG simulation thread before the next event-producing update. @reentrancy Do not retain across callbacks or event-cache refresh.

在文件 RPG.cpp 第 472 行定义.

引用了 index.

◆ getStatusChangeEventCount()

int eve::rpg::RPG::getStatusChangeEventCount ( ) const

状态生命周期变更事件(apply/refresh/extend/stack/remove/expire/reject)。

在文件 RPG.cpp 第 470 行定义.

◆ getStatusChangeEventEffectId()

std::string eve::rpg::RPG::getStatusChangeEventEffectId ( int  index) const

Returns the status change event effect id.

在文件 RPG.cpp 第 482 行定义.

引用了 index.

◆ getStatusChangeEventInstanceId()

int eve::rpg::RPG::getStatusChangeEventInstanceId ( int  index) const

Returns the status change event instance id.

在文件 RPG.cpp 第 477 行定义.

引用了 index.

◆ getStatusChangeEventReason()

std::string eve::rpg::RPG::getStatusChangeEventReason ( int  index) const

Returns the status change event reason.

在文件 RPG.cpp 第 502 行定义.

引用了 index.

◆ getStatusChangeEventSource()

std::string eve::rpg::RPG::getStatusChangeEventSource ( int  index) const

Returns the status change event source.

在文件 RPG.cpp 第 487 行定义.

引用了 index.

◆ getStatusChangeEventStacks()

int eve::rpg::RPG::getStatusChangeEventStacks ( int  index) const

Returns the status change event stacks.

在文件 RPG.cpp 第 497 行定义.

引用了 index.

◆ getStoryCount()

int eve::rpg::RPG::getStoryCount ( ) const

Return the number of published .dnut stories.

在文件 RPG.cpp 第 251 行定义.

引用了 eve::rpg::RpgStoryCatalogue::count().

◆ getStoryEventCount()

int eve::rpg::RPG::getStoryEventCount ( ) const

Return the number of committed story-event definitions.

在文件 RPG.cpp 第 242 行定义.

引用了 eve::rpg::StoryEventCatalogue::count().

◆ getTickEventActor()

RPGActor * eve::rpg::RPG::getTickEventActor ( int  index) const

Returns the actor referenced by a retained tick event, or null for an invalid index.

返回
Borrowed nullable ECS actor pointer from the event projection. @ownership The ECS world owns the actor; the event cache never transfers ownership. @lifetime Valid until actor/world destruction; use the actor's persistent identity or handle after the poll. @thread Call on the RPG simulation thread before the next event-producing update. @reentrancy Do not retain across callbacks or event-cache refresh.

在文件 RPG.cpp 第 445 行定义.

引用了 index.

◆ getTickEventCount()

int eve::rpg::RPG::getTickEventCount ( ) const

周期状态 tick 事件(上一次 update() 产生的,供脚本轮询)。

在文件 RPG.cpp 第 443 行定义.

◆ getTickEventEffectId()

std::string eve::rpg::RPG::getTickEventEffectId ( int  index) const

Returns the tick event effect id.

在文件 RPG.cpp 第 455 行定义.

引用了 index.

◆ getTickEventInstanceId()

int eve::rpg::RPG::getTickEventInstanceId ( int  index) const

Returns the tick event instance id.

在文件 RPG.cpp 第 450 行定义.

引用了 index.

◆ getTickEventSource()

std::string eve::rpg::RPG::getTickEventSource ( int  index) const

Returns the tick event source.

在文件 RPG.cpp 第 460 行定义.

引用了 index.

◆ getTickEventStacks()

int eve::rpg::RPG::getTickEventStacks ( int  index) const

Returns the tick event stacks.

在文件 RPG.cpp 第 465 行定义.

引用了 index.

◆ getTraitDefinitionCount()

int eve::rpg::RPG::getTraitDefinitionCount ( )

Returns the trait definition count.

在文件 RPG.cpp 第 373 行定义.

引用了 eve::rpg::TraitRegistry::count().

◆ getVitalsEventAction()

std::string eve::rpg::RPG::getVitalsEventAction ( int  index) const

Returns the vitals event action.

在文件 RPG.cpp 第 315 行定义.

引用了 index.

◆ getVitalsEventActor()

RPGActor * eve::rpg::RPG::getVitalsEventActor ( int  index) const

Returns the vitals event actor.

在文件 RPG.cpp 第 305 行定义.

引用了 index.

◆ getVitalsEventAmount()

double eve::rpg::RPG::getVitalsEventAmount ( int  index) const

Returns the vitals event amount.

在文件 RPG.cpp 第 320 行定义.

引用了 index.

◆ getVitalsEventCount()

int eve::rpg::RPG::getVitalsEventCount ( ) const

生命等资源事件缓存(上一次 update() 产生的,供脚本轮询)。

在文件 RPG.cpp 第 303 行定义.

◆ getVitalsEventCurrent()

double eve::rpg::RPG::getVitalsEventCurrent ( int  index) const

Returns the vitals event current.

在文件 RPG.cpp 第 330 行定义.

引用了 index.

◆ getVitalsEventMax()

double eve::rpg::RPG::getVitalsEventMax ( int  index) const

Returns the vitals event max.

在文件 RPG.cpp 第 335 行定义.

引用了 index.

◆ getVitalsEventResource()

std::string eve::rpg::RPG::getVitalsEventResource ( int  index) const

Returns the vitals event resource.

在文件 RPG.cpp 第 310 行定义.

引用了 index.

◆ getVitalsEventSource()

std::string eve::rpg::RPG::getVitalsEventSource ( int  index) const

Returns the vitals event source.

在文件 RPG.cpp 第 325 行定义.

引用了 index.

◆ globalGameState()

GameState * eve::rpg::RPG::globalGameState ( )

进程级全局游戏状态(借用,不销毁)。

返回
Borrowed nullable global GameState owned by the process.

在文件 RPG.cpp 第 417 行定义.

引用了 eve::rpg::GameState::global().

◆ hasEncounter()

bool eve::rpg::RPG::hasEncounter ( const std::string &  encounterId) const

True when encounter.

在文件 RPG.cpp 第 194 行定义.

引用了 eve::rpg::EncounterCatalogue::find().

◆ hasQuestDefinition()

bool eve::rpg::RPG::hasQuestDefinition ( const std::string &  id) const

Return whether one exact quest definition is present in the current catalogue.

在文件 RPG.cpp 第 75 行定义.

引用了 eve::rpg::QuestRegistry::contains().

◆ hasSettlementStage()

bool eve::rpg::RPG::hasSettlementStage ( const std::string &  pipeline,
const std::string &  stage 
)

True when settlement stage.

在文件 RPG.cpp 第 535 行定义.

引用了 eve::rpg::SettlementPipeline::hasStage().

◆ hasShopOffer()

bool eve::rpg::RPG::hasShopOffer ( const std::string &  offerId) const

Return whether an exact shop offer id exists.

在文件 RPG.cpp 第 136 行定义.

引用了 eve::rpg::ShopCatalogue::find().

◆ hasStory()

bool eve::rpg::RPG::hasStory ( const std::string &  storyId) const

Return whether an exact .dnut story id exists.

在文件 RPG.cpp 第 252 行定义.

引用了 eve::rpg::RpgStoryCatalogue::contains().

◆ hasStoryEvent()

bool eve::rpg::RPG::hasStoryEvent ( const std::string &  eventId) const

Return whether an exact story-event id exists.

在文件 RPG.cpp 第 243 行定义.

引用了 eve::rpg::StoryEventCatalogue::contains().

◆ Module_REG()

eve::rpg::RPG::Module_REG ( RPG  )

◆ newActor()

RPGActor * eve::rpg::RPG::newActor ( )

创建一个空白 RPGActor。

返回
Borrowed nullable pointer to an ECS-owned actor; null means creation failed. @ownership The ECS world owns the actor; callers must release it through ECS and never delete it. @lifetime Valid until actor/world destruction; retain the generation-qualified EntityHandle across frames. @thread Call on the RPG module's owning ECS thread. @reentrancy The factory invokes no user callbacks; do not re-enter structural ECS mutation while using the result.

在文件 RPG.cpp 第 45 行定义.

引用了 eve::rpg::RPGActor::createActor().

◆ newBattle()

Battle * eve::rpg::RPG::newBattle ( )

创建一场新的回合制战斗。

返回
Owned nullable Battle; the caller must destroy it after the battle ends. @ownership The caller owns the returned battle and is responsible for its destruction. @lifetime Valid until the caller destroys it; not retained by RPG. @thread Create and drive on the owning simulation thread.

在文件 RPG.cpp 第 390 行定义.

◆ newBattleControl()

Result< std::unique_ptr< BattleControl > > eve::rpg::RPG::newBattleControl ( Battle *  battle,
SubjectRef  instance 
)

Create a host-neutral control adapter for a caller-owned battle.

参数
battleBorrowed battle that must outlive the returned adapter.
instanceStable identity used by player, test and AI clients.
返回
Owning adapter or structured validation failure. @ownership The returned unique pointer owns the adapter and must be reset before battle destruction. @thread Create and use on the RPG simulation thread.

在文件 RPG.cpp 第 392 行定义.

引用了 eve::Diagnostic::error(), eve::InvalidArgument , 以及 eve::SubjectRef::isValid().

◆ newEncounterActor()

RPGActor * eve::rpg::RPG::newEncounterActor ( const std::string &  encounterId)

Create the first member through the single-enemy compatibility facade.

返回
Borrowed nullable actor owned by the RPG ECS world. @ownership The RPG ECS world owns the actor; callers release it through RPGActor::release(). @lifetime Valid until release, RPG teardown, or owning ECS world reset. @thread Call on the owning simulation thread. @reentrancy Does not invoke callbacks.

在文件 RPG.cpp 第 200 行定义.

引用了 eve::rpg::EncounterCatalogue::createActor().

◆ newEncounterMemberActor()

RPGActor * eve::rpg::RPG::newEncounterMemberActor ( const std::string &  encounterId,
int  memberIndex 
)

Create one indexed member from an encounter composition.

返回
Borrowed nullable actor owned by the RPG ECS world. @ownership The RPG ECS world owns the actor; callers release it through RPGActor::release(). @lifetime Valid until release, RPG teardown, or owning ECS world reset. @thread Call on the owning simulation thread. @reentrancy Does not invoke callbacks.

在文件 RPG.cpp 第 203 行定义.

引用了 eve::rpg::EncounterCatalogue::createMemberActor().

◆ newGameState()

GameState * eve::rpg::RPG::newGameState ( )

创建一份新的游戏状态(开关/变量)。

返回
Owned nullable GameState; the caller must destroy it. @ownership The caller owns the returned state and is responsible for its destruction. @lifetime Valid until the caller destroys it; not retained by RPG.

在文件 RPG.cpp 第 411 行定义.

◆ newParty()

Party * eve::rpg::RPG::newParty ( )

Create an empty generation-safe party roster.

返回
Owned nullable party; the caller is responsible for destruction. @ownership The caller owns the Party, which never owns its linked actors. @lifetime Valid until caller destruction; linked actors may independently become stale. @thread Call and use on the RPG simulation thread.

在文件 RPG.cpp 第 43 行定义.

◆ newProductControl()

Result< std::unique_ptr< ProductControl > > eve::rpg::RPG::newProductControl ( SubjectRef  instance,
GameState *  gameState,
Tracker *  tracker,
inventory::Bag *  bag 
)

Create a unified shop, quest-reward and world-loot control adapter.

返回
Owning adapter or structured validation failure. @ownership Reset the returned unique pointer before GameState, Tracker or Bag destruction. @thread Create and use on all participants' common simulation thread.

在文件 RPG.cpp 第 401 行定义.

引用了 eve::Diagnostic::error(), eve::InvalidArgument , 以及 eve::SubjectRef::isValid().

◆ newSettlementContext()

SettlementContext * eve::rpg::RPG::newSettlementContext ( )

结算:新建上下文 / 运行流水线 / 配置阶段。

返回
Owned nullable heap context; the caller must destroy it after the synchronous pipeline call. @ownership The caller owns the returned context and is responsible for its explicit destruction. @lifetime Valid until the caller destroys it; it is not retained by RPG or the settlement registry. @thread Create and use on the owning simulation thread. @reentrancy Construction invokes no external callbacks; do not pass the context to re-entrant mutation.

在文件 RPG.cpp 第 524 行定义.

◆ newStoryEventSession()

StoryEventSession * eve::rpg::RPG::newStoryEventSession ( )

Create an empty caller-owned story-event session.

返回
Owned nullable session; caller destroys it after use. @ownership The caller owns the session; it owns no GameState or presentation object. @thread Create and use on the RPG simulation thread. @reentrancy Construction invokes no callbacks.

在文件 RPG.cpp 第 246 行定义.

◆ newStorySession()

RpgStorySession * eve::rpg::RPG::newStorySession ( )

Create an empty caller-owned .dnut story session.

返回
Owned nullable session; caller destroys it after use. @ownership The caller owns the session, which borrows domain objects only for a call. @thread Create and use on the RPG simulation thread. @reentrancy Construction invokes no callbacks.

在文件 RPG.cpp 第 253 行定义.

◆ newTracker()

Tracker * eve::rpg::RPG::newTracker ( )

创建一个新的目标追踪器(任务日志 / 成就 / 教程各建一份)。

返回
Owned nullable tracker created with new; the caller must destroy it. @ownership The caller owns the returned tracker and is responsible for its destruction. @lifetime Valid until the caller destroys it; not retained by RPG. @thread Create and use on the owning simulation thread. @reentrancy Construction calls syncAuto which emits activation events; poll before reading.

在文件 RPG.cpp 第 284 行定义.

◆ newWorldState()

WorldState * eve::rpg::RPG::newWorldState ( GameState *  gameState)

Create a typed per-map object-state adapter over one GameState owner.

参数
gameStateBorrowed authoritative state that must outlive the returned adapter.
返回
Caller-owned adapter, or null when gameState is null. @ownership Caller destroys the adapter; it never owns GameState. @thread Create and use on the GameState owning simulation thread. @reentrancy No callbacks are invoked.

在文件 RPG.cpp 第 413 行定义.

◆ queueBattleTactic()

eve::Result< std::string > eve::rpg::RPG::queueBattleTactic ( Battle *  battle,
RPGActor *  actor,
const std::string &  tacticsId 
)

Select and queue one action from a registered tactics definition.

在文件 RPG.cpp 第 234 行定义.

引用了 eve::rpg::BattleTacticsCatalogue::queueAction().

◆ registerClassesFromJson()

int eve::rpg::RPG::registerClassesFromJson ( const std::string &  json)

职业定义注册。

在文件 RPG.cpp 第 419 行定义.

引用了 eve::rpg::ClassRegistry::loadFromJson().

◆ registerEffectsFromJson()

int eve::rpg::RPG::registerEffectsFromJson ( const std::string &  json)

效果定义注册(数据驱动,进程级注册表)。

在文件 RPG.cpp 第 47 行定义.

引用了 eve::rpg::EffectRegistry::loadFromJson().

◆ registerItemStatsFromJson()

int eve::rpg::RPG::registerItemStatsFromJson ( const std::string &  itemId,
const std::string &  json 
)

装备加成(物品 id → 属性加成)注册与同步。

在文件 RPG.cpp 第 340 行定义.

引用了 itemId , 以及 eve::rpg::EquipmentSystem::registerItemStatsFromJson().

◆ registerLootTablesFromJson()

int eve::rpg::RPG::registerLootTablesFromJson ( const std::string &  json)

掉落表注册与 roll。

在文件 RPG.cpp 第 354 行定义.

引用了 eve::rpg::LootSystem::registerTablesFromJson().

◆ registerQuestsFromJson()

int eve::rpg::RPG::registerQuestsFromJson ( const std::string &  json)

任务定义注册。

在文件 RPG.cpp 第 63 行定义.

引用了 eve::rpg::QuestRegistry::loadFromJson().

◆ registerSkillDamage()

int eve::rpg::RPG::registerSkillDamage ( const std::string &  skillId,
const std::string &  damageType,
const std::string &  formula,
const std::string &  element,
double  critChance,
int  hitChance 
)

◆ registerSkillsFromJson()

int eve::rpg::RPG::registerSkillsFromJson ( const std::string &  json)

技能定义注册。

在文件 RPG.cpp 第 55 行定义.

引用了 eve::rpg::SkillRegistry::loadFromJson().

◆ registerTraitsFromJson()

int eve::rpg::RPG::registerTraitsFromJson ( const std::string &  json)

特征定义注册。

在文件 RPG.cpp 第 367 行定义.

引用了 eve::rpg::TraitRegistry::loadFromJson().

◆ removeSettlementStage()

bool eve::rpg::RPG::removeSettlementStage ( const std::string &  pipeline,
const std::string &  stage 
)

Removes settlement stage.

在文件 RPG.cpp 第 549 行定义.

引用了 eve::rpg::SettlementPipeline::unregisterStage().

◆ replaceBattleTacticsFromJson()

eve::Result< int > eve::rpg::RPG::replaceBattleTacticsFromJson ( const std::string &  json)

Strictly replace ordered companion/AI battle tactics.

在文件 RPG.cpp 第 230 行定义.

引用了 eve::rpg::BattleTacticsCatalogue::replaceFromJsonStrict().

◆ replaceEncountersFromJson()

eve::Result< int > eve::rpg::RPG::replaceEncountersFromJson ( const std::string &  json)

Strictly replace the data-driven encounter catalogue.

在文件 RPG.cpp 第 190 行定义.

引用了 eve::rpg::EncounterCatalogue::replaceFromJsonStrict().

◆ replaceQuestsFromJson()

eve::Result< int > eve::rpg::RPG::replaceQuestsFromJson ( const std::string &  json)

Strictly validate and atomically replace the process-local quest catalogue.

返回
Committed definition count or a structured failure; the previous catalogue survives failure. @thread Call on the owning simulation/content thread. @reentrancy Does not invoke script callbacks.

在文件 RPG.cpp 第 67 行定义.

引用了 eve::rpg::QuestRegistry::replaceFromJsonStrict().

◆ replaceShopOffersFromJson()

eve::Result< int > eve::rpg::RPG::replaceShopOffersFromJson ( const std::string &  json)

Strictly validate and atomically replace the authoritative shop catalogue.

在文件 RPG.cpp 第 128 行定义.

引用了 eve::rpg::ShopCatalogue::replaceFromJsonStrict().

◆ replaceStoriesFromDnut()

eve::Result< int > eve::rpg::RPG::replaceStoriesFromDnut ( const std::string &  source,
const std::string &  path 
)

Strictly compile and atomically publish .dnut story content for the RPG dialect.

在文件 RPG.cpp 第 247 行定义.

引用了 path, eve::rpg::RpgStoryCatalogue::replaceFromDnutStrict() , 以及 source.

◆ replaceStoryEventsFromJson()

eve::Result< int > eve::rpg::RPG::replaceStoryEventsFromJson ( const std::string &  json)

Strictly validate and atomically replace versioned story-event content.

在文件 RPG.cpp 第 238 行定义.

引用了 eve::rpg::StoryEventCatalogue::replaceFromJsonStrict().

◆ rollLoot()

int eve::rpg::RPG::rollLoot ( const std::string &  tableId,
inventory::Bag *  bag,
int  seed 
)

用种子随机流 roll 掉落表,把命中物品加入背包;返回掉落物品种类数。

在文件 RPG.cpp 第 362 行定义.

引用了 eve::rpg::LootSystem::roll() , 以及 seed.

◆ runSettlement()

void eve::rpg::RPG::runSettlement ( const std::string &  pipeline,
SettlementContext *  ctx 
)

Run settlement.

在文件 RPG.cpp 第 526 行定义.

引用了 eve::rpg::SettlementPipeline::run().

◆ sellShopOffer()

eve::Result< int > eve::rpg::RPG::sellShopOffer ( GameState *  gameState,
inventory::Bag *  bag,
const std::string &  currencyId,
const std::string &  offerId,
int  quantity 
)

Sell using the item and price from the authoritative shop catalogue.

在文件 RPG.cpp 第 180 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 eve::rpg::ShopTransaction::sellOffer().

◆ sellToShop()

eve::Result< int > eve::rpg::RPG::sellToShop ( GameState *  gameState,
inventory::Bag *  bag,
const std::string &  currencyId,
const std::string &  itemId,
int  quantity,
double  unitPrice 
)

Atomically remove sold items from Bag and credit GameState currency.

在文件 RPG.cpp 第 118 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, itemId , 以及 eve::rpg::ShopTransaction::sell().

◆ setSettlementStageEnabled()

bool eve::rpg::RPG::setSettlementStageEnabled ( const std::string &  pipeline,
const std::string &  stage,
bool  enabled 
)

Sets the settlement stage enabled.

在文件 RPG.cpp 第 539 行定义.

引用了 enabled , 以及 eve::rpg::SettlementPipeline::setStageEnabled().

◆ setSettlementStagePriority()

bool eve::rpg::RPG::setSettlementStagePriority ( const std::string &  pipeline,
const std::string &  stage,
int  priority 
)

Sets the settlement stage priority.

在文件 RPG.cpp 第 544 行定义.

引用了 priority , 以及 eve::rpg::SettlementPipeline::setStagePriority().

◆ settleBattleVictory()

eve::Result< BattleVictoryReceipt > eve::rpg::RPG::settleBattleVictory ( RPGActor *  actor,
Tracker *  tracker,
GameState *  gameState,
const BattleVictoryRequest &  request 
)

Atomically settle one victorious persistent encounter.

返回
Levels and learned skills after the complete settlement, or structured failure. @thread Call on the authoritative owners' simulation thread. @reentrancy No callbacks are invoked; level events are poll-only.

在文件 RPG.cpp 第 98 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, request , 以及 eve::rpg::BattleVictory::settle().

◆ settleEncounterVictory()

eve::Result< BattleVictoryReceipt > eve::rpg::RPG::settleEncounterVictory ( RPGActor *  actor,
Tracker *  tracker,
GameState *  gameState,
const std::string &  encounterId,
const std::string &  mapId,
const std::string &  objectId 
)

◆ syncEquipModifiers()

int eve::rpg::RPG::syncEquipModifiers ( RPGActor *  actor,
inventory::EquipmentSet *  equip 
)

把装备栏当前装备同步为 actor 属性修改器;返回施加条数。

在文件 RPG.cpp 第 350 行定义.

引用了 eve::rpg::EquipmentSystem::syncEquipModifiers().

◆ update()

void eve::rpg::RPG::update ( float  dt)

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