周末礼包,修补钻石替换
This commit is contained in:
parent
ab8404ef62
commit
39cb12ac9a
@ -21,5 +21,4 @@ export default async function (call: ApiCall<ReqReceive, ResReceive>) {
|
|||||||
},{ upsert: true })
|
},{ upsert: true })
|
||||||
|
|
||||||
call.succ({})
|
call.succ({})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -177,13 +177,6 @@ export class PayFun {
|
|||||||
|
|
||||||
let conf: any = await this.getConf(payId, payArgs);
|
let conf: any = await this.getConf(payId, payArgs);
|
||||||
|
|
||||||
let isReplaceConf = await this.checkBuysAfterPay(uid, payId, conf, payArgs)
|
|
||||||
if (isReplaceConf) {
|
|
||||||
let prizePayId = `zuanshi_${conf.money}`
|
|
||||||
payArgs.toPrizePayId = prizePayId
|
|
||||||
conf = this.replacePrizeToChongzhi(prizePayId, conf)
|
|
||||||
}
|
|
||||||
|
|
||||||
let prize = [...conf.prize];
|
let prize = [...conf.prize];
|
||||||
//let player = await G.redis.get('user', uid);
|
//let player = await G.redis.get('user', uid);
|
||||||
let player = await getGud(uid);
|
let player = await getGud(uid);
|
||||||
@ -226,6 +219,22 @@ export class PayFun {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (payId.indexOf('wkdlibao') != -1) {
|
||||||
|
let call = this.getCall(player)
|
||||||
|
let conf = await zmlbGetConf(call, {payId})
|
||||||
|
prize.push(...conf.prize)
|
||||||
|
}
|
||||||
|
|
||||||
|
let isReplaceConf = await this.checkBuysAfterPay(uid, payId, conf, payArgs)
|
||||||
|
if (isReplaceConf) {
|
||||||
|
let prizePayId = `zuanshi_${conf.money}`
|
||||||
|
payArgs.toPrizePayId = prizePayId
|
||||||
|
conf = this.replacePrizeToChongzhi(prizePayId, conf)
|
||||||
|
prize = [...conf.prize]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
await PlayerFun.sendPrize(call, prize);
|
await PlayerFun.sendPrize(call, prize);
|
||||||
await PlayerFun.addAttr(call, conf.payExp);
|
await PlayerFun.addAttr(call, conf.payExp);
|
||||||
if (payId == 'G123SendGift') {
|
if (payId == 'G123SendGift') {
|
||||||
@ -371,7 +380,6 @@ export class PayFun {
|
|||||||
if (payId.indexOf('wkdlibao') != -1) {
|
if (payId.indexOf('wkdlibao') != -1) {
|
||||||
let call = this.getCall(player)
|
let call = this.getCall(player)
|
||||||
let conf = await zmlbGetConf(call, {payId})
|
let conf = await zmlbGetConf(call, {payId})
|
||||||
buyLog = await this.getPayLog(player.uid, payId);
|
|
||||||
if (buyLog.length && buyLog.length >= conf.buyNum) return G.server.sendMsgByUid(player.uid, 'msg_s2c/PayResult', {code: -1});
|
if (buyLog.length && buyLog.length >= conf.buyNum) return G.server.sendMsgByUid(player.uid, 'msg_s2c/PayResult', {code: -1});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user