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();
 }
Ejemplo n.º 2
0
 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 updateLevels(bool force)
        {
            VillageMap village = GameEngine.Instance.Village;
            if (village != null)
            {
                NumberFormatInfo nFI = GameEngine.NFI;
                VillageMap.TownHallLevels levels = new VillageMap.TownHallLevels();
                village.getTownHallLevels(levels);
                if (force || (this.oldLevels == null))
                {
                    this.oldLevels = levels;
                }
                else
                {
                    bool flag = false;
                    if (levels.venisonLevel != this.oldLevels.venisonLevel)
                    {
                        flag = true;
                    }
                    if (levels.furnitureLevel != this.oldLevels.furnitureLevel)
                    {
                        flag = true;
                    }
                    if (levels.metalwareLevel != this.oldLevels.metalwareLevel)
                    {
                        flag = true;
                    }
                    if (levels.clothesLevel != this.oldLevels.clothesLevel)
                    {
                        flag = true;
                    }
                    if (levels.wineLevel != this.oldLevels.wineLevel)
                    {
                        flag = true;
                    }
                    if (levels.saltLevel != this.oldLevels.saltLevel)
                    {
                        flag = true;
                    }
                    if (levels.spicesLevel != this.oldLevels.spicesLevel)
                    {
                        flag = true;
                    }
                    if (levels.silkLevel != this.oldLevels.silkLevel)
                    {
                        flag = true;
                    }
                    if (!flag)
                    {
                        return;
                    }
                    this.oldLevels = levels;
                }
                this.resourceLevels[0] = (int) levels.venisonLevel;
                this.resourceLevels[1] = (int) levels.furnitureLevel;
                this.resourceLevels[2] = (int) levels.metalwareLevel;
                this.resourceLevels[3] = (int) levels.clothesLevel;
                this.resourceLevels[4] = (int) levels.wineLevel;
                this.resourceLevels[5] = (int) levels.saltLevel;
                this.resourceLevels[6] = (int) levels.spicesLevel;
                this.resourceLevels[7] = (int) levels.silkLevel;
                int num = GameEngine.Instance.World.UserResearchData.Research_Craftsmanship;
                this.banquetRow1.Visible = num >= 1;
                this.banquetRow2.Visible = num >= 2;
                this.banquetRow3.Visible = num >= 3;
                this.banquetRow4.Visible = num >= 4;
                this.banquetRow5.Visible = num >= 5;
                this.banquetRow6.Visible = num >= 6;
                this.banquetRow7.Visible = num >= 7;
                this.banquetRow8.Visible = num >= 8;
                for (int i = num; i < 8; i++)
                {
                    this.resourceLevels[i] = 0;
                }
                this.resourceLevelText1.Text = this.resourceLevels[0].ToString("N", nFI);
                this.resourceLevelText2.Text = this.resourceLevels[1].ToString("N", nFI);
                this.resourceLevelText3.Text = this.resourceLevels[2].ToString("N", nFI);
                this.resourceLevelText4.Text = this.resourceLevels[3].ToString("N", nFI);
                this.resourceLevelText5.Text = this.resourceLevels[4].ToString("N", nFI);
                this.resourceLevelText6.Text = this.resourceLevels[5].ToString("N", nFI);
                this.resourceLevelText7.Text = this.resourceLevels[6].ToString("N", nFI);
                this.resourceLevelText8.Text = this.resourceLevels[7].ToString("N", nFI);
                this.holdBandquetRow1.Enabled = false;
                this.holdBandquetRow2.Enabled = false;
                this.holdBandquetRow3.Enabled = false;
                this.holdBandquetRow4.Enabled = false;
                this.holdBandquetRow5.Enabled = false;
                this.holdBandquetRow6.Enabled = false;
                this.holdBandquetRow7.Enabled = false;
                this.holdBandquetRow8.Enabled = false;
                this.holdBandquetRow1.Text.Color = Color.FromArgb(0x7f, ARGBColors.Black);
                this.holdBandquetRow2.Text.Color = Color.FromArgb(0x7f, ARGBColors.Black);
                this.holdBandquetRow3.Text.Color = Color.FromArgb(0x7f, ARGBColors.Black);
                this.holdBandquetRow4.Text.Color = Color.FromArgb(0x7f, ARGBColors.Black);
                this.holdBandquetRow5.Text.Color = Color.FromArgb(0x7f, ARGBColors.Black);
                this.holdBandquetRow6.Text.Color = Color.FromArgb(0x7f, ARGBColors.Black);
                this.holdBandquetRow7.Text.Color = Color.FromArgb(0x7f, ARGBColors.Black);
                this.holdBandquetRow8.Text.Color = Color.FromArgb(0x7f, ARGBColors.Black);
                this.numResourcesRow1.Text = "0";
                this.honourRow1.Text = "0";
                this.numResourcesRow2.Text = "0";
                this.honourRow2.Text = "0";
                this.numResourcesRow3.Text = "0";
                this.honourRow3.Text = "0";
                this.numResourcesRow4.Text = "0";
                this.honourRow4.Text = "0";
                this.numResourcesRow5.Text = "0";
                this.honourRow5.Text = "0";
                this.numResourcesRow6.Text = "0";
                this.honourRow6.Text = "0";
                this.numResourcesRow7.Text = "0";
                this.honourRow7.Text = "0";
                this.numResourcesRow8.Text = "0";
                this.honourRow8.Text = "0";
                this.honourImageRow1.Alpha = 0.5f;
                this.honourImageRow2.Alpha = 0.5f;
                this.honourImageRow3.Alpha = 0.5f;
                this.honourImageRow4.Alpha = 0.5f;
                this.honourImageRow5.Alpha = 0.5f;
                this.honourImageRow6.Alpha = 0.5f;
                this.honourImageRow7.Alpha = 0.5f;
                this.honourImageRow8.Alpha = 0.5f;
                this.honourRow1.Color = Color.FromArgb(0x7f, 0xe0, 0xcb, 0x92);
                this.honourRow2.Color = Color.FromArgb(0x7f, 0xe0, 0xcb, 0x92);
                this.honourRow3.Color = Color.FromArgb(0x7f, 0xe0, 0xcb, 0x92);
                this.honourRow4.Color = Color.FromArgb(0x7f, 0xe0, 0xcb, 0x92);
                this.honourRow5.Color = Color.FromArgb(0x7f, 0xe0, 0xcb, 0x92);
                this.honourRow6.Color = Color.FromArgb(0x7f, 0xe0, 0xcb, 0x92);
                this.honourRow7.Color = Color.FromArgb(0x7f, 0xe0, 0xcb, 0x92);
                this.honourRow8.Color = Color.FromArgb(0x7f, 0xe0, 0xcb, 0x92);
                this.xRow1.Color = Color.FromArgb(0x7f, 0x3e, 0xed, 0x2e);
                this.xRow2.Color = Color.FromArgb(0x7f, 0x3e, 0xed, 0x2e);
                this.xRow3.Color = Color.FromArgb(0x7f, 0x3e, 0xed, 0x2e);
                this.xRow4.Color = Color.FromArgb(0x7f, 0x3e, 0xed, 0x2e);
                this.xRow5.Color = Color.FromArgb(0x7f, 0x3e, 0xed, 0x2e);
                this.xRow6.Color = Color.FromArgb(0x7f, 0x3e, 0xed, 0x2e);
                this.xRow7.Color = Color.FromArgb(0x7f, 0x3e, 0xed, 0x2e);
                this.xRow8.Color = Color.FromArgb(0x7f, 0x3e, 0xed, 0x2e);
                this.rightBracket1.Position = new Point(0x58, 2);
                this.rightBracket2.Position = new Point(0x58, 2);
                this.rightBracket3.Position = new Point(0x58, 2);
                this.rightBracket4.Position = new Point(0x58, 2);
                this.rightBracket5.Position = new Point(0x58, 2);
                this.rightBracket6.Position = new Point(0x58, 2);
                this.rightBracket7.Position = new Point(0x58, 2);
                this.rightBracket8.Position = new Point(0x58, 2);
                int[] numArray = new int[8];
                for (int j = 0; j < 8; j++)
                {
                    numArray[j] = this.resourceLevels[j];
                    for (int m = 0; m < 8; m++)
                    {
                        this.banquetLevels[m, j] = 0;
                        CustomSelfDrawPanel.CSDImage image = this.getTypePanel(j + 1, m);
                        if (image != null)
                        {
                            image.Visible = false;
                        }
                    }
                }
                for (int k = 0; k < 8; k++)
                {
                    int currentHonourValue = 0x77359400;
                    for (int n = 0; n < 8; n++)
                    {
                        if ((numArray[n] > 0) && (numArray[n] < currentHonourValue))
                        {
                            currentHonourValue = numArray[n];
                        }
                    }
                    if (currentHonourValue == 0x77359400)
                    {
                        break;
                    }
                    int banquetSize = 0;
                    int[] numArray2 = new int[8];
                    for (int num9 = 0; num9 < 8; num9++)
                    {
                        numArray2[num9] = 0;
                    }
                    for (int num10 = 0; num10 < 8; num10++)
                    {
                        if (numArray[num10] >= currentHonourValue)
                        {
                            banquetSize++;
                            numArray[num10] -= currentHonourValue;
                            numArray2[num10] = currentHonourValue;
                        }
                    }
                    int num11 = currentHonourValue;
                    currentHonourValue *= banquetSize;
                    for (int num12 = 0; num12 < 8; num12++)
                    {
                        this.banquetLevels[banquetSize - 1, num12] = numArray2[num12];
                    }
                    if (GameEngine.Instance.World.ThirdAgeWorld)
                    {
                        currentHonourValue *= 10;
                    }
                    else if (GameEngine.Instance.LocalWorldData.Alternate_Ruleset == 1)
                    {
                        currentHonourValue *= 2;
                    }
                    switch (banquetSize)
                    {
                        case 1:
                            this.numResourcesRow1.Text = num11.ToString("N", nFI);
                            this.honourRow1.Text = CardTypes.getBanquetHonourValue(currentHonourValue, GameEngine.Instance.LocalWorldData, GameEngine.Instance.World.UserCardData).ToString("N", nFI);
                            this.holdBandquetRow1.Enabled = true;
                            this.honourImageRow1.Alpha = 1f;
                            this.honourRow1.Color = Color.FromArgb(0xe0, 0xcb, 0x92);
                            this.xRow1.Color = Color.FromArgb(0x3e, 0xed, 0x2e);
                            this.rightBracket1.Position = new Point(120, 2);
                            this.leftBracket1.Alpha = 1f;
                            this.rightBracket1.Alpha = 1f;
                            this.holdBandquetRow1.Text.Color = ARGBColors.Black;
                            break;

                        case 2:
                            this.numResourcesRow2.Text = num11.ToString("N", nFI);
                            this.honourRow2.Text = CardTypes.getBanquetHonourValue(currentHonourValue * 2, GameEngine.Instance.LocalWorldData, GameEngine.Instance.World.UserCardData).ToString("N", nFI);
                            this.honourImageRow2.Alpha = 1f;
                            this.xRow2.Color = Color.FromArgb(0x3e, 0xed, 0x2e);
                            this.honourRow2.Color = Color.FromArgb(0xe0, 0xcb, 0x92);
                            this.holdBandquetRow2.Enabled = true;
                            this.rightBracket2.Position = new Point(0x98, 2);
                            this.leftBracket2.Alpha = 1f;
                            this.rightBracket2.Alpha = 1f;
                            this.holdBandquetRow2.Text.Color = ARGBColors.Black;
                            break;

                        case 3:
                            this.numResourcesRow3.Text = num11.ToString("N", nFI);
                            this.honourRow3.Text = CardTypes.getBanquetHonourValue(currentHonourValue * 3, GameEngine.Instance.LocalWorldData, GameEngine.Instance.World.UserCardData).ToString("N", nFI);
                            this.holdBandquetRow3.Enabled = true;
                            this.honourImageRow3.Alpha = 1f;
                            this.honourRow3.Color = Color.FromArgb(0xe0, 0xcb, 0x92);
                            this.xRow3.Color = Color.FromArgb(0x3e, 0xed, 0x2e);
                            this.rightBracket3.Position = new Point(0xb8, 2);
                            this.leftBracket3.Alpha = 1f;
                            this.rightBracket3.Alpha = 1f;
                            this.holdBandquetRow3.Text.Color = ARGBColors.Black;
                            break;

                        case 4:
                            this.numResourcesRow4.Text = num11.ToString("N", nFI);
                            this.honourRow4.Text = CardTypes.getBanquetHonourValue(currentHonourValue * 4, GameEngine.Instance.LocalWorldData, GameEngine.Instance.World.UserCardData).ToString("N", nFI);
                            this.holdBandquetRow4.Enabled = true;
                            this.honourImageRow4.Alpha = 1f;
                            this.honourRow4.Color = Color.FromArgb(0xe0, 0xcb, 0x92);
                            this.xRow4.Color = Color.FromArgb(0x3e, 0xed, 0x2e);
                            this.rightBracket4.Position = new Point(0xd8, 2);
                            this.leftBracket4.Alpha = 1f;
                            this.rightBracket4.Alpha = 1f;
                            this.holdBandquetRow4.Text.Color = ARGBColors.Black;
                            break;

                        case 5:
                            this.numResourcesRow5.Text = num11.ToString("N", nFI);
                            this.honourRow5.Text = CardTypes.getBanquetHonourValue(currentHonourValue * 7, GameEngine.Instance.LocalWorldData, GameEngine.Instance.World.UserCardData).ToString("N", nFI);
                            this.holdBandquetRow5.Enabled = true;
                            this.honourImageRow5.Alpha = 1f;
                            this.honourRow5.Color = Color.FromArgb(0xe0, 0xcb, 0x92);
                            this.xRow5.Color = Color.FromArgb(0x3e, 0xed, 0x2e);
                            this.rightBracket5.Position = new Point(0xf8, 2);
                            this.leftBracket5.Alpha = 1f;
                            this.rightBracket5.Alpha = 1f;
                            this.holdBandquetRow5.Text.Color = ARGBColors.Black;
                            break;

                        case 6:
                            this.numResourcesRow6.Text = num11.ToString("N", nFI);
                            this.honourRow6.Text = CardTypes.getBanquetHonourValue(currentHonourValue * 10, GameEngine.Instance.LocalWorldData, GameEngine.Instance.World.UserCardData).ToString("N", nFI);
                            this.holdBandquetRow6.Enabled = true;
                            this.honourImageRow6.Alpha = 1f;
                            this.honourRow6.Color = Color.FromArgb(0xe0, 0xcb, 0x92);
                            this.xRow6.Color = Color.FromArgb(0x3e, 0xed, 0x2e);
                            this.rightBracket6.Position = new Point(280, 2);
                            this.leftBracket6.Alpha = 1f;
                            this.rightBracket6.Alpha = 1f;
                            this.holdBandquetRow6.Text.Color = ARGBColors.Black;
                            break;

                        case 7:
                            this.numResourcesRow7.Text = num11.ToString("N", nFI);
                            this.honourRow7.Text = CardTypes.getBanquetHonourValue(currentHonourValue * 14, GameEngine.Instance.LocalWorldData, GameEngine.Instance.World.UserCardData).ToString("N", nFI);
                            this.holdBandquetRow7.Enabled = true;
                            this.honourImageRow7.Alpha = 1f;
                            this.honourRow7.Color = Color.FromArgb(0xe0, 0xcb, 0x92);
                            this.xRow7.Color = Color.FromArgb(0x3e, 0xed, 0x2e);
                            this.rightBracket7.Position = new Point(0x138, 2);
                            this.leftBracket7.Alpha = 1f;
                            this.rightBracket7.Alpha = 1f;
                            this.holdBandquetRow7.Text.Color = ARGBColors.Black;
                            break;

                        case 8:
                            this.numResourcesRow8.Text = num11.ToString("N", nFI);
                            this.honourRow8.Text = CardTypes.getBanquetHonourValue(currentHonourValue * 20, GameEngine.Instance.LocalWorldData, GameEngine.Instance.World.UserCardData).ToString("N", nFI);
                            this.holdBandquetRow8.Enabled = true;
                            this.honourImageRow8.Alpha = 1f;
                            this.honourRow8.Color = Color.FromArgb(0xe0, 0xcb, 0x92);
                            this.xRow8.Color = Color.FromArgb(0x3e, 0xed, 0x2e);
                            this.rightBracket8.Position = new Point(0x158, 2);
                            this.leftBracket8.Alpha = 1f;
                            this.rightBracket8.Alpha = 1f;
                            this.holdBandquetRow8.Text.Color = ARGBColors.Black;
                            break;
                    }
                    int num13 = 0;
                    int num14 = 0;
                    for (int num15 = 0; num15 < banquetSize; num15++)
                    {
                        for (int num16 = num14; num16 < 8; num16++)
                        {
                            if (numArray2[num16] > 0)
                            {
                                CustomSelfDrawPanel.CSDImage image2 = this.getTypePanel(banquetSize, num13++);
                                if (image2 != null)
                                {
                                    image2.Image = (Image) this.getImage(num16);
                                    image2.Visible = true;
                                }
                                num14 = num16 + 1;
                                break;
                            }
                        }
                    }
                }
            }
            base.Invalidate();
        }