diff --git a/src/api_s2c/event/christmas/fun.ts b/src/api_s2c/event/christmas/fun.ts index 327422c..9ecaa7f 100644 --- a/src/api_s2c/event/christmas/fun.ts +++ b/src/api_s2c/event/christmas/fun.ts @@ -117,7 +117,7 @@ export class Christmasfun { return mydata } - static async payChristmas(payid, call: ApiCall) { + static async payChristmas(payid, call: any) { let _hd = await HuoDongFun.gethdList(call, 8) for (let index = 0; index < _hd.length; index++) { const hdinfo = _hd[index]; @@ -126,8 +126,8 @@ export class Christmasfun { let _mydata = await Christmasfun.getMyData(call, _hdid) if (_mydata.pay) continue await this.setMyData(call.uid, _hdid, { $set: { pay: true} }) - let _prize = hdinfo.data.zlpayprize - await PlayerFun.sendPrize(call, _prize); + // let _prize = hdinfo.data.zlpayprize + // await PlayerFun.sendPrize(call, _prize); } else{ const libaos = hdinfo.data.libao @@ -140,6 +140,12 @@ export class Christmasfun { if (_buyNum >= _tmp["buynum"]) continue _mydata.libao[lbid] = _buyNum + 1 this.setMyData(call.uid, _hdid, { $set: { libao: _mydata.libao} }) + let _select = _mydata.select[lbid] || {} + let _prize: atn[] = _tmp["basep"] + for (let key in _select) { + _prize.push(_tmp["dlz"][parseInt(key)][_select[key]]) + } + await PlayerFun.sendPrize(call, _prize); break } diff --git a/src/globalListener.ts b/src/globalListener.ts index 2c3aa37..1e81c29 100644 --- a/src/globalListener.ts +++ b/src/globalListener.ts @@ -177,8 +177,6 @@ export function addListener() { ActionLog.addRetainLog(player.uid, { key: 'pay', val: conf.payExp[0].n }); if (payId == G.gc.zhanling.payId) payZhanLing(player); - //圣诞节活动充值 - Christmasfun.payChristmas(payId, call); let payEmailConf = G.gc.payEmail[payId] as _gcType['payEmail']['caifutequan']; if (payEmailConf?.length > 0) { let sendEmailConfs = payEmailConf; diff --git a/src/public/pay.ts b/src/public/pay.ts index 43a0e58..61fef69 100644 --- a/src/public/pay.ts +++ b/src/public/pay.ts @@ -10,6 +10,7 @@ import {call, PlayerFun} from './player'; import {number} from "mathjs"; import {getGud} from './gud'; import {getConf as zmlbGetConf} from '../api_s2c/event/zhoumolibao/ApiOpen'; +import {Christmasfun} from "../api_s2c/event/christmas/fun"; async function checkPayIsActive(payId: string, logs: payLog[], payArgs) { let conf: any = await this.getConf(payId, payArgs); @@ -230,7 +231,8 @@ export class PayFun { let conf = await zmlbGetConf(call, {payId}) prize.push(...conf.prize) } - + //圣诞节活动充值 + await Christmasfun.payChristmas(payId, call); let isReplaceConf = await this.checkBuysAfterPay(uid, payId, conf, payArgs, player) if (isReplaceConf) { let prizePayId = `zuanshi_${conf.money}` @@ -239,7 +241,6 @@ export class PayFun { prize = [...conf.prize] } - await PlayerFun.sendPrize(call, prize); await PlayerFun.addAttr(call, conf.payExp); if (payId == 'G123SendGift') {