Ejemplo n.º 1
0
        public static void On_Logout(LogoutEventArgs args)
        {
            PlayerMobile pm = (PlayerMobile)args.Mobile;

            for (int i = 0; i < Registry.Count; ++i)
            {
                RVS d = (RVS)Registry[i];

                if (d.Caller == pm)
                {
                    Registry.Remove(d);
                    d.EndSelf();
                }
                else if (d.InRVS(pm))
                {
                    if (!d.InProgress)
                    {
                        d.RefundBuyIn(pm);
                        d.SendControllerSetup();
                    }
                    else
                    {
                        d.EchoMessage("A player disconnected, duel must end.");
                        d.EndSelf();
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;

            switch (info.ButtonID)
            {
            case 0:     // Close
            {
                PlayerMobile pm = (PlayerMobile)Handeling.Teams[TeamID].Players[Index];
                Handeling.Teams[TeamID].Players[Index] = "@null";
                Handeling.Teams[TeamID].Accepted.Remove(pm);
                Handeling.EchoMessage(String.Format("{0} has declined the duel, and has been removed.", pm.Name));
                Handeling.RefundBuyIn(pm);

                Handeling.SendControllerSetup();
                break;
            }

            case 1:     //Monsters, Used to be Spells
            {
                from.SendGump(new RVSSetup_Rules_Monsters_View(Handeling, TeamID, Index));
                //from.SendGump(new RVSSetup_Rules_Spells_View(Handeling, TeamID, Index));
                break;
            }

            case 2:     // Combat Abilities
            {
                from.SendGump(new RVSSetup_Rules_Combat_View(Handeling, TeamID, Index));
                break;
            }

            case 3:     // Skills
            {
                from.SendGump(new RVSSetup_Rules_Skills_View(Handeling, TeamID, Index));
                break;
            }

            case 4:      // Weapons
            {
                from.SendGump(new RVSSetup_Rules_Weapons_View(Handeling, TeamID, Index));
                break;
            }

            case 5:     // Armor
            {
                from.SendGump(new RVSSetup_Rules_Armor_View(Handeling, TeamID, Index));
                break;
            }

            case 6:     // Items
            {
                from.SendGump(new RVSSetup_Rules_Items_View(Handeling, TeamID, Index));
                break;
            }

            case 7:     // Samurai
            {
                from.SendGump(new RVSSetup_Rules_Samurai_View(Handeling, TeamID, Index));
                break;
            }

            case 8:     // Chivalry
            {
                from.SendGump(new RVSSetup_Rules_Chivalry_View(Handeling, TeamID, Index));
                break;
            }

            case 9:     // Necromancy
            {
                from.SendGump(new RVSSetup_Rules_Necromancy_View(Handeling, TeamID, Index));
                break;
            }

            case 10:     // Ninjitsu
            {
                from.SendGump(new RVSSetup_Rules_Ninjitsu_View(Handeling, TeamID, Index));
                break;
            }

            case 11:     //Accepted
            {
                PlayerMobile pm = (PlayerMobile)Handeling.Teams[TeamID].Players[Index];
                Handeling.Teams[TeamID].Accepted[pm] = true;
                Handeling.UpdateAllPending();
                Handeling.EchoMessage(String.Format("{0} has accepted the duel.", pm.Name));
                break;
            }
            }

            if (info.ButtonID > 11)
            {
                int teamid2 = (info.ButtonID - 11);
                from.SendGump(new RVSSetup_ViewParticipants(Handeling, TeamID, Index, teamid2));
            }
        }