载入中...
搜索中...
未找到
ShopCatalogue.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
7#include "common/Result.h"
8
9#include <string>
10
11namespace eve::rpg {
12
14struct ShopOffer {
15 std::string id;
16 std::string itemId;
17 std::string displayName;
18 std::string description;
19 int buyPrice = 0;
20 int sellPrice = 0;
21};
22
25public:
33 [[nodiscard]] static eve::Result<int> replaceFromJsonStrict(const std::string &json);
35 static void clear();
37 static int count();
39 static const ShopOffer *find(const std::string &id);
41 static const ShopOffer *at(int index);
42};
43
44} // namespace eve::rpg
#define EVENGINE_API_PLATFORM
Definition Export.h:107
Move-only, checked operation results for the common layer.
std::uint32_t count
uint32_t index
std::size_t at
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Process-local validated offer catalogue used by RPG shop transactions and UI.
RPG 模块的基础实体:把属性 / 状态 / 技能三张表挂到一个 ECS 实体上。
One immutable offer in the process-local shop catalogue.
std::string description
std::string displayName