public DuelStarterGump(DuelRune rune)
            : base(rune)
        {
            AddBack2v2();
            AddType();
            AddOptions();

            for (int i = 0; i < 3; i++)
            {
                string str = "";

                switch (i)
                {
                    case 0: str = "Opponent 1:"; break;
                    case 1: str = "Opponent 2:"; break;
                    case 2: str = "Ally:"; break;
                }
                AddLabel(20, 440 + i * 20, 1152, str);
                AddLabel(120, 440 + i * 20, 1152, GetName(m_Rune.Participants[i + 1]));
                AcceptButt(325, 440 + i * 20, m_Rune.Accepted[i]);
            }

            //AddLabel(20, 440, 1152, "Opponent 1:");
            //AddLabel(120, 440, 1152, GetName(m_Opp1));
            //AcceptButt(325, 440, m_Acc1);
            //AddLabel(20, 460, 1152, "Opponent 2:");
            //AddLabel(120, 460, 1152, GetName(m_Opp2));
            //AcceptButt(325, 460, m_Acc2);
            //AddLabel(20, 480, 1152, "Ally:");
            //AddLabel(120, 480, 1152, GetName(m_Ally));
            //AcceptButt(325, 480, m_AccA);
            AddLabel(20, 500, 1152, "You:");
            AddLabel(120, 500, 1152,m_Rune.Starter.Name);
            AddImage(325, 500, 211);

            AddButton(350, 440, 4014, 4015, 11, GumpButtonType.Reply, 0);
            AddButton(350, 460, 4014, 4015, 12, GumpButtonType.Reply, 0);
            AddButton(350, 480, 4014, 4015, 13, GumpButtonType.Reply, 0);
            AddImage(350, 500, 4014);

            if (Array.TrueForAll(m_Rune.Accepted, IsTrue))
                AddAccept();

            SendGumps();
        }
Пример #2
0
        public void Imput(DuelRune rune)
        {
            m_Running = true;
            Hidden = true;

            NoSummons = rune.Options[0];
            NoArea = rune.Options[1];
            NoMounts = rune.Options[2];
            NoPots = rune.Options[3];
            m_NoArts = rune.Options[4];
            m_NoMagArmor = rune.Options[5];
            m_NoMagWeps = rune.Options[6];
            m_NoPoisWeps = rune.Options[7];
            SpellWatch = rune.Options[8];

            Participants = rune.Participants;
            DuelType = rune.DType;

            MoveParticipants();
        }
        public DuelAcceptGump(DuelRune rune, DuelAcceptTimer timer)
            : base(rune)
        {
            m_Rune = rune;
            Active = (DateTime.Now + TimeSpan.FromMinutes(1.0));
            AddType();
            AddOptions();
            AddBackOpponent();
            AddAccept();
            m_Timer = timer;

            int score = DuelScoreSystem.GetScore(m_Rune.Starter, m_Rune.DType.TypeNumber);
            int place = DuelScoreSystem.GetRank(m_Rune.Starter, m_Rune.DType.TypeNumber);

            string rank = "N/A";
            if (place != 0)
                rank = place.ToString();

            string points = "N/A";
            if (score > -99)
                points = score.ToString();

            List<string> arr = new List<string>();

            arr.Add("Name:"); arr.Add(m_Rune.Starter.Name); arr.Add("Raw Strength:"); arr.Add(m_Rune.Starter.RawStr.ToString());
            arr.Add("Points:"); arr.Add(points); arr.Add("Raw Dexterty:"); arr.Add(m_Rune.Starter.RawDex.ToString());
            arr.Add("Rank:"); arr.Add(rank); arr.Add("Raw Intelligence:"); arr.Add(m_Rune.Starter.RawInt.ToString());

            AddTable(20, 430, new int[] { 48, 135, 135, 56 }, arr, new string[] { "ffffff", "ffffff", "ffffff", "ffffff", });
        }
 public BaseDuelDataGump(DuelRune rune)
     : base()
 {
     m_Rune = rune;
 }
        public Duel2v2Gump(DuelRune rune, int partnr)
            : base(rune)
        {
            m_PartNr = partnr;

            AddBack2v2();
            AddType();
            AddOptions();

            string you = "";
            string opp1 = "";
            string opp2 = "";
            string ally = "";

            switch (m_PartNr)
            {
                case 1:
                    you = GetName(m_Rune.Participants[1]);
                    opp1 = m_Rune.Starter.Name;
                    opp2 = GetName(m_Rune.Participants[3]);
                    ally = GetName(m_Rune.Participants[2]);

                    AcceptButt(325, 440, m_Rune.Accepted[0]);//you
                    AcceptButt(325, 460, m_Rune.Accepted[1]);//all
                    AddImage(325, 480, 211);//opp1
                    AcceptButt(325, 500, m_Rune.Accepted[2]);//opp2

                    if (!m_Rune.Accepted[0])
                        AddAccept();
                    break;

                case 2:
                    you = GetName(m_Rune.Participants[2]);
                    opp1 = m_Rune.Starter.Name;
                    opp2 = GetName(m_Rune.Participants[3]);
                    ally = GetName(m_Rune.Participants[1]);

                    AcceptButt(325, 440, m_Rune.Accepted[1]);//you
                    AcceptButt(325, 460, m_Rune.Accepted[0]);//all
                    AddImage(325, 480, 211);//opp1
                    AcceptButt(325, 500, m_Rune.Accepted[2]);//opp2

                    if (!m_Rune.Accepted[1])
                        AddAccept();
                    break;

                case 3:
                    you = GetName(m_Rune.Participants[3]);
                    ally = m_Rune.Starter.Name;
                    opp1 = GetName(m_Rune.Participants[1]);
                    opp2 = GetName(m_Rune.Participants[2]);

                    AcceptButt(325, 440, m_Rune.Accepted[2]);//you
                    AddImage(325, 460, 211);//all
                    AcceptButt(325, 480, m_Rune.Accepted[0]);//opp1
                    AcceptButt(325, 500, m_Rune.Accepted[1]);//opp2

                    if (!m_Rune.Accepted[2])
                        AddAccept();
                    break;
            }

            AddLabel(20, 440, 1152, "You:"); AddLabel(120, 440, 1152, you);
            AddLabel(20, 460, 1152, "Ally:"); AddLabel(120, 460, 1152, ally);
            AddLabel(20, 480, 1152, "Opponent 1:"); AddLabel(120, 480, 1152, opp1);
            AddLabel(20, 500, 1152, "Opponent 2:"); AddLabel(120, 500, 1152, opp2);
        }
 public DuelTarget(DuelRune rune, int partnr)
     : base(30, false, TargetFlags.None)
 {
     m_Rune = rune;
     m_Partnr = partnr;
     CheckLOS = false;
 }
 public DuelTarget(DuelRune rune)
     : this(rune, 0)
 {
 }
        public DuelStartGump(DuelRune rune)
            : base(rune)
        {
            m_Rune = rune;

            AddAccept();
            AddType();
            AddBackOptions();

            for (int k = 0; k < 5; k++)
            {
                CustomAdd(20, 25 * k + 245, k); AddLabel(55, 25 * k + 245, 1152, GetOption(k));
            }

            for (int k = 0; k < 4; k++)
            {
                CustomAdd(200, 25 * k + 245, k + 5); AddLabel(235, 25 * k + 245, 1152, GetOption(k + 5));
            }
        }
        public DuelStartGump(Mobile starter, Dueller npc)
            : base(null)
        {
            m_Rune = new DuelRune(starter, npc);

            AddAccept();
            AddBackType();

            for (int i = 0; i < 4; i++)
            {
                AddRadio(20, 30 * i + 50, 2151, 2154, false, i); AddLabel(55, 30 * i + 55, 1152, GetType(i));
                AddRadio(200, 30 * i + 50, 2151, 2154, false, i + 4); AddLabel(235, 30 * i + 55, 1152, GetType(i + 4));
            }
        }