diff --git a/src/globalListener.ts b/src/globalListener.ts index a5a750f..2c3aa37 100644 --- a/src/globalListener.ts +++ b/src/globalListener.ts @@ -17,7 +17,6 @@ import { PublicShared } from './shared/public/public'; import { setGud } from './public/gud'; import {checkResetBuyLog} from "./api_s2c/event/zhoumolibao/ApiOpen"; import {Christmasfun} from "./api_s2c/event/christmas/fun"; -import {PushGiftFun} from "./public/pushgift"; export type gEventType = { /**玩家断开连接 */ @@ -199,7 +198,6 @@ export function addListener() { { $inc: { payNum: conf.money } }, { upsert: true } ); - PushGiftFun.buy(player.uid, payId) // 推送礼包 }); G.on("FIRST_LOGIN_EVERY_DAY", (gud, lastTime, curTime) => { diff --git a/src/public/pushgift.ts b/src/public/pushgift.ts index e003088..72fcfde 100644 --- a/src/public/pushgift.ts +++ b/src/public/pushgift.ts @@ -152,22 +152,4 @@ export class PushGiftFun { // 推送客户端消息 G.server.sendMsgByUid(uid, "msg_s2c/PushGiftChange", 1); } - - static async buy(uid: string, payId: string) { - // 购买礼包 - let gift; - for (let gift_id in G.gc.tuisonglibao) { - gift = G.gc.tuisonglibao[gift_id]; - if (gift.payId.includes(payId)) break; - } - let index = gift.payId.indexOf(payId); - let info = await G.mongodb.collection("pushgift").findOne({ - uid: uid, id: gift.id.toString() - }) - if (info.passTime >= G.time) { - G.mongodb.collection("pushgift").updateOne({ - uid: uid, id: gift.id.toString() - }, {$inc: {[`buy.${index}`]: 1}}) - } - } } \ No newline at end of file