载入中...
搜索中...
未找到
WorldInteraction.cpp
浏览该文件的文档.
全局游戏状态:开关(bool)、变量(数字)、独立变量(按作用域)。
目标追踪器运行时实例(玩家日志 / 成就 / 教程可各建一份)。
Atomic settlement of persistent world loot interactions.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
bool ok() const noexcept
Whether this result represents a non-failure outcome.
Definition Result.h:480
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
static Status success(StatusCode code=StatusCode::Ok)
Construct a successful status with an explicit non-error outcome.
Definition Status.h:81
static eve::Result< int > commitAddBatch(PreparedInventoryAdd prepared)
Commit one prepared addition and then publish its change events.
Definition InventorySystem.cpp:478
static eve::Result< PreparedInventoryAdd > prepareAddBatch(Bag *bag, const std::vector< InventoryItemGrant > &grants)
Validate a multi-item addition against a private candidate Bag.
Definition InventorySystem.cpp:434
eve::Result< void > restoreSnapshotJson(std::string_view json)
Validate and atomically restore a canonical RPG game-state JSON document.
Definition GameState.cpp:146
eve::Result< std::string > snapshotJson() const
Serialize this state as the canonical versioned RPG game-state JSON document.
Definition GameState.cpp:119
std::unordered_map< std::string, QuestRuntime > entries
运行时条目(QuestSystem 读写;公开以便测试与脚本查询)。
Definition Tracker.h:123
void notify(const std::string &topic, const std::string &target, int amount)
Notify.
Definition Tracker.cpp:25
static eve::Result< int > collectLoot(GameState &gameState, Tracker &tracker, inventory::Bag &bag, const WorldLootRequest &request)
Atomically grant loot, notify quest progress, and consume one world object.
Definition WorldInteraction.cpp:37
Non-owning typed adapter for persistent per-map object lifecycle state.
Definition WorldState.h:19
bool isObjectConsumed(std::string_view mapId, std::string_view objectId) const
Query whether a stable object has been consumed in one map.
Definition WorldState.cpp:23
eve::Result< void > consumeObject(std::string_view mapId, std::string_view objectId)
Idempotently publish the consumed fact for one stable map object.
Definition WorldState.cpp:31
@ InvalidArgument
@ PreconditionViolation
@ InvariantViolation
@ Conflict
@ Applied
Complete data needed to settle one persistent loot object.
Definition WorldInteraction.h:24