//public BuildItemUnitView Upgraded(IGDetailPlanetService planetService, int userId, int planetId,bool premiumIsActive) public ItemProgress Upgraded(IDbConnection connection, GDetailPlanetDataModel planet, int userId, bool premiumIsActive, IServiceProvider resolver) { var bu = new BuildUpgrade(); bu.SetData(planet.BuildSpaceShipyard, NativeName); return(base.Upgraded(connection, planet, bu, resolver)); }
public int UpgradeForCc(IDbConnection connection, GDetailPlanetDataModel planet, int userId, bool premiumIsActive, BuildUpgrade preResult, IServiceProvider resolver) { var bu = new BuildUpgrade(); bu.SetData(planet.BuildEnergyConverter, NativeName); return(base.UpgradeForCc(connection, planet, userId, premiumIsActive, preResult, CalcCcCurrentPrice(preResult.Progress?.Level ?? 1), resolver)); }
//BuildItemUnitView public ItemProgress Upgraded(IDbConnection connection, GDetailPlanetDataModel planet, int userId, bool premiumIsActive, IServiceProvider resolver) { var bu = new BuildUpgrade(); bu.SetData(planet.Turels, NativeName); if (!bu.IsUpgradeComplite(bu.Progress)) { return(bu.Progress); } //planetService.SavePlanet(); bu.Progress = ItemProgress.ProgressUpdateComplite(bu.Progress); BuildUpgrade.TransactionBuildUpdate(connection, planet, bu, resolver); return(bu.Progress); }