载入中...
搜索中...
未找到
ShopTransaction.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
10#include "common/Result.h"
11
12#include <string>
13
14namespace eve::inventory {
15class Bag;
16}
17
18namespace eve::rpg {
19
20class GameState;
21
24public:
26 [[nodiscard]] static eve::Result<int> buyOffer(GameState &gameState, inventory::Bag &bag,
27 const std::string &currencyId,
28 const std::string &offerId, int quantity);
30 [[nodiscard]] static eve::Result<int> sellOffer(GameState &gameState, inventory::Bag &bag,
31 const std::string &currencyId,
32 const std::string &offerId, int quantity);
40 [[nodiscard]] static eve::Result<int> buy(GameState &gameState, inventory::Bag &bag,
41 const std::string &currencyId,
42 const std::string &itemId, int quantity,
43 double unitPrice);
44
52 [[nodiscard]] static eve::Result<int> sell(GameState &gameState, inventory::Bag &bag,
53 const std::string &currencyId,
54 const std::string &itemId, int quantity,
55 double unitPrice);
56};
57
58} // namespace eve::rpg
LogicalId itemId
#define EVENGINE_API_PLATFORM
Definition Export.h:107
Move-only, checked operation results for the common layer.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
格子型物品容器(脚本可直接操作)。
Definition Bag.h:21
一份游戏状态(开关/变量/独立变量)。
Definition GameState.h:25
Product transaction boundary for an RPG shop trade.
运行时容器:固定格数的背包 / 箱子 / 商店栏等。 行为由 InventorySystem 提供;本类暴露便于脚本绑定的薄封装方法。
RPG 模块的基础实体:把属性 / 状态 / 技能三张表挂到一个 ECS 实体上。