public void updateEmptyVillageText(int selectedVillage)
        {
            bool flag  = false;
            bool flag2 = false;

            if (GameEngine.Instance.World.isSpecial(selectedVillage) && GameEngine.Instance.World.isAttackableSpecial(selectedVillage))
            {
                bool flag3 = this.isTallTreasureChestPanel(selectedVillage);
                if (flag3 != this.wasTall)
                {
                    this.init(selectedVillage);
                    flag = true;
                }
                flag2 = flag3;
            }
            if (!flag && GameEngine.Instance.LocalWorldData.AIWorld)
            {
                bool flag4 = false;
                switch (GameEngine.Instance.World.getSpecial(selectedVillage))
                {
                case 7:
                case 9:
                case 11:
                case 13:
                    flag4 = true;
                    break;

                default:
                    flag4 = false;
                    break;
                }
                if (flag4 != this.wasAiShort)
                {
                    this.init(selectedVillage);
                }
            }
            NumberFormatInfo nFI = GameEngine.NFI;

            this.m_selectedVillage                  = selectedVillage;
            this.buyVillageButton.Enabled           = true;
            this.attackButton_AI.Enabled            = true;
            this.scoutButton_AI.Enabled             = true;
            this.scoutButton_Resources.Enabled      = true;
            this.treasureCastleTimeoutLabel.Visible = false;
            this.backGround_AI.Visible              = false;
            this.backGround_Enemy.Visible           = false;
            this.backGround_Resources.Visible       = false;
            this.backGround_Charter.Visible         = false;
            this.special = false;
            this.invasionLabel.Visible = false;
            this.backGround_AI.removeWikiLink(this.wikiLink);
            this.wikiLink = null;
            int type = GameEngine.Instance.World.getSpecial(selectedVillage);

            if (SpecialVillageTypes.IS_TREASURE_CASTLE(type))
            {
                this.wikiLink = this.backGround_AI.addWikiLink(0x31);
            }
            else if ((type == 15) || (type == 0x11))
            {
                this.wikiLink = this.backGround_AI.addWikiLink(50);
            }
            if (!GameEngine.Instance.World.isSpecial(selectedVillage))
            {
                this.backGround_Charter.Visible = true;
                this.backGround_Charter.updateHeading(SK.Text("EmptyVillagePanel_Available_Village", "New Village Charter"));
                this.backGround_Charter.updatePanelTypeFromVillageID(selectedVillage);
                this.backGround_Charter.stretchBackground();
                base.Parent.Invalidate();
                double villageGoldCost = GameEngine.Instance.LocalWorldData.villageGoldCost;
                double num4            = GameEngine.Instance.World.calcVillageDistance(InterfaceMgr.Instance.getSelectedMenuVillage(), selectedVillage) * GameEngine.Instance.LocalWorldData.villageCostDistanceMultiplier;
                villageGoldCost *= num4 + 1.0;
                int numOwnedVillages = GameEngine.Instance.World.numVillagesOwned();
                int num6             = (int)villageGoldCost;
                num6               *= numOwnedVillages;
                villageGoldCost     = num6;
                this.goldLabel.Text = ((int)villageGoldCost).ToString("N", nFI);
                WorldData localWorldData = GameEngine.Instance.LocalWorldData;
                Point     point          = GameEngine.Instance.World.getVillageLocation(InterfaceMgr.Instance.OwnSelectedVillage);
                Point     point2         = GameEngine.Instance.World.getVillageLocation(selectedVillage);
                double    d = ((point.X - point2.X) * (point.X - point2.X)) + ((point.Y - point2.Y) * (point.Y - point2.Y));
                d  = Math.Sqrt(d) * ((localWorldData.CaptainsMoveSpeed * localWorldData.gamePlaySpeed) * ResearchData.CaptainTimes[GameEngine.Instance.World.UserResearchData.Research_Courtiers]);
                d *= CardTypes.getArmySpeed(GameEngine.Instance.World.UserCardData);
                string str = VillageMap.createBuildTimeString((int)d);
                this.travelTimeLabel.Text              = str;
                this.travelTimeLabel.CustomTooltipID   = 0x4e20;
                this.travelTimeLabel.CustomTooltipData = (int)d;
                int num8 = 0;
                if (GameEngine.Instance.LocalWorldData.Alternate_Ruleset != 1)
                {
                    num8 = ResearchData.getVillageBuyHonourCost(numOwnedVillages);
                    if (((num8 > 0) && GameEngine.Instance.World.FourthAgeWorld) && (numOwnedVillages < GameEngine.Instance.World.MostAge4Villages))
                    {
                        num8 = 0;
                    }
                }
                if (num8 > 0)
                {
                    this.honourImage.Visible = true;
                    this.honourLabel.Visible = true;
                    this.honourLabel.Text    = num8.ToString("N", nFI);
                }
                else
                {
                    this.honourImage.Visible = false;
                    this.honourLabel.Visible = false;
                }
            }
            else
            {
                this.special = true;
                if (GameEngine.Instance.World.isAttackableSpecial(selectedVillage))
                {
                    this.backGround_AI.Visible = true;
                    this.backGround_AI.updateHeading(GameEngine.Instance.World.getVillageNameOrType(selectedVillage));
                    this.backGround_AI.updatePanelTypeFromVillageID(selectedVillage);
                    if (SpecialVillageTypes.IS_TREASURE_CASTLE(type))
                    {
                        if (GameEngine.Instance.World.isCapital(InterfaceMgr.Instance.OwnSelectedVillage))
                        {
                            this.attackButton_AI.Enabled = false;
                        }
                        if (flag2)
                        {
                            this.updateTreasureCastleTimeout();
                            this.treasureCastleTimeoutLabel.Visible = true;
                            this.attackButton_AI.Enabled            = false;
                        }
                    }
                }
                else if ((type >= 100) && (type <= 0xc7))
                {
                    this.backGround_Resources.Visible = true;
                    this.backGround_Resources.updateHeading(GameEngine.Instance.World.getVillageNameOrType(selectedVillage));
                    this.backGround_Resources.updatePanelTypeFromVillageID(selectedVillage);
                    this.scoutButton_Resources.Enabled = false;
                }
                else
                {
                    this.backGround_Enemy.Visible = true;
                    if (type == 30)
                    {
                        switch (GameEngine.Instance.World.getAIInvasionMarkerState(selectedVillage))
                        {
                        case 0:
                            this.backGround_Enemy.updateHeading(SK.Text("Invasion_None", "No Invasion Sighted"));
                            break;

                        case 1:
                        {
                            this.backGround_Enemy.updateHeading(SK.Text("Invasion_Planned", "Invasion Sighted"));
                            DateTime time = GameEngine.Instance.World.getNextAIInvasionDate(selectedVillage);
                            if (time != DateTime.MinValue)
                            {
                                TimeSpan span = (TimeSpan)(time - VillageMap.getCurrentServerTime());
                                this.invasionLabel.Visible = true;
                                this.invasionLabel.Text    = VillageMap.createBuildTimeString((int)span.TotalSeconds);
                            }
                            break;
                        }

                        case 2:
                            this.backGround_Enemy.updateHeading(SK.Text("Invasion_Inprogress", "Invasion In Progress"));
                            break;
                        }
                    }
                    else
                    {
                        this.backGround_Enemy.updateHeading(GameEngine.Instance.World.getVillageNameOrType(selectedVillage));
                    }
                    this.backGround_Enemy.updatePanelTypeFromVillageID(selectedVillage);
                }
                if (!GameEngine.Instance.World.isScoutableSpecial(selectedVillage) || GameEngine.Instance.World.isCapital(InterfaceMgr.Instance.OwnSelectedVillage))
                {
                    this.scoutButton_AI.Enabled        = false;
                    this.scoutButton_Resources.Enabled = false;
                }
                else
                {
                    this.scoutButton_AI.Enabled        = true;
                    this.scoutButton_Resources.Enabled = true;
                }
            }
        }