仙魔无双SDK
面向策划逻辑制作的游戏开发包

经验值相关 更多...

函数

int AddActorExpByRate (FxCreature *pActor, int nRate)
 按当前升级所需经验的百分比nRate增加角色pActor的当前经验。 更多...
 
int AddActorExpByValue (FxCreature *pActor, unsigned long nValue, unsigned long nRate=1)
 按数值增加角色pActor的当前经验。 更多...
 

详细描述

经验值相关

函数说明

◆ AddActorExpByRate()

int AddActorExpByRate ( FxCreature *  pActor,
int  nRate 
)

按当前升级所需经验的百分比nRate增加角色pActor的当前经验。

参数
pActor[角色] 增加经验的角色
nRate[整数] 增加的百分比,正数,逻辑会忽略非正数的输入
返回
[整数] 忽略

◆ AddActorExpByValue()

int AddActorExpByValue ( FxCreature *  pActor,
unsigned long  nValue,
unsigned long  nRate = 1 
)

按数值增加角色pActor的当前经验。

参数
pActor[角色] 增加经验的角色
nValue[整数] 增加的经验值。上限1926000,原因未明
nRate[整数] 增加的倍数,默认1
返回
[整数] 忽略
注解
这是由于tolua++底层的一个限制,具体原因还未确定。tolua_tonumber返回unsigned long的时候有上限。