public void updateValues()
 {
     NumberFormatInfo nFI = GameEngine.NFI;
     VillageMap village = GameEngine.Instance.Village;
     if (village == null)
     {
         for (int i = 0; i < 8; i++)
         {
             this.setRowValues(i, -1, -1, -1);
         }
         this.tradersAvailableValue.Text = "0/0";
         this.traderCapacityValue.Text = "0";
     }
     else
     {
         StockExchangeInfo info2 = null;
         if ((this.selectedStockExchange >= 0) && (this.stockExchanges[this.selectedStockExchange] != null))
         {
             info2 = (StockExchangeInfo) this.stockExchanges[this.selectedStockExchange];
             this.updateDeliveryTime(this.selectedStockExchange);
         }
         WorldData localWorldData = GameEngine.Instance.LocalWorldData;
         switch (this.lastTab)
         {
             case 1:
             {
                 VillageMap.StockpileLevels levels = new VillageMap.StockpileLevels();
                 village.getStockpileLevels(levels);
                 if (info2 != null)
                 {
                     this.setRowValues(0, (int) levels.woodLevel, info2.woodLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(6), 6));
                     this.setRowValues(1, (int) levels.stoneLevel, info2.stoneLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(7), 7));
                     this.setRowValues(2, (int) levels.ironLevel, info2.ironLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(8), 8));
                     this.setRowValues(3, (int) levels.pitchLevel, info2.pitchLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(9), 9));
                     break;
                 }
                 this.setRowValues(0, (int) levels.woodLevel, -1, -1);
                 this.setRowValues(1, (int) levels.stoneLevel, -1, -1);
                 this.setRowValues(2, (int) levels.ironLevel, -1, -1);
                 this.setRowValues(3, (int) levels.pitchLevel, -1, -1);
                 break;
             }
             case 2:
             {
                 VillageMap.GranaryLevels levels2 = new VillageMap.GranaryLevels();
                 village.getGranaryLevels(levels2);
                 VillageMap.InnLevels levels3 = new VillageMap.InnLevels();
                 village.getInnLevels(levels3);
                 if (info2 != null)
                 {
                     this.setRowValues(0, (int) levels2.applesLevel, info2.applesLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(13), 13));
                     this.setRowValues(1, (int) levels2.cheeseLevel, info2.cheeseLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(0x11), 0x11));
                     this.setRowValues(2, (int) levels2.meatLevel, info2.meatLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(0x10), 0x10));
                     this.setRowValues(3, (int) levels2.breadLevel, info2.breadLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(14), 14));
                     this.setRowValues(4, (int) levels2.vegLevel, info2.vegLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(15), 15));
                     this.setRowValues(5, (int) levels2.fishLevel, info2.fishLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(0x12), 0x12));
                     this.setRowValues(6, (int) levels3.aleLevel, info2.aleLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(12), 12));
                     break;
                 }
                 this.setRowValues(0, (int) levels2.applesLevel, -1, -1);
                 this.setRowValues(1, (int) levels2.cheeseLevel, -1, -1);
                 this.setRowValues(2, (int) levels2.meatLevel, -1, -1);
                 this.setRowValues(3, (int) levels2.breadLevel, -1, -1);
                 this.setRowValues(4, (int) levels2.vegLevel, -1, -1);
                 this.setRowValues(5, (int) levels2.fishLevel, -1, -1);
                 this.setRowValues(6, (int) levels3.aleLevel, -1, -1);
                 break;
             }
             case 3:
             {
                 VillageMap.ArmouryLevels levels4 = new VillageMap.ArmouryLevels();
                 village.getArmouryLevels(levels4);
                 if (info2 != null)
                 {
                     this.setRowValues(0, (int) levels4.bowsLevel, info2.bowsLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(0x1d), 0x1d));
                     this.setRowValues(1, (int) levels4.pikesLevel, info2.pikesLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(0x1c), 0x1c));
                     this.setRowValues(2, (int) levels4.armourLevel, info2.armourLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(0x1f), 0x1f));
                     this.setRowValues(3, (int) levels4.swordsLevel, info2.swordsLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(30), 30));
                     this.setRowValues(4, (int) levels4.catapultsLevel, info2.catapultsLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(0x20), 0x20));
                     break;
                 }
                 this.setRowValues(0, (int) levels4.bowsLevel, -1, -1);
                 this.setRowValues(1, (int) levels4.pikesLevel, -1, -1);
                 this.setRowValues(2, (int) levels4.armourLevel, -1, -1);
                 this.setRowValues(3, (int) levels4.swordsLevel, -1, -1);
                 this.setRowValues(4, (int) levels4.catapultsLevel, -1, -1);
                 break;
             }
             case 4:
             {
                 VillageMap.TownHallLevels levels5 = new VillageMap.TownHallLevels();
                 village.getTownHallLevels(levels5);
                 if (info2 != null)
                 {
                     this.setRowValues(0, (int) levels5.venisonLevel, info2.venisonLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(0x16), 0x16));
                     this.setRowValues(1, (int) levels5.furnitureLevel, info2.furnitureLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(0x15), 0x15));
                     this.setRowValues(2, (int) levels5.metalwareLevel, info2.metalwareLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(0x1a), 0x1a));
                     this.setRowValues(3, (int) levels5.clothesLevel, info2.clothesLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(0x13), 0x13));
                     this.setRowValues(4, (int) levels5.wineLevel, info2.wineLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(0x21), 0x21));
                     this.setRowValues(5, (int) levels5.saltLevel, info2.saltLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(0x17), 0x17));
                     this.setRowValues(6, (int) levels5.spicesLevel, info2.spicesLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(0x18), 0x18));
                     this.setRowValues(7, (int) levels5.silkLevel, info2.silkLevel, TradingCalcs.calcSellCost(localWorldData, info2.getFakeLevel(0x19), 0x19));
                     break;
                 }
                 this.setRowValues(0, (int) levels5.venisonLevel, -1, -1);
                 this.setRowValues(1, (int) levels5.furnitureLevel, -1, -1);
                 this.setRowValues(2, (int) levels5.metalwareLevel, -1, -1);
                 this.setRowValues(3, (int) levels5.clothesLevel, -1, -1);
                 this.setRowValues(4, (int) levels5.wineLevel, -1, -1);
                 this.setRowValues(5, (int) levels5.saltLevel, -1, -1);
                 this.setRowValues(6, (int) levels5.spicesLevel, -1, -1);
                 this.setRowValues(7, (int) levels5.silkLevel, -1, -1);
                 break;
             }
         }
         this.numTraders = village.numTraders();
         this.numFreeTraders = village.numFreeTraders();
         if (this.numFreeTraders > this.numTraders)
         {
             village.refreshTraderNumbers();
         }
         this.tradersAvailableValue.Text = this.numFreeTraders.ToString() + "/" + this.numTraders.ToString();
         this.traderCapacityValue.Text = (this.currentResourcePacketSize * this.numFreeTraders).ToString("N", nFI);
     }
     this.showBuySellWindow();
 }
 public void update()
 {
     VillageMap village = GameEngine.Instance.Village;
     if (village != null)
     {
         NumberFormatInfo nFI = GameEngine.NFI;
         VillageMap.StockpileLevels levels = new VillageMap.StockpileLevels();
         village.getStockpileLevels(levels);
         VillageMap.GranaryLevels levels2 = new VillageMap.GranaryLevels();
         village.getGranaryLevels(levels2);
         VillageMap.ArmouryLevels levels3 = new VillageMap.ArmouryLevels();
         village.getArmouryLevels(levels3);
         VillageMap.TownHallLevels levels4 = new VillageMap.TownHallLevels();
         village.getTownHallLevels(levels4);
         VillageMap.InnLevels levels5 = new VillageMap.InnLevels();
         village.getInnLevels(levels5);
         this.woodLabel.Text = levels.woodLevel.ToString("N", nFI);
         this.stoneLabel.Text = levels.stoneLevel.ToString("N", nFI);
         this.pitchLabel.Text = levels.pitchLevel.ToString("N", nFI);
         this.ironLabel.Text = levels.ironLevel.ToString("N", nFI);
         this.aleLabel.Text = levels5.aleLevel.ToString("N", nFI);
         this.applesLabel.Text = levels2.applesLevel.ToString("N", nFI);
         this.breadLabel.Text = levels2.breadLevel.ToString("N", nFI);
         this.cheeseLabel.Text = levels2.cheeseLevel.ToString("N", nFI);
         this.meatLabel.Text = levels2.meatLevel.ToString("N", nFI);
         this.vegLabel.Text = levels2.vegLevel.ToString("N", nFI);
         this.fishLabel.Text = levels2.fishLevel.ToString("N", nFI);
         this.bowsLabel.Text = levels3.bowsLevel.ToString("N", nFI);
         this.pikesLabel.Text = levels3.pikesLevel.ToString("N", nFI);
         this.swordsLabel.Text = levels3.swordsLevel.ToString("N", nFI);
         this.armourLabel.Text = levels3.armourLevel.ToString("N", nFI);
         this.catapultsLabel.Text = levels3.catapultsLevel.ToString("N", nFI);
         this.clothesLabel.Text = levels4.clothesLevel.ToString("N", nFI);
         this.furnitureLabel.Text = levels4.furnitureLevel.ToString("N", nFI);
         this.saltLabel.Text = levels4.saltLevel.ToString("N", nFI);
         this.wineLabel.Text = levels4.wineLevel.ToString("N", nFI);
         this.venisonLabel.Text = levels4.venisonLevel.ToString("N", nFI);
         this.spicesLabel.Text = levels4.spicesLevel.ToString("N", nFI);
         this.silkLabel.Text = levels4.silkLevel.ToString("N", nFI);
         this.metalwareLabel.Text = levels4.metalwareLevel.ToString("N", nFI);
         this.stockpileLimitLabel.Text = "(" + this.getCap(6).ToString("N", nFI) + ")";
         this.innLimitLabel.Text = "(" + this.getCap(12).ToString("N", nFI) + ")";
         this.granaryLimitLabel.Text = "(" + this.getCap(13).ToString("N", nFI) + ")";
         this.armouryLimitLabel.Text = "(" + this.getCap(0x1d).ToString("N", nFI) + ")";
         this.hallLimitLabel.Text = "(" + this.getCap(0x17).ToString("N", nFI) + ")";
         if (this.selectedResource >= 0)
         {
             this.selectedHeadingLabel.Text = VillageBuildingsData.getResourceNames(this.selectedResource) + ": " + ((int) village.getResourceLevel(this.selectedResource)).ToString("N", nFI);
             double num2 = village.getResourceProductionPerDay(this.selectedResource);
             this.dailyProductionValueLabel.Text = ((int) num2).ToString("N", nFI);
             this.totalBuildingsValueLabel.Text = village.numBuildingsOfType(this.selectedResource).ToString("N", nFI);
             this.workingBuildingsValueLabel.Text = village.numWorkingBuildingsOfType(this.selectedResource).ToString("N", nFI);
         }
         this.cardbar.update();
     }
 }
 public void updateValues()
 {
     NumberFormatInfo nFI = GameEngine.NFI;
     WorldData localWorldData = GameEngine.Instance.LocalWorldData;
     VillageMap village = GameEngine.Instance.Village;
     CastleMap castle = GameEngine.Instance.Castle;
     if ((village != null) && (castle != null))
     {
         int num = village.LocallyMade_Peasants;
         int num2 = village.LocallyMade_Archers;
         int num3 = village.LocallyMade_Pikemen;
         int num4 = village.LocallyMade_Swordsmen;
         int num5 = village.LocallyMade_Catapults;
         int num6 = (((num4 + num3) + num) + num5) + num2;
         VillageMap.ArmouryLevels levels = new VillageMap.ArmouryLevels();
         village.getArmouryLevels(levels);
         int capitalGold = (int) village.m_capitalGold;
         capitalGold -= (num * localWorldData.Barracks_GoldCost_Peasant) * localWorldData.MercenaryCostMultiplier;
         capitalGold -= (num2 * localWorldData.Barracks_GoldCost_Archer) * localWorldData.MercenaryCostMultiplier;
         capitalGold -= (num3 * localWorldData.Barracks_GoldCost_Pikeman) * localWorldData.MercenaryCostMultiplier;
         capitalGold -= (num4 * localWorldData.Barracks_GoldCost_Swordsman) * localWorldData.MercenaryCostMultiplier;
         capitalGold -= (num5 * localWorldData.Barracks_GoldCost_Catapult) * localWorldData.MercenaryCostMultiplier;
         int num8 = localWorldData.Barracks_GoldCost_Peasant * localWorldData.MercenaryCostMultiplier;
         int num9 = localWorldData.Barracks_GoldCost_Archer * localWorldData.MercenaryCostMultiplier;
         int num10 = localWorldData.Barracks_GoldCost_Pikeman * localWorldData.MercenaryCostMultiplier;
         int num11 = localWorldData.Barracks_GoldCost_Swordsman * localWorldData.MercenaryCostMultiplier;
         int num12 = localWorldData.Barracks_GoldCost_Catapult * localWorldData.MercenaryCostMultiplier;
         int numTroops = capitalGold / num8;
         int num14 = capitalGold / num9;
         int num15 = capitalGold / num10;
         int num16 = capitalGold / num11;
         int num17 = capitalGold / num12;
         int num18 = 0;
         if (GameEngine.Instance.World.isCapital(village.VillageID))
         {
             num18 = (village.m_parishCapitalResearchData.Research_Command + 1) * 0x19;
         }
         int num19 = village.calcTotalTroops() + num6;
         int num20 = num19;
         this.goldLabel.Text = capitalGold.ToString();
         this.CurrentTroopsLabel.Text = SK.Text("BARRACKS_Troops", "Troops") + ": " + num19.ToString("N", nFI);
         this.MaxLabelLabel.Text = SK.Text("BARRACKS_Max_Army_Size", "Max Army Size") + ": " + num18.ToString("N", nFI);
         int num21 = num18 - num19;
         if (numTroops > num21)
         {
             numTroops = num21;
         }
         if (num14 > num21)
         {
             num14 = num21;
         }
         if (num15 > num21)
         {
             num15 = num21;
         }
         if (num16 > num21)
         {
             num16 = num21;
         }
         if (num17 > num21)
         {
             num17 = num21;
         }
         if (num19 >= num18)
         {
             numTroops = 0;
             num14 = 0;
             num15 = 0;
             num16 = 0;
             num17 = 0;
         }
         ResearchData researchDataForCurrentVillage = GameEngine.Instance.World.GetResearchDataForCurrentVillage();
         if (researchDataForCurrentVillage.Research_Conscription == 0)
         {
             numTroops = 0;
             this.troop1Image.Visible = false;
         }
         else
         {
             this.troop1Image.Visible = true;
         }
         if (researchDataForCurrentVillage.Research_LongBow == 0)
         {
             num14 = 0;
             this.troop2Image.Visible = false;
         }
         else
         {
             this.troop2Image.Visible = true;
         }
         if (researchDataForCurrentVillage.Research_Pike == 0)
         {
             num15 = 0;
             this.troop3Image.Visible = false;
         }
         else
         {
             this.troop3Image.Visible = true;
         }
         if (researchDataForCurrentVillage.Research_Sword == 0)
         {
             num16 = 0;
             this.troop4Image.Visible = false;
         }
         else
         {
             this.troop4Image.Visible = true;
         }
         if (researchDataForCurrentVillage.Research_Catapult == 0)
         {
             num17 = 0;
             this.troop5Image.Visible = false;
         }
         else
         {
             this.troop5Image.Visible = true;
         }
         this.troopsMade1Disband.Visible = this.troop1Image.Visible;
         this.troopsMade2Disband.Visible = this.troop2Image.Visible;
         this.troopsMade3Disband.Visible = this.troop3Image.Visible;
         this.troopsMade4Disband.Visible = this.troop4Image.Visible;
         this.troopsMade5Disband.Visible = this.troop5Image.Visible;
         this.makePeasants = numTroops;
         this.makeArchers = num14;
         this.makePikemen = num15;
         this.makeSwordsmen = num16;
         this.makeCatapults = num17;
         bool flag = true;
         if (!GameEngine.Instance.World.isUserVillage(InterfaceMgr.Instance.getSelectedMenuVillage()))
         {
             flag = false;
         }
         this.troopMake1Button1.invalidate();
         this.troopMake1Button1.Active = false;
         this.troopMake1Button1.Text.Color = Color.FromArgb(0x97, 0x86, 0x6c);
         this.troopMake1Button5.Active = false;
         this.troopMake1Button5.Text.Color = Color.FromArgb(0x97, 0x86, 0x6c);
         this.troopMake1Button20.Active = false;
         this.troopMake1Button20.Text.Color = Color.FromArgb(0x97, 0x86, 0x6c);
         int num22 = this.calcMidSize(numTroops);
         if (numTroops > 0)
         {
             if (flag)
             {
                 this.troopMake1Button1.Active = true;
                 this.troopMake1Button1.Text.Color = ARGBColors.Black;
             }
             if (numTroops >= num22)
             {
                 this.troopMake1Button5.Text.Text = num22.ToString();
                 if (flag)
                 {
                     this.troopMake1Button5.Active = true;
                     this.troopMake1Button5.Text.Color = ARGBColors.Black;
                 }
             }
             if (numTroops > 1)
             {
                 this.troopMake1Button20.Text.Text = numTroops.ToString();
                 if (flag)
                 {
                     this.troopMake1Button20.Active = true;
                     this.troopMake1Button20.Text.Color = ARGBColors.Black;
                 }
             }
         }
         this.troopMake2Button1.invalidate();
         this.troopMake2Button1.Active = false;
         this.troopMake2Button1.Text.Color = Color.FromArgb(0x97, 0x86, 0x6c);
         this.troopMake2Button5.Active = false;
         this.troopMake2Button5.Text.Color = Color.FromArgb(0x97, 0x86, 0x6c);
         this.troopMake2Button20.Active = false;
         this.troopMake2Button20.Text.Color = Color.FromArgb(0x97, 0x86, 0x6c);
         int num23 = this.calcMidSize(num14);
         if (num14 > 0)
         {
             if (flag)
             {
                 this.troopMake2Button1.Active = true;
                 this.troopMake2Button1.Text.Color = ARGBColors.Black;
             }
             if (num14 >= num23)
             {
                 this.troopMake2Button5.Text.Text = num23.ToString();
                 if (flag)
                 {
                     this.troopMake2Button5.Active = true;
                     this.troopMake2Button5.Text.Color = ARGBColors.Black;
                 }
             }
             if (num14 > 1)
             {
                 this.troopMake2Button20.Text.Text = num14.ToString();
                 if (flag)
                 {
                     this.troopMake2Button20.Active = true;
                     this.troopMake2Button20.Text.Color = ARGBColors.Black;
                 }
             }
         }
         this.troopMake3Button1.invalidate();
         this.troopMake3Button1.Active = false;
         this.troopMake3Button1.Text.Color = Color.FromArgb(0x97, 0x86, 0x6c);
         this.troopMake3Button5.Active = false;
         this.troopMake3Button5.Text.Color = Color.FromArgb(0x97, 0x86, 0x6c);
         this.troopMake3Button20.Active = false;
         this.troopMake3Button20.Text.Color = Color.FromArgb(0x97, 0x86, 0x6c);
         int num24 = this.calcMidSize(num15);
         if (num15 > 0)
         {
             if (flag)
             {
                 this.troopMake3Button1.Active = true;
                 this.troopMake3Button1.Text.Color = ARGBColors.Black;
             }
             if (num15 >= num24)
             {
                 this.troopMake3Button5.Text.Text = num24.ToString();
                 if (flag)
                 {
                     this.troopMake3Button5.Active = true;
                     this.troopMake3Button5.Text.Color = ARGBColors.Black;
                 }
             }
             if (num15 > 1)
             {
                 this.troopMake3Button20.Text.Text = num15.ToString();
                 if (flag)
                 {
                     this.troopMake3Button20.Active = true;
                     this.troopMake3Button20.Text.Color = ARGBColors.Black;
                 }
             }
         }
         this.troopMake4Button1.invalidate();
         this.troopMake4Button1.Active = false;
         this.troopMake4Button1.Text.Color = Color.FromArgb(0x97, 0x86, 0x6c);
         this.troopMake4Button5.Active = false;
         this.troopMake4Button5.Text.Color = Color.FromArgb(0x97, 0x86, 0x6c);
         this.troopMake4Button20.Active = false;
         this.troopMake4Button20.Text.Color = Color.FromArgb(0x97, 0x86, 0x6c);
         int num25 = this.calcMidSize(num16);
         if ((num16 > 0) && flag)
         {
             if (flag)
             {
                 this.troopMake4Button1.Active = true;
                 this.troopMake4Button1.Text.Color = ARGBColors.Black;
             }
             if (num16 >= num25)
             {
                 this.troopMake4Button5.Text.Text = num25.ToString();
                 if (flag)
                 {
                     this.troopMake4Button5.Active = true;
                     this.troopMake4Button5.Text.Color = ARGBColors.Black;
                 }
             }
             if (num16 > 1)
             {
                 this.troopMake4Button20.Text.Text = num16.ToString();
                 if (flag)
                 {
                     this.troopMake4Button20.Active = true;
                     this.troopMake4Button20.Text.Color = ARGBColors.Black;
                 }
             }
         }
         this.troopMake5Button1.invalidate();
         this.troopMake5Button1.Active = false;
         this.troopMake5Button1.Text.Color = Color.FromArgb(0x97, 0x86, 0x6c);
         this.troopMake5Button5.Active = false;
         this.troopMake5Button5.Text.Color = Color.FromArgb(0x97, 0x86, 0x6c);
         this.troopMake5Button20.Active = false;
         this.troopMake5Button20.Text.Color = Color.FromArgb(0x97, 0x86, 0x6c);
         int num26 = this.calcMidSize(num17);
         if ((num17 > 0) && flag)
         {
             if (flag)
             {
                 this.troopMake5Button1.Active = true;
                 this.troopMake5Button1.Text.Color = ARGBColors.Black;
             }
             if (num17 >= num26)
             {
                 this.troopMake5Button5.Text.Text = num26.ToString();
                 if (flag)
                 {
                     this.troopMake5Button5.Active = true;
                     this.troopMake5Button5.Text.Color = ARGBColors.Black;
                 }
             }
             if (num17 > 1)
             {
                 this.troopMake5Button20.Text.Text = num17.ToString();
                 if (flag)
                 {
                     this.troopMake5Button20.Active = true;
                     this.troopMake5Button20.Text.Color = ARGBColors.Black;
                 }
             }
         }
         int numPeasants = 0;
         int numArchers = 0;
         int numPikemen = 0;
         int numSwordsmen = 0;
         int numCatapults = 0;
         int numCaptains = 0;
         int numReinfPeasants = 0;
         int numReinfArchers = 0;
         int numReinfPikemen = 0;
         int numReinfSwordsmen = 0;
         int numReinfCatapults = 0;
         int numReinfCaptains = 0;
         GameEngine.Instance.World.getTotalTroopsOutOfVillage(village.VillageID, ref numPeasants, ref numArchers, ref numPikemen, ref numSwordsmen, ref numCatapults, ref numCaptains, ref numReinfPeasants, ref numReinfArchers, ref numReinfPikemen, ref numReinfSwordsmen, ref numReinfCatapults, ref numReinfCaptains);
         int num39 = 0;
         int num40 = 0;
         int num41 = 0;
         int num42 = 0;
         int num43 = 0;
         castle.countOwnPlacedTroopTypes(ref num39, ref num40, ref num41, ref num42, ref num43);
         this.inCastlePeasantsLabel.Text = num39.ToString("N", nFI);
         this.inCastleArchersLabel.Text = num40.ToString("N", nFI);
         this.inCastlePikmenLabel.Text = num41.ToString("N", nFI);
         this.inCastleSwordsmenLabel.Text = num42.ToString("N", nFI);
         this.attackingPeasantsLabel.Text = numPeasants.ToString("N", nFI);
         this.attackingArchersLabel.Text = numArchers.ToString("N", nFI);
         this.attackingPikmenLabel.Text = numPikemen.ToString("N", nFI);
         this.attackingSwordsmenLabel.Text = numSwordsmen.ToString("N", nFI);
         this.attackingCatapultsLabel.Text = numCatapults.ToString("N", nFI);
         this.reinforcingPeasantsLabel.Text = numReinfPeasants.ToString("N", nFI);
         this.reinforcingArchersLabel.Text = numReinfArchers.ToString("N", nFI);
         this.reinforcingPikmenLabel.Text = numReinfPikemen.ToString("N", nFI);
         this.reinforcingSwordsmenLabel.Text = numReinfSwordsmen.ToString("N", nFI);
         this.reinforcingCatapultsLabel.Text = numReinfCatapults.ToString("N", nFI);
         numPeasants += village.m_numPeasants + num;
         numPeasants += num39;
         numPeasants += numReinfPeasants;
         numArchers += village.m_numArchers + num2;
         numArchers += num40;
         numArchers += numReinfArchers;
         numPikemen += village.m_numPikemen + num3;
         numPikemen += num41;
         numPikemen += numReinfPikemen;
         numSwordsmen += village.m_numSwordsmen + num4;
         numSwordsmen += num42;
         numSwordsmen += numReinfSwordsmen;
         numCatapults += village.m_numCatapults + num5;
         numCatapults += numReinfCatapults;
         this.troopsMade1Disband.Text.Text = numPeasants.ToString("N", nFI);
         this.troopsMade2Disband.Text.Text = numArchers.ToString("N", nFI);
         this.troopsMade3Disband.Text.Text = numPikemen.ToString("N", nFI);
         this.troopsMade4Disband.Text.Text = numSwordsmen.ToString("N", nFI);
         this.troopsMade5Disband.Text.Text = numCatapults.ToString("N", nFI);
         this.localPeasantsLabel.Text = (village.m_numPeasants + num).ToString("N", nFI);
         this.localArchersLabel.Text = (village.m_numArchers + num2).ToString("N", nFI);
         this.localPikmenLabel.Text = (village.m_numPikemen + num3).ToString("N", nFI);
         this.localSwordsmenLabel.Text = (village.m_numSwordsmen + num4).ToString("N", nFI);
         this.localCatapultsLabel.Text = (village.m_numCatapults + num5).ToString("N", nFI);
         this.troopGoldCost1Label.Text = num8.ToString();
         this.troopGoldCost2Label.Text = num9.ToString();
         this.troopGoldCost3Label.Text = num10.ToString();
         this.troopGoldCost4Label.Text = num11.ToString();
         this.troopGoldCost5Label.Text = num12.ToString();
         if (capitalGold < num8)
         {
             this.troopGold1Image.Colorise = Color.FromArgb(0xff, 0x80, 0x80);
         }
         else
         {
             this.troopGold1Image.Colorise = ARGBColors.White;
         }
         if (capitalGold < num9)
         {
             this.troopGold2Image.Colorise = Color.FromArgb(0xff, 0x80, 0x80);
         }
         else
         {
             this.troopGold2Image.Colorise = ARGBColors.White;
         }
         if (capitalGold < num10)
         {
             this.troopGold3Image.Colorise = Color.FromArgb(0xff, 0x80, 0x80);
         }
         else
         {
             this.troopGold3Image.Colorise = ARGBColors.White;
         }
         if (capitalGold < num11)
         {
             this.troopGold4Image.Colorise = Color.FromArgb(0xff, 0x80, 0x80);
         }
         else
         {
             this.troopGold4Image.Colorise = ARGBColors.White;
         }
         if (capitalGold < num12)
         {
             this.troopGold5Image.Colorise = Color.FromArgb(0xff, 0x80, 0x80);
         }
         else
         {
             this.troopGold5Image.Colorise = ARGBColors.White;
         }
         this.fullBar.MaxValue = GameEngine.Instance.LocalWorldData.Village_UnitCapacity;
         if (num20 < GameEngine.Instance.LocalWorldData.Village_UnitCapacity)
         {
             this.fullBar.Number = num20;
         }
         else
         {
             this.fullBar.Number = GameEngine.Instance.LocalWorldData.Village_UnitCapacity;
         }
     }
 }