Fix resources to level task
This commit is contained in:
parent
822c4dc0ab
commit
d2e238b4e7
@ -29,7 +29,9 @@ export class UpgradeResourceToLevel extends ActionController {
|
||||
return;
|
||||
}
|
||||
|
||||
const firstNotUpgraded = notUpgraded.sort((x, y) => x.level - y.level).shift();
|
||||
notUpgraded.sort((x, y) => x.level - y.level);
|
||||
|
||||
const firstNotUpgraded = notUpgraded.shift();
|
||||
|
||||
if (firstNotUpgraded && this.isTaskNotInQueue(villageId, firstNotUpgraded)) {
|
||||
this.scheduler.scheduleTask(UpgradeBuildingTask.name, { villageId, buildId: firstNotUpgraded.buildId });
|
||||
|
Loading…
Reference in New Issue
Block a user