诸侯混战:防止多次发送奖励
This commit is contained in:
@@ -436,8 +436,9 @@ async function updateUserRecAndSendHonour(honour: number, myScore: number, rank:
|
||||
* @param serverId 服务器id
|
||||
*/
|
||||
export async function cityActivitySettleReward(cityId: number, serverId: number) {
|
||||
console.log('###### cityActivitySettleReward 0')
|
||||
let obj = getCityActivityObj();
|
||||
if(obj.hasSent(serverId, cityId)) return;
|
||||
if(!obj.lockCity(serverId, cityId)) return;
|
||||
|
||||
let dicCity = gameData.cityActivity.get(cityId);
|
||||
if (!dicCity) return;
|
||||
@@ -447,7 +448,7 @@ export async function cityActivitySettleReward(cityId: number, serverId: number)
|
||||
let index = getGAIndexInPinus(GUILD_ACTIVITY_TYPE.CITY_ACTIVITY);
|
||||
let r = new Rank(REDIS_KEY.CITY_ACTIVITY, { serverId, cityId, index }, true);
|
||||
let ranks = <GuildRankInfo[]>await r.getRankByRange();
|
||||
console.log('###### cityActivitySettleReward', ranks)
|
||||
console.log('###### cityActivitySettleReward 1', JSON.stringify(ranks));
|
||||
for (let { rank: guildRank, code: guildCode, name, num } of ranks) {
|
||||
if (guildRank == 1) {
|
||||
if (isSuccess) {
|
||||
@@ -494,8 +495,6 @@ export async function cityActivitySettleReward(cityId: number, serverId: number)
|
||||
await addActive(roleId, serverId, GUILD_POINT_WAYS.ACTIVITY); //获得活跃值
|
||||
}
|
||||
}
|
||||
|
||||
obj.delCityRecord(cityId, serverId);
|
||||
}
|
||||
|
||||
export async function autoDeclare(serverId: number) {
|
||||
|
||||
Reference in New Issue
Block a user