🐞 fix(gvg): 修改千机阁推送路径和格式
This commit is contained in:
@@ -389,7 +389,7 @@ export class GVGHandler {
|
||||
|
||||
// 推送千机阁解锁消息
|
||||
let curQueue = leaguePrepare.techQueue.find(cur => cur.id == techId);
|
||||
await pushTechChange(myLeague.guildCodes, PUSH_ROUTE.LEAGUE_TECH_UNLOCK, techId, curQueue.progress, curQueue.maxProgress);
|
||||
await pushTechChange(myLeague.guildCodes, false, techId, curQueue.progress, curQueue.maxProgress);
|
||||
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
queue: leaguePrepare?.techQueue||[]
|
||||
@@ -453,7 +453,7 @@ export class GVGHandler {
|
||||
checkGVGTask(serverId, roleId, sid, configId, myLeague.leagueCode, TASK_TYPE.GVG_TECH, { count: 1 });
|
||||
|
||||
// 推送千机阁激活消息
|
||||
await pushTechChange(myLeague.guildCodes, PUSH_ROUTE.LEAGUE_TECH_ACITVE, techId, curQueue.progress, curQueue.maxProgress);
|
||||
await pushTechChange(myLeague.guildCodes, true, techId, curQueue.progress, curQueue.maxProgress);
|
||||
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
active,
|
||||
|
||||
@@ -470,10 +470,10 @@ export function checkItemCanUserInFarm(farmId: number, itemId: number) {
|
||||
}
|
||||
|
||||
// 推送千机阁状态变化
|
||||
export async function pushTechChange(guildCodes: string[], route: string, id: number, progress: number, maxProgress: number) {
|
||||
export async function pushTechChange(guildCodes: string[], isActive: boolean, id: number, progress: number, maxProgress: number) {
|
||||
for(let guildCode of guildCodes) {
|
||||
await sendMessageToGuildWithSuc(guildCode, route, {
|
||||
id, progress, maxProgress
|
||||
await sendMessageToGuildWithSuc(guildCode, PUSH_ROUTE.LEAGUE_TECH_CHANGE, {
|
||||
id, progress, maxProgress, isActive
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user