后台:军团活动debug

This commit is contained in:
luying
2021-10-14 17:33:22 +08:00
parent 0dc178b155
commit 2b6b941649
9 changed files with 227 additions and 22 deletions

View File

@@ -193,7 +193,8 @@ export class GuildHandler {
if(!bossInstance) return resResult(STATUS.GUILD_SCRIPT_NOT_OPENED);
let { myEncourageCnt } = await refreshUserGuildOfBoss(userGuild);
let costGold = (myEncourageCnt + count - dicParam.GUILD_BOSS.GUILD_BOSS_ENCOURAGE_FREECOUNT) * dicParam.GUILD_BOSS.GUILD_BOSS_ENCOURAGE_COST;
let freeCount = dicParam.GUILD_BOSS.GUILD_BOSS_ENCOURAGE_FREECOUNT - myEncourageCnt > 0? dicParam.GUILD_BOSS.GUILD_BOSS_ENCOURAGE_FREECOUNT - myEncourageCnt: 0;
let costGold = (count - freeCount) * dicParam.GUILD_BOSS.GUILD_BOSS_ENCOURAGE_COST;
if(costGold < 0) costGold = 0;
let { gold } = await RoleModel.findByRoleId(roleId, 'gold');
if(gold < costGold) return resResult(STATUS.BATTLE_GOLD_NOT_ENOUGH);