feat:黄旗酒馆
This commit is contained in:
parent
be0923c849
commit
ba124d82c9
@ -413,7 +413,7 @@ export default class HQJGFun {
|
|||||||
|
|
||||||
mydata.giftbuy[gift.id].num++;
|
mydata.giftbuy[gift.id].num++;
|
||||||
// 发送奖励
|
// 发送奖励
|
||||||
await PlayerFun.sendPrize(call, prize)
|
await PlayerFun.sendPrize(call, prize, true);
|
||||||
await this.setMyData(call.uid, hd.hdid, { giftbuy: mydata.giftbuy });
|
await this.setMyData(call.uid, hd.hdid, { giftbuy: mydata.giftbuy });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ export class PlayerFun {
|
|||||||
/**
|
/**
|
||||||
* 发送奖励
|
* 发送奖励
|
||||||
*/
|
*/
|
||||||
static async sendPrize(call: call, prizeList: atn[]) {
|
static async sendPrize(call: call, prizeList: atn[], pushToClient=false) {
|
||||||
prizeList = PublicShared.mergePrize(prizeList);
|
prizeList = PublicShared.mergePrize(prizeList);
|
||||||
|
|
||||||
let attr = prizeList.filter(atn => atn.a == 'attr' && atn.n != 0);
|
let attr = prizeList.filter(atn => atn.a == 'attr' && atn.n != 0);
|
||||||
@ -148,6 +148,14 @@ export class PlayerFun {
|
|||||||
peijian.length > 0 && this.addPeijian(call, peijian)
|
peijian.length > 0 && this.addPeijian(call, peijian)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
if(pushToClient){
|
||||||
|
G.server.sendMsgByUid(call.uid, 'msg_s2c/Collection', {
|
||||||
|
fromApi: `PlayerFun_sendPrize`,
|
||||||
|
msg: call.eventMsg
|
||||||
|
});
|
||||||
|
call.eventMsg = {};
|
||||||
|
}
|
||||||
|
|
||||||
return prizeList;
|
return prizeList;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user