Fix task updates
This commit is contained in:
parent
2af1f3a4f8
commit
c4a575d162
@ -6,7 +6,7 @@ import { grabContractResources } from '../Page/BuildingPage';
|
|||||||
@registerAction
|
@registerAction
|
||||||
export class UpdateBuildingTaskResourcesAction extends ActionController {
|
export class UpdateBuildingTaskResourcesAction extends ActionController {
|
||||||
async run(args: Args, task: Task): Promise<any> {
|
async run(args: Args, task: Task): Promise<any> {
|
||||||
const buildingTaskId = args.taskId;
|
const buildingTaskId = args.targetTaskId;
|
||||||
if (buildingTaskId === undefined) {
|
if (buildingTaskId === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ import { TaskId } from './Queue/TaskQueue';
|
|||||||
|
|
||||||
export interface Args {
|
export interface Args {
|
||||||
taskId?: TaskId;
|
taskId?: TaskId;
|
||||||
|
targetTaskId?: TaskId;
|
||||||
villageId?: number;
|
villageId?: number;
|
||||||
buildId?: number;
|
buildId?: number;
|
||||||
categoryId?: number;
|
categoryId?: number;
|
||||||
|
@ -24,7 +24,7 @@ export class UpdateResourceContracts extends TaskController {
|
|||||||
path: path('/build.php', { newdid: villageId, id: buildId }),
|
path: path('/build.php', { newdid: villageId, id: buildId }),
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
actions.push(new Command(UpdateBuildingTaskResourcesAction.name, { ...args, taskId: task.id }));
|
actions.push(new Command(UpdateBuildingTaskResourcesAction.name, { ...args, targetTaskId: task.id }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user