private void UpdateWorkshop(Account acc, Village vill, CellCollection cells, int column) { var text = cells[column].Text; var troop = (Classificator.TroopsEnum)Enum.Parse(typeof(Classificator.TroopsEnum), text.Replace(" ", "")); if (troop == vill.Settings.WorkshopTrain) return; //no difference vill.Settings.WorkshopTrain = troop; TroopsHelper.ReStartResearchAndImprovement(acc, vill); }
public override async Task <TaskRes> Execute(Account acc) { // Troops task TroopsHelper.ReStartTroopTraining(acc, Vill); await Task.Delay(AccountHelper.Delay()); TroopsHelper.ReStartResearchAndImprovement(acc, Vill); await Task.Delay(AccountHelper.Delay()); // Building task BuildingHelper.ReStartBuilding(acc, Vill); await Task.Delay(AccountHelper.Delay()); BuildingHelper.ReStartDemolishing(acc, Vill); await Task.Delay(AccountHelper.Delay()); // Celebration task AccountHelper.ReStartCelebration(acc, Vill); return(TaskRes.Executed); }