apply_buff
添加一个buff
声明
mixed apply_buff(string buff_id, map buff_effect = {}, float duration = -1f, map buff_source = {})
参数
参数名 | 描述 |
---|---|
buff_id | buff类型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);