🐞 fix(gvg): 千机阁回退解锁
This commit is contained in:
@@ -40,6 +40,11 @@ export function checkTechIsIng(techId: number, activeQueue: number[], techQueue:
|
||||
return techQueue.findIndex(cur => cur.id == techId) != -1 || activeQueue.indexOf(techId) != -1
|
||||
}
|
||||
|
||||
export function checkTechProgress(techId: number, techQueue: Tech[]) {
|
||||
let queue = techQueue.find(cur => cur.id == techId);
|
||||
return queue && queue.progress == 0;
|
||||
}
|
||||
|
||||
export function calProducerContribute(obj: { food: number, mineral: number, wood: number }) {
|
||||
let { food = 0, mineral = 0, wood = 0 } = obj||{};
|
||||
let ratio = decodeIdCntArrayStr(GVG.GVG_PRODUCE_GAME_RATIO, 1);
|
||||
@@ -479,6 +484,14 @@ export async function pushTechChange(guildCodes: string[], isActive: boolean, id
|
||||
}
|
||||
}
|
||||
|
||||
export async function pushTechRollback(guildCodes: string[], id: number) {
|
||||
for(let guildCode of guildCodes) {
|
||||
await sendMessageToGuildWithSuc(guildCode, PUSH_ROUTE.LEAGUE_TECH_ROLLBACK, {
|
||||
id
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export async function sendUngotBoxReward(configId: number, leagueCode: string, roleId: string, sid: string) {
|
||||
let { period } = getGVGPeriodData();
|
||||
if(period != GVG_PERIOD.BATTLE) return;
|
||||
|
||||
Reference in New Issue
Block a user