诸侯混战:周六取消自动宣战
This commit is contained in:
@@ -456,7 +456,9 @@ export async function cityActivitySettleReward(cityId: number, serverId: number)
|
|||||||
if (guildRank == 1) {
|
if (guildRank == 1) {
|
||||||
if (isSuccess) {
|
if (isSuccess) {
|
||||||
await GuildActivityCityModel.guard(serverId, cityId, guildCode, name, index + 1); // 占领
|
await GuildActivityCityModel.guard(serverId, cityId, guildCode, name, index + 1); // 占领
|
||||||
await declareCity(serverId, "", guildCode, dicCity.nextCity, true, index + 1);
|
if(getCurDay(true) != 6) {
|
||||||
|
await declareCity(serverId, "", guildCode, dicCity.nextCity, true, index + 1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
await GuildActivityCityModel.guard(serverId, cityId, "", "", index + 1); // 无人能占领
|
await GuildActivityCityModel.guard(serverId, cityId, "", "", index + 1); // 无人能占领
|
||||||
}
|
}
|
||||||
@@ -500,7 +502,7 @@ export async function cityActivitySettleReward(cityId: number, serverId: number)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function autoDeclare(serverId: number) {
|
export async function autoDeclare() {
|
||||||
for(let [ cityId ] of gameData.cityActivity) {
|
for(let [ cityId ] of gameData.cityActivity) {
|
||||||
let msg = { cityId, declareGuildCode: "", declareCount: 0 };
|
let msg = { cityId, declareGuildCode: "", declareCount: 0 };
|
||||||
await sendMessageToCityWithSuc(cityId, PUSH_ROUTE.GUILD_CITY_DECLARE, msg);
|
await sendMessageToCityWithSuc(cityId, PUSH_ROUTE.GUILD_CITY_DECLARE, msg);
|
||||||
|
|||||||
@@ -335,10 +335,7 @@ export async function cityActivityEnd() {
|
|||||||
await pinus.app.rpc.guild.guildActivityRemote.guildActivityEnd.broadcast(GUILD_ACTIVITY_TYPE.CITY_ACTIVITY);
|
await pinus.app.rpc.guild.guildActivityRemote.guildActivityEnd.broadcast(GUILD_ACTIVITY_TYPE.CITY_ACTIVITY);
|
||||||
|
|
||||||
// 发完之后再做下周自动宣战
|
// 发完之后再做下周自动宣战
|
||||||
let serverlists = await getAllServers();
|
await autoDeclare();
|
||||||
for (let serverId of serverlists) {
|
|
||||||
await autoDeclare(serverId);
|
|
||||||
}
|
|
||||||
if (guildActSecondsJobId) {
|
if (guildActSecondsJobId) {
|
||||||
guildActSecondsJobId.cancel();
|
guildActSecondsJobId.cancel();
|
||||||
guildActSecondsJobId = undefined;
|
guildActSecondsJobId = undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user