Ejemplo n.º 1
0
        public gumpAdminPOMI(Mobile from, POMI cible) : base(0, 0)
        {
            Closable = true;
            Dragable = true;
            int i = 50;
            int j = 0;

            //		POMI Pomicible = (POMI)cible;
            AddPage(0);

            AddBackground(0, 0, 295, 400, 5054);
            AddBackground(15, 15, 265, 370, 3500);
            AddLabel(100, 30, 0, string.Format("VILLES POMI"));
            if (cible.Villes.Count <= 0)
            {
                from.SendMessage("Il n'y a pas de ville sur cette pierre POMI! [Count = " + cible.Villes.Count + " ]");
            }
            else
            {
                foreach (TownStone ville in cible.Villes)
                {
                    AddLabel(30, (10 + i), 0, (j + "- " + ville.Name));
                    i = i + 15;
                    j++;
                }
            }
        }
Ejemplo n.º 2
0
        protected override void OnTarget(Mobile mobile, object targeted)
        {
            PlayerMobile from = (PlayerMobile)mobile;

            if (targeted is POMI)
            {
                POMI cible = (POMI)targeted;
                int  test  = Utility.ToInt32(m_index);

                Console.WriteLine("test = " + test + "      index = " + m_index);
                if ((test >= 0) && (test < (cible.Villes.Count)))
                {
                    //((POMI)targeted).Villes.Remove(test);
                    cible.Villes.RemoveAt(test);
                }
            }
            else
            {
                from.SendMessage("CECI N'EST PAS UNE PIERRE POMI !");
            }
        }