军团活动:修复粮草先行
This commit is contained in:
@@ -111,8 +111,15 @@ export class CityActivityHandler {
|
||||
//TODO 权限校验&时间校验
|
||||
|
||||
let { cityId } = msg;
|
||||
let dicCity = gameData.cityActivity.get(cityId);
|
||||
if(dicCity.preCity.length > 0) return resResult(STATUS.CAN_NOT_DECLARE);
|
||||
|
||||
let checkResult = await GuildActivityCityModel.checkDeclartion(serverId, guildCode);
|
||||
if(!!checkResult) return resResult(STATUS.HAS_DECLARED);
|
||||
let curCity = await GuildActivityCityModel.getCity(serverId, cityId);
|
||||
if(curCity && curCity.guardGuildCode) {
|
||||
return resResult(STATUS.CITY_IS_GUARD);
|
||||
}
|
||||
|
||||
let rec = await GuildActivityCityModel.declare(serverId, cityId, guildCode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user