仙魔无双SDK
面向策划逻辑制作的游戏开发包
其他道具操作

其他的通用道具操作,包括背包等 更多...

函数

int IsBagFull (FxCreature *pActor)
 查询角色pActor的背包是否满了 更多...
 
int GetBagFreeSize (FxCreature *pActor)
 查询角色pActor的背包剩余空格。普通背包。 更多...
 
int BeginBatchAddItemToActor (FxCreature *pActor)
 角色pActor开始一个批量添加道具的事务 更多...
 
int BatchAddItemToActor (FxCreature *pActor, unsigned long nItemID, UINT8 byEventType, int nCount=1, int nBindMode=-1, int iExData=0)
 角色pActor在一个批量提交事务中的单次提交 更多...
 
int CommitBatchAddItemToActor (FxCreature *pActor)
 角色pActor完成了批量添加道具,把这个事务提交 更多...
 
int ExpandBag (FxCreature *pActor, unsigned short nChestIndex, unsigned short nExpandSize)
 给角色pActor扩大背包容量,扩大的背包索引是nChestIndex,扩大的格子数量是nExpandSize 更多...
 
int GetUnExpandBagSize (FxCreature *pActor, unsigned short nChestIndex=0)
 获取角色pActor未扩充的背包容量 更多...
 
int ClearBag (FxCreature *pActor, EBagType eBagType)
 清空角色指定背包里所有的物品 更多...
 
int IsEmptyEx (FxCreature *pActor)
 判断稀有商店是否已经卖完 更多...
 
void RoleBagCommit (FxCreature *pCreature)
 角色pCreature背包变更提交,即同步给客户端 更多...
 

详细描述

其他的通用道具操作,包括背包等

函数说明

◆ BatchAddItemToActor()

int BatchAddItemToActor ( FxCreature *  pActor,
unsigned long  nItemID,
UINT8  byEventType,
int  nCount = 1,
int  nBindMode = -1,
int  iExData = 0 
)

角色pActor在一个批量提交事务中的单次提交

参数
pActor[角色] 角色对象。
nItemID[整数] 道具ID
byEventType[整数] 道具增加类型
nCount[整数] 添加的个数
nBindMode[整数] 绑定模式。-1: 按照配置表的设置;0: 非绑定;1: 绑定。默认-1
iExData[整数] 附加数据
返回
[整数] 忽略

◆ BeginBatchAddItemToActor()

int BeginBatchAddItemToActor ( FxCreature *  pActor)

角色pActor开始一个批量添加道具的事务

参数
pActor[角色] 角色对象。
返回
[整数] 忽略

◆ ClearBag()

int ClearBag ( FxCreature *  pActor,
EBagType  eBagType 
)

清空角色指定背包里所有的物品

参数
pActor[角色] 角色对象
eBagType[整数] 指定的背包索引。EBagType中定义。
返回
[整数] 忽略

◆ CommitBatchAddItemToActor()

int CommitBatchAddItemToActor ( FxCreature *  pActor)

角色pActor完成了批量添加道具,把这个事务提交

参数
pActor[角色] 角色对象。
返回
[整数] 忽略

◆ ExpandBag()

int ExpandBag ( FxCreature *  pActor,
unsigned short  nChestIndex,
unsigned short  nExpandSize 
)

给角色pActor扩大背包容量,扩大的背包索引是nChestIndex,扩大的格子数量是nExpandSize

参数
pActor[角色] 操作的角色
nChestIndex[整数] 背包索引
nExpandSize[整数] 扩大的格子数
返回
[整数] 容量扩大是否成功
返回值
1扩大成功
0扩大失败
注解
背包索引是EChestIndex

◆ GetBagFreeSize()

int GetBagFreeSize ( FxCreature *  pActor)

查询角色pActor的背包剩余空格。普通背包。

参数
pActor[角色] 角色对象。
返回
[整数] 查询的结果,角色的普通背包剩余的空格数

◆ GetUnExpandBagSize()

int GetUnExpandBagSize ( FxCreature *  pActor,
unsigned short  nChestIndex = 0 
)

获取角色pActor未扩充的背包容量

参数
pActor[角色] 操作的角色
nChestIndex[整数] 背包索引
返回
[整数] 还有多少未扩充的格子。0表示没有了。如果指定的栏位本来就不可扩充,那么也是0。
注解
背包索引是EChestIndex,默认0,即eChestIndex_Tool,普通背包

◆ IsBagFull()

int IsBagFull ( FxCreature *  pActor)

查询角色pActor的背包是否满了

参数
pActor[角色] 角色对象。
返回
[整数] 查询的结果
返回值
0背包没有满
1背包满了

◆ IsEmptyEx()

int IsEmptyEx ( FxCreature *  pActor)

判断稀有商店是否已经卖完

参数
pActor[角色] 角色对象
返回
[整数] 是否已经卖完
返回值
0没有卖完
1卖完

◆ RoleBagCommit()

void RoleBagCommit ( FxCreature *  pCreature)

角色pCreature背包变更提交,即同步给客户端

参数
pCreature[角色] 角色对象
返回