军团活动:诸侯混战自动宣战
This commit is contained in:
@@ -476,15 +476,17 @@ export async function cityActivitySettleReward(cityId: number, serverId: number)
|
||||
*/
|
||||
async function autoDeclare(serverId: number) {
|
||||
let allCities = await GuildActivityCityModel.getAllCities(serverId);
|
||||
for(let { cityId, guardGuildCode } of allCities) {
|
||||
let guardList = new Array<{ cityId: number, guardGuildCode: string }>();
|
||||
for (let { cityId, guardGuildCode } of allCities) {
|
||||
guardList.push({ cityId, guardGuildCode });
|
||||
await GuildActivityCityModel.guard(serverId, cityId, "", "");
|
||||
}
|
||||
for (let { cityId, guardGuildCode } of guardList) {
|
||||
let dicCity = gameData.cityActivity.get(cityId);
|
||||
if(guardGuildCode && dicCity.nextCity) {
|
||||
if (guardGuildCode && dicCity.nextCity) {
|
||||
await GuildActivityCityModel.declare(serverId, dicCity.nextCity, guardGuildCode);
|
||||
}
|
||||
}
|
||||
for(let { cityId } of allCities) {
|
||||
await GuildActivityCityModel.guard(serverId, cityId, "", "");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user