🐞 fix(军团活动): 修复诸侯混战城门血条互通问题

This commit is contained in:
luying
2022-10-26 17:17:35 +08:00
parent 31e00b93f3
commit d5d630b765
6 changed files with 30 additions and 30 deletions

View File

@@ -510,12 +510,12 @@ export async function cityActivitySettleReward(cityId: number, serverId: number)
}
}
export async function autoDeclare() {
for(let [ cityId ] of gameData.cityActivity) {
let msg = { cityId, declareGuildCode: "", declareCount: 0 };
await sendMessageToCityWithSuc(cityId, PUSH_ROUTE.GUILD_CITY_DECLARE, msg);
}
}
// export async function autoDeclare() {
// for(let [ cityId ] of gameData.cityActivity) {
// let msg = { cityId, declareGuildCode: "", declareCount: 0 };
// await sendMessageToCityWithSuc(cityId, PUSH_ROUTE.GUILD_CITY_DECLARE, msg);
// }
// }
/**
* 获取活动参加者
@@ -623,9 +623,9 @@ export function getCityStatus(guildCode: string, cityId: number, dic: DicCityAct
return status;
}
export async function sendGuildCityDeclare(cityId: number, declareGuildCode: string, declareCount: number) {
export async function sendGuildCityDeclare(serverId: number, cityId: number, declareGuildCode: string, declareCount: number) {
let msg = { cityId, declareGuildCode, declareCount };
await sendMessageToCityWithSuc(cityId, PUSH_ROUTE.GUILD_CITY_DECLARE, msg);
await sendMessageToCityWithSuc(serverId, cityId, PUSH_ROUTE.GUILD_CITY_DECLARE, msg);
await sendMessageToGuildWithSuc(declareGuildCode, PUSH_ROUTE.GUILD_CITY_DECLARE, msg);
}
@@ -807,7 +807,7 @@ export async function declareCity(serverId: number, roleId: string, guildCode: s
let declareInfo = await GuildActivityCityDeclareModel.declareIfNot(serverId, guildCode, cityId, roleId, declareTime, isAutoDeclare, declareIndex);
if(!!declareInfo && declareInfo.declareTime == declareTime) { // 确实没有人宣战过,自己是第一个
let cityRec = await GuildActivityCityModel.declare(serverId, cityId, guildCode, declareIndex);
await sendGuildCityDeclare(cityId, guildCode, cityRec.declareCount);
await sendGuildCityDeclare(serverId, cityId, guildCode, cityRec.declareCount);
return true;
}
return false;
@@ -908,7 +908,7 @@ export async function resetJoinWoodenHorse() {
export async function debugSendGateHp(serverId: number, cityId: number) {
let obj = getCityActivityObj();
let { gateHp, maxHp } = await obj.getGateHpAndInc(serverId, cityId);
await sendMessageToCityWithSuc(cityId, PUSH_ROUTE.GUILD_CITY_ACT_HP, { cityId, gateHp: gateHp + 1000, maxHp });
await sendMessageToCityWithSuc(serverId, cityId, PUSH_ROUTE.GUILD_CITY_ACT_HP, { cityId, gateHp: gateHp + 1000, maxHp });
}
export async function debugAddHorse(serverId: number, guildCode: string, memberCnt: number, itemInterval: number) {