boss返回状态改变
This commit is contained in:
@@ -27,10 +27,10 @@ export async function getBossInstanceInfo(bossInstance: BossInstanceType, roleId
|
||||
await BossInstanceModel.recordRoleIdWhenCheck(guildCode, roleId);
|
||||
}
|
||||
if (bossInstance.startTime < getTodayZeroPoint()) {
|
||||
result.type = 1;
|
||||
result.status = 1;
|
||||
return result;
|
||||
} else {
|
||||
result.type = 2;
|
||||
result.status = 2;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ export async function getBossInstanceInfo(bossInstance: BossInstanceType, roleId
|
||||
}
|
||||
return {roleId, score, rankLv: index + 1};
|
||||
});
|
||||
return {warId, ranks: lastRanks, myRank, bossHp, type: 3, isBattled};
|
||||
return {warId, ranks: lastRanks, myRank, bossHp, status: 3, isBattled};
|
||||
}
|
||||
/**
|
||||
* 战斗结束返回
|
||||
@@ -59,11 +59,11 @@ export async function getBossInstanceWhenEnd(bossInstance: BossInstanceType, rol
|
||||
let result:any = {};
|
||||
if (battleNum == winNum) {
|
||||
pushRanks = deepCopy(recordRanks);
|
||||
result = {warId: winWarId, bossHp: 0, type: 3};
|
||||
result = {warId: winWarId, bossHp: 0, status: 3};
|
||||
await BossInstanceModel.recordRoleIdWhenCheck(guildCode, roleId);
|
||||
} else {
|
||||
pushRanks = deepCopy(ranks);
|
||||
result = {warId, bossHp, type: 3};
|
||||
result = {warId, bossHp, status: 3};
|
||||
}
|
||||
pushRanks.sort(function(a, b) {
|
||||
return b.score - a.score + a.time - b.time;
|
||||
|
||||
Reference in New Issue
Block a user