fix:新增圣诞活动每日消耗钻石任务类型

This commit is contained in:
yushunrui 2023-12-20 16:25:22 +08:00
parent 8a10552203
commit 16254610b0
3 changed files with 17 additions and 1 deletions

View File

@ -144,6 +144,8 @@ export type gEventType = {
Class_task_154: (eventname, call, val, chkVal) => void;
/**每日任务宝箱领取 */
Class_task_155: (eventname, call, val, chkVal) => void;
/**每日钻石消耗 */
Class_task_156: (eventname, call, val, chkVal) => void;
};
export function addListener() {

View File

@ -172,6 +172,11 @@ export class PlayerFun {
change[atn.t] = this.fixAttrLteZero(atn.t, await this.getAtnNum(call, atn) + atn.n);
if (atn.t == 'rmbmoney') {
this.changeAttrLog(call.conn.uid, change[atn.t], atn, call.conn.gud.rmbmoney)
// 扣除钻石时
if (atn.n < 0) {
// 监听任务消耗任务
G.emit("Class_task_156", 'Class_task_156', call, -atn.n, 0);
}
}
all.push(this.changeAttr(call.conn.uid, change));
all.push(this.upAttr(call, {...atn, n: change[atn.t]}));

View File

@ -772,7 +772,7 @@ export module manager {
isinc = 1
async initVal(call: ApiCall, con) {
return 1;
return 0;
}
}
// 第57个任务 领取每日任务最终宝箱
@ -780,6 +780,15 @@ export module manager {
stype = 155
isinc = 0
async initVal(call: ApiCall, con) {
return 0;
}
}
// 第58个任务 每日钻石消耗
export class Class_task_156 extends BaseClass {
stype = 156
isinc = 1
async initVal(call: ApiCall, con) {
return 1;
}