Exemple #1
0
        public CotesGump(PlayerMobile pm, int page) : base(50, 50)
        {
            this.page = page;
            mobile    = pm;

            Closable   = true;
            Disposable = true;
            Dragable   = true;
            Resizable  = false;

            AddPage(0);
            AddBackground(31, 48, 616, 462, 9250);
            AddBackground(39, 56, 600, 447, 3500);
            AddLabel(244, 78, 1301, @"Historique de cotes de " + pm.Name);
            AddButton(545, 460, 4005, 4006, 1, GumpButtonType.Reply, 0);
            AddLabel(405, 461, 1301, @"Ajouter cote/fiole");

            Cotes cotes = pm.Experience.Cotes;

            if (cotes.LastCotation.AddDays(1) < DateTime.Now)
            {
                AddLabel(65, 431, 1301, String.Format("Dernière cote: {0}", cotes.LastCotation));
            }
            else
            {
                AddLabel(65, 431, 1201, String.Format("Dernière cote: {0}", cotes.LastCotation));
            }
            AddLabel(365, 431, 1301, String.Format("Dernière fiole: {0}", cotes.LastFiole));

            int basey = 110;

            for (int i = 0; i < cotes.Count; i++)
            {
                if (i >= (page + 1) * 10)
                {
                    break;
                }
                if (i < page * 10)
                {
                    continue;
                }
                RaisonCote cote = cotes[i];
                AddLabel(60, basey + (i % 10) * 30, 1301, cote.Auteur.Account.Username);
                AddLabel(150, basey + (i % 10) * 30, 1301, cote.Timestamp.ToString());
                AddLabel(350, basey + (i % 10) * 30, 1301, cote.GMMessage);
            }
            if (page + 1 < cotes.Count / 10)
            {
                AddButton(602, 411, 5601, 5605, 2, GumpButtonType.Reply, 0);
            }
            if (page > 0)
            {
                AddButton(61, 410, 5603, 5607, 3, GumpButtonType.Reply, 0);
            }
        }
Exemple #2
0
        public AjouterCoteGump(PlayerMobile pm, int page) : base(50, 50)
        {
            mobile = pm;

            Closable   = true;
            Disposable = true;
            Dragable   = true;
            Resizable  = false;

            AddPage(0);
            AddBackground(31, 48, 416, 432, 9250);
            AddBackground(39, 56, 400, 417, 3500);
            AddLabel(114, 78, 1301, @"Donner une cote ou fiole à " + pm.Name);

            int y = 110;

            AddLabel(60, y, 1301, RaisonCote.GetGMMessage(0));
            AddButton(383, y - 1, 4005, 4006, 1, GumpButtonType.Reply, 0);
            y += 30;

            for (int i = 100; i < RaisonCote.LimiteMaximale(ValeurCote.Passable) + 1; i++)
            {
                //if (i >= (page + 1) * 10)
                //    break;
                //if (i < page * 10)
                //    continue;
                AddLabel(60, y, 1301, RaisonCote.GetGMMessage(i));
                AddLabel(290, y, 1301, "(Passable)");
                AddButton(383, y, 4005, 4006, i, GumpButtonType.Reply, 0);

                y += 30;
            }

            for (int i = 200; i < RaisonCote.LimiteMaximale(ValeurCote.Questionnable) + 1; i++)
            {
                AddLabel(60, y, 1301, RaisonCote.GetGMMessage(i));
                AddLabel(290, y, 1301, "(Questionnable)");
                AddButton(383, y, 4005, 4006, i, GumpButtonType.Reply, 0);

                y += 30;
            }

            for (int i = 300; i < RaisonCote.LimiteMaximale(ValeurCote.Interdit) + 1; i++)
            {
                AddLabel(60, y, 1301, RaisonCote.GetGMMessage(i));
                AddLabel(290, y, 1301, "(Interdit)");
                AddButton(383, y, 4005, 4006, i, GumpButtonType.Reply, 0);

                y += 30;
            }
        }