public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();
            switch (version)
            {
                case 0:
                    m_Arena = (ArenaControlStone)reader.ReadItem();
                    break;
            }
        }
        //private QuestDifficulty m_Difficulty = QuestDifficulty.Normal;
        //private QuestMobGroup m_MobGroup = QuestMobGroup.Undead;
        //private bool m_IsParty = false;

        public ArenaRegisterGump(Mobile from, ArenaControlStone arena, ArenaFightType qt) //, QuestMobGroup mg, bool isParty)
            : base(200, 50)
        {
            m_FightType = qt;
            m_Arena = arena;
            //m_Difficulty = qd;
            //m_MobGroup = mg;
            //m_IsParty = isParty;

            from.CloseGump(typeof(ArenaRegisterGump));
            // from.CloseGump(typeof(PartyQuestGump));

            string toDisplay = "";
            switch (m_FightType)
            {
                case ArenaFightType.None: toDisplay = @"This is the grand arena of Mistas. Please register your preferred type of trainning."; break;
                case ArenaFightType.SingleFight: toDisplay = @"Test your skill vs a single monster. Right now the opponent is a random one among 5. Leave the arena during combat count as a lose."; break;
                case ArenaFightType.ChallengeGame: toDisplay = @"In the challange game, you will fight through a series of monsters with progression in difficulty. Your final score is based on how far you go along the chain."; break;
                case ArenaFightType.PVP: toDisplay = @"Fighting with another player is on a consensual base. Please target another player to invite him/her for a duel. Once he accepts your challange, you can start your fight inside the arena."; break;
            }


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

            this.AddPage(0);

            this.AddBackground(0, 0, 455, 400, 9380);
            this.AddLabel(168, 57, 0, @"Grand Arena");
            this.AddImage(89, 38, 5578);
            this.AddImage(286, 38, 5578);

            this.AddButton(118, 203, m_FightType == ArenaFightType.SingleFight ? 209 : 208, 209, (int)Buttons.SingleFightButton, GumpButtonType.Reply, 0);
            this.AddButton(118, 260, m_FightType == ArenaFightType.ChallengeGame ? 209 : 208, 209, (int)Buttons.ChallengeGameButton, GumpButtonType.Reply, 0);
            this.AddButton(118, 314, m_FightType == ArenaFightType.PVP ? 209 : 208, 209, (int)Buttons.PVPButton, GumpButtonType.Reply, 0);
            this.AddHtml(36, 111, 381, 64, toDisplay, (bool)true, (bool)true);

            this.AddLabel(154, 202, 0, @"Single Fight");
            this.AddLabel(149, 260, 0, @"Challenge Game");
            this.AddLabel(170, 314, 0, @"PVP");

            this.AddItem(60, 190, 8330);
            this.AddItem(60, 305, 9104);
            this.AddItem(60, 247, 8344);

            this.AddButton(269, 324, 247, 248, (int)Buttons.AcceptButton, GumpButtonType.Reply, 0);
            this.AddButton(346, 324, 241, 242, (int)Buttons.CancelButton, GumpButtonType.Reply, 0);
            this.AddLabel(270, 290, 0, @"Do you wish to accept?");


        }
        public ArenaScoreBoardGump(ArenaControlStone arena)
            : base(55, 65)
        {
            m_Arena = arena;

            Closable = true; Disposable = true; Dragable = true; Resizable = false;
            AddPage(0);
            AddBackground(0, 0, 340, 240, 9200);
            AddLabel(40, 10, 152, "Arena Score Board (Top 5)");

            if (m_Arena == null || m_Arena.Deleted || !m_Arena.Running)
            {
                AddLabel(60, 45, 400, "The Arena is under maintainance.");
                AddButton(280, 210, 2143, 2142, 2, GumpButtonType.Reply, 0);
                return;
            }

            int y = 45;
            AddLabel(60, y, 0, "Player Name");
            AddLabel(190, y, 0, "Score");

            Hashtable top5 = new Hashtable();
            for (int i = 0; i < Math.Min(5, m_Arena.ScoreTable.Count); i++)
            {
                y += 25;
                Mobile player=null;
                int score = -100000;
                foreach (DictionaryEntry de in m_Arena.ScoreTable)
                {
                    Mobile mob = (Mobile)de.Key;
                    if (top5.ContainsKey(mob))
                        continue;
                    if ((int)de.Value > score)
                    {
                        score = (int)de.Value;
                        player = mob;
                    }
                }
                top5.Add(player, score);

                int hue = 0x480;
                if (i == 0) hue = 1161;
                AddLabel(60, y, hue, player.Name);
                AddLabel(190, y, hue, score.ToString());
            }

            AddButton(280, 210, 2143, 2142, 2, GumpButtonType.Reply, 0);
        }
Пример #4
0
 public ManageTimer(ArenaControlStone arena)
     : base(TimeSpan.FromSeconds(ArenaMangementIntervalInSec), TimeSpan.FromSeconds(ArenaMangementIntervalInSec))
 {
     m_Arena = arena;
 }
Пример #5
0
 public ManageTimer(ArenaControlStone arena)
     : base(TimeSpan.FromSeconds(ArenaMangementIntervalInSec), TimeSpan.FromSeconds(ArenaMangementIntervalInSec))
 {
     m_Arena = arena;
 }