feat(gvg): 激战期内存以及玩家移动、挑战操作

This commit is contained in:
luying
2023-02-10 21:23:52 +08:00
parent 5d5137f203
commit 19b70baf8c
16 changed files with 536 additions and 125 deletions

View File

@@ -363,7 +363,7 @@ export class LeagueFarmMember {
setByFields(fields: GVGLeagueFarmType[]) {
this.count = fields.length;
this.harvestTime = Math.min(...fields.map(cur => cur.harvestTime))||0;
this.canHelp = !!fields.find(cur => cur.harvestTime < nowSeconds());
this.canHelp = !!fields.find(cur => cur.harvestTime > 0 && cur.harvestTime < nowSeconds());
this.output = fields.reduce((pre, cur) => (pre + cur.output||0), 0);
}