玩家背包管理类
More...
#include <bag.h>
|
|
| bag () |
| | 构造函数
|
|
virtual void | initdata () |
| | 数据加载完成回调
|
|
pbdb::item * | add (pbdb::item &aitem) |
| | 添加物品到背包
|
|
bool | add_item (int32_t atid, int32_t acount) |
| | 按模板ID添加物品
|
|
bool | add_item (const std::map< int32_t, int32_t > &amap) |
| | 按模板ID映射批量添加物品
|
|
bool | add_item (std::vector< pbdb::item > &avec) |
| | 按物品向量批量添加物品
|
|
bool | dec_item (int32_t atid, int32_t acount) |
| | 按模板ID删除物品
|
|
bool | dec_item (int32_t aid) |
| | 按物品ID删除物品
|
|
bool | checkbytid (int32_t atid, int32_t acount) |
| | 检查是否有足够数量的指定模板物品
|
|
bool | checkbyid (int32_t aid) |
| | 检查是否存在指定ID物品
|
|
void | sync_client () |
| | 同步背包数据到客户端
|
|
void | print_bi (int32_t aitemid, int32_t atid, int32_t acount, bool aisadd=true) |
| | 打印物品变更日志
|
玩家背包管理类
继承自tdb_bag::db_modular,管理物品的添加、删除和同步
The documentation for this class was generated from the following files:
- E:/GitHub/ngl_server/public/cpp/actor/actor_logic/actor_role/logic/bag/bag.h
- E:/GitHub/ngl_server/public/cpp/actor/actor_logic/actor_role/logic/bag/bag.cpp