Ejemplo n.º 1
0
        public Experience(GenericReader reader)
        {
            int version = reader.ReadInt();

            XP     = reader.ReadInt();
            Niveau = reader.ReadInt();
            XPMode = reader.ReadBool();
            if (version == 0)
            {
                reader.ReadDateTime();
            }
            NextExp = reader.ReadDateTime();

            Ticks = new bool[7, 9];
            for (int i = 0; i < 7; i++)
            {
                for (int j = 0; j < 9; j++)
                {
                    Ticks[i, j] = reader.ReadBool();
                }
            }

            if (version == 0)
            {
                Cotes = new Cotes();
            }
            else
            {
                Cotes = new Cotes(reader);
            }
        }
Ejemplo n.º 2
0
 public Experience()
 {
     XPMode  = true;
     NextExp = DateTime.Now.AddMinutes(20);
     Ticks   = new bool[7, 9];
     Cotes   = new Cotes();
 }
Ejemplo n.º 3
0
        public Cote(Cotes cotes, GenericReader reader)
        {
            this.cotes = cotes;

            int version = reader.ReadInt();

            xp   = reader.ReadInt();
            cote = (ValeurCote)reader.ReadInt();
        }
Ejemplo n.º 4
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);
            }
        }
Ejemplo n.º 5
0
 public Cote(Cotes cotes, ValeurCote cote)
 {
     this.cotes = cotes;
     this.cote  = cote;
     xp         = ReductionExperience();
 }