示例#1
0
        private void CMBAttackClick(object sender, EventArgs e)
        {
            MessageBox.Show("尚未完成此功能");
            return;
            if (!TravianData.Villages.ContainsKey(SelectVillage))
                return;

            TVillage CV = TravianData.Villages[SelectVillage];
            if (CV.isTroopInitialized != 2)
            {
                CV.InitializeTroop();
                MessageBox.Show("读取军队信息,重新操作一次");
                return;
            }
            TTInfo Troop = CV.Troop.GetTroopsAtHome(CV);
            if (Troop == null)
            {
                MessageBox.Show("目前此村庄中无军队!");
                return;
            }
            AttackOptForm rof = new AttackOptForm()
            {
                mui = this.mui,
                Troops = Troop.Troops,
                dl = this.dl,
                Tribe = Troop.Tribe,
                VillageID = CV.ID,
                UpCall = tr
            };

            if (rof.ShowDialog() == DialogResult.OK && rof.Return != null)
            {
                rof.Return.VillageID = CV.ID;
                rof.Return.UpCall = tr;
                CV.Queue.Add(rof.Return);
                lvi(rof.Return);
            }
        }
示例#2
0
        void CMBAttackClick(object sender, EventArgs e)
        {
            if (!TravianData.Villages.ContainsKey(SelectVillage))
                return;

            TVillage CV = TravianData.Villages[SelectVillage];
            if (CV.isTroopInitialized == 2)
            {
                TTInfo Troop = CV.Troop.GetTroopsAtHome(CV);
                if (Troop == null)
                    return;
                AttackOptForm rof = new AttackOptForm()
                {
                    mui = this.mui,
                    Troops = Troop.Troops,
                    dl = this.dl,
                    Tribe = Troop.Tribe,
                    VillageID = CV.ID,
                    UpCall = tr
                };

                if (rof.ShowDialog() == DialogResult.OK && rof.Return != null)
                {
                    rof.Return.VillageID = CV.ID;
                    rof.Return.UpCall = tr;
                    CV.Queue.Add(rof.Return);
                    lvi(rof.Return);
                }
            }
            else
                CV.InitializeTroop();
        }