boss返回状态改变

This commit is contained in:
mamengke01
2021-01-27 13:56:18 +08:00
parent 94f15e0789
commit 47aa7d2194
7 changed files with 30 additions and 17 deletions
+5 -5
View File
@@ -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;