军团:修复捐献宝箱
This commit is contained in:
@@ -223,11 +223,14 @@ export async function refreshUserGuild(userGuild: UserGuildType, roleId: string)
|
|||||||
|
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
let isRefDaily = shouldRefresh(refTimeDaily, now);
|
let isRefDaily = shouldRefresh(refTimeDaily, now);
|
||||||
|
console.log('####### isRefDaily', isRefDaily, refTimeDaily, now)
|
||||||
if (isRefDaily) {
|
if (isRefDaily) {
|
||||||
await sendUnreceivedWishPool(wishGoods, roleId);
|
if(refTimeDaily) {
|
||||||
await sendUnreceivedActiveBox(roleId, userGuild.guildCode, refTimeDaily, receivedActive);
|
await sendUnreceivedWishPool(wishGoods, roleId);
|
||||||
await sendUnreceivedDonateBox(roleId, userGuild.guildCode, refTimeDaily, receiveBoxs);
|
await sendUnreceivedActiveBox(roleId, userGuild.guildCode, refTimeDaily, receivedActive);
|
||||||
await sendUnreceivedBossWar(roleId, refTimeDaily);
|
await sendUnreceivedDonateBox(roleId, userGuild.guildCode, refTimeDaily, receiveBoxs);
|
||||||
|
await sendUnreceivedBossWar(roleId, refTimeDaily);
|
||||||
|
}
|
||||||
receivedActive = []; refTimeDaily = now; activeDaily = 0; activeRecord = []; wishGoods = []; receivedWishPool = [], receiveBoxs = [];
|
receivedActive = []; refTimeDaily = now; activeDaily = 0; activeRecord = []; wishGoods = []; receivedWishPool = [], receiveBoxs = [];
|
||||||
let wishDntCnt = 0, donateCnt = 0;
|
let wishDntCnt = 0, donateCnt = 0;
|
||||||
userGuild = await UserGuildModel.updateInfo(roleId, { receivedActive, refTimeDaily, activeDaily, activeRecord, wishGoods, receiveBoxs, wishDntCnt, donateCnt, receivedWishPool }, {});
|
userGuild = await UserGuildModel.updateInfo(roleId, { receivedActive, refTimeDaily, activeDaily, activeRecord, wishGoods, receiveBoxs, wishDntCnt, donateCnt, receivedWishPool }, {});
|
||||||
|
|||||||
Reference in New Issue
Block a user