军团活动:诸侯混战自动宣战
This commit is contained in:
@@ -36,12 +36,17 @@ export class CityActivityObject {
|
||||
}
|
||||
}
|
||||
|
||||
public hasSent(serverId: number, cityId: number) {
|
||||
let key = this.getKey(serverId, cityId);
|
||||
return this.sentCity.indexOf(key) != -1;
|
||||
}
|
||||
|
||||
public getAllCities() {
|
||||
let allCities = new Array<{ serverId: number, cityId: number, guildCodes: string[]}>();
|
||||
let serverlists = new Array<number>();
|
||||
for(let [key, guildCodes] of this.cities) {
|
||||
if(this.sentCity.indexOf(key) == -1) {
|
||||
let { serverId, cityId } = this.decodeKey(key);
|
||||
let { serverId, cityId } = this.decodeKey(key);
|
||||
if(!this.hasSent(serverId, cityId)) {
|
||||
allCities.push({ serverId, cityId, guildCodes });
|
||||
if(!serverlists.includes(serverId)) serverlists.push(serverId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user