@@ -104,7 +104,7 @@ private async Task<bool> Construct(Account acc)
104
104
return false ;
105
105
}
106
106
107
- await Task . Delay ( AccountHelper . Delay ( acc ) ) ;
107
+ await AccountHelper . DelayWait ( acc ) ;
108
108
acc . Logger . Information ( $ "Starting contruct { _buildingTask . Building } in { Vill . Name } ") ;
109
109
var element = acc . Wb . Driver . FindElement ( By . XPath ( button . XPath ) ) ;
110
110
if ( element == null )
@@ -203,6 +203,7 @@ private async Task<bool> Upgrade(Account acc)
203
203
204
204
if ( ! watchAd )
205
205
{
206
+ await AccountHelper . DelayWait ( acc ) ;
206
207
acc . Logger . Information ( "Using normal upgrade button" ) ;
207
208
208
209
upgradeButton = buttons . FirstOrDefault ( x => x . HasClass ( "build" ) ) ;
@@ -460,13 +461,13 @@ private async Task<bool> FreeCropCondition(Account acc)
460
461
461
462
private async Task MoveIntoBuilding ( Account acc )
462
463
{
463
- await Task . Delay ( AccountHelper . Delay ( acc ) ) ;
464
+ await AccountHelper . DelayWait ( acc ) ;
464
465
acc . Logger . Information ( $ "Move into building { _buildingTask . Building } ", this ) ;
465
466
await NavigationHelper . EnterBuilding ( acc , Vill , ( int ) _buildingTask . BuildingId ) ;
466
467
var build = Vill . Build . Buildings . FirstOrDefault ( x => x . Id == _buildingTask . BuildingId ) ;
467
468
if ( build . Type == BuildingEnum . Site )
468
469
{
469
- await Task . Delay ( AccountHelper . Delay ( acc ) ) ;
470
+ await AccountHelper . DelayWait ( acc ) ;
470
471
acc . Logger . Information ( $ "This is contruct task, choose correct tab for building { _buildingTask . Building } ", this ) ;
471
472
await NavigationHelper . ToConstructionTab ( acc , _buildingTask . Building ) ;
472
473
}
0 commit comments