跳到主要内容

apply_buff

添加一个buff

声明

mixed apply_buff(string buff_id, map buff_effect = {}, float duration = -1f, map buff_source = {})

参数

参数名描述
buff_idbuff类型id
buff_effect效果配置
duration持续时间
buff_source来源

返回值

成功返回cookie,失败返回nil

使用方式

string buff_id = "add_attr_1";
map buff_effect = {
"attr_name" : "att",
"add_val" : 100
};
FBuff.apply_buff(buff_id, buff_effect, 30);

返回文档