粮草先行:木牛流马被击毁时依然下发单woodenHorseList为空
This commit is contained in:
@@ -308,18 +308,20 @@ export class RaceActivityObject {
|
||||
|
||||
private async getScreenHorses(serverId: number, ranks: RaceActivityRankParam[], i: number, needSend: boolean) {
|
||||
let curRank = ranks[i];
|
||||
if(curRank.durability == 0) return;
|
||||
if(!curRank) return;
|
||||
// 发送
|
||||
// console.log('send', woodenHorseList.length);
|
||||
let wh = await this.getWoodenHorse(curRank.code, serverId);
|
||||
let screenRank = this.getScreenHorseRanks(ranks, i);
|
||||
let woodenHorseList: WoodenHorse[] = [];
|
||||
for(let rank of screenRank) {
|
||||
if(rank.code == curRank.code) {
|
||||
woodenHorseList.push(wh);
|
||||
} else {
|
||||
let wh = await this.getWoodenHorse(rank.code, serverId);
|
||||
woodenHorseList.push(wh);
|
||||
if(curRank.durability != 0) {
|
||||
for(let rank of screenRank) {
|
||||
if(rank.code == curRank.code) {
|
||||
woodenHorseList.push(wh);
|
||||
} else {
|
||||
let wh = await this.getWoodenHorse(rank.code, serverId);
|
||||
woodenHorseList.push(wh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user