演武台:修复boss被打死之后第一次进入的bug
This commit is contained in:
@@ -13,6 +13,7 @@ import { GUILD_BOSS_STATUS } from '../consts/constModules/guildConst';
|
||||
import { genAuction } from './auctionService';
|
||||
import { GuildModel, GuildType } from '../db/Guild';
|
||||
import { UserGuildModel, UserGuildType } from '../db/UserGuild';
|
||||
import { nowSeconds } from '../pubUtils/timeUtil';
|
||||
|
||||
/**
|
||||
* 获得boss界面
|
||||
@@ -89,9 +90,10 @@ export async function getLastBossInstance(bossInstance: BossInstanceType, guildC
|
||||
if(lastBossInstance) {
|
||||
if(lastBossInstance.roleIdRecords.indexOf(roleId) == -1) {
|
||||
await BossInstanceModel.recordRoleIdWhenCheck(lastBossInstance.code, roleId);
|
||||
return { status: GUILD_BOSS_STATUS.CLEAR, showParam: { winWarId: lastBossInstance.warId, winBossLv: lastBossInstance.bossLv } }
|
||||
let { warId } = lastBossInstance;
|
||||
return { status: GUILD_BOSS_STATUS.CLEAR, showParam: { winWarId: lastBossInstance.warId, winBossLv: lastBossInstance.bossLv }, warId }
|
||||
} else {
|
||||
return { status: GUILD_BOSS_STATUS.CLEAR }
|
||||
return { status: GUILD_BOSS_STATUS.WAIT_OPEN }
|
||||
}
|
||||
} else {
|
||||
return { status: GUILD_BOSS_STATUS.WAIT_OPEN }
|
||||
@@ -126,7 +128,7 @@ export async function checkBossResult(bossCode: string, guildCode: string, serve
|
||||
res.releaseCallback();//解锁
|
||||
return true;
|
||||
}
|
||||
await BossInstanceModel.updateBossInstance(bossCode, { bossHp: 0, status: GUILD_BOSS_STATUS.CLEAR, ranks, roleIdRecords:[roleId]}, );
|
||||
await BossInstanceModel.updateBossInstance(bossCode, { bossHp: 0, status: GUILD_BOSS_STATUS.CLEAR, ranks, roleIdRecords:[roleId], killTime: nowSeconds()}, );
|
||||
await pushBossHpMessage(guildCode, serverId, 0, true);
|
||||
res.releaseCallback();//数据修改解锁
|
||||
// 击杀奖励&伤害奖励
|
||||
|
||||
Reference in New Issue
Block a user