Esempio n. 1
0
        public static PVPTeamArrangement Deserialize(GenericReader reader, PVPEvent pvpevent)
        {
            int val = reader.ReadInt();
            PVPTeamArrangement teamArrangement = null;

            if (val != -1)
            {
                teamArrangement = (PVPTeamArrangement)Activator.CreateInstance(TeamArrangementList.Keys.ElementAt(val), pvpevent);

                int TeamsCount = reader.ReadInt();
                for (int i = 0; i < TeamsCount; ++i)
                {
                    teamArrangement.AjouterEquipe();

                    int JoueursCount = reader.ReadInt();
                    for (int j = 0; j < JoueursCount; ++j)
                    {
                        ScriptMobile mob = (ScriptMobile)reader.ReadMobile();

                        teamArrangement[i].Add(mob);
                        mob.PVPInfo = new PVPInfo(pvpevent, teamArrangement[i]);
                    }
                }
            }

            return(teamArrangement);
        }
Esempio n. 2
0
        public static PVPMode Deserialize(GenericReader reader, PVPEvent pvpevent)
        {
            int val = reader.ReadInt();

            if (val != -1)
            {
                return((PVPMode)Activator.CreateInstance(ModeList.Keys.ElementAt(val), pvpevent));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 3
0
        public PVPInfo(PVPEvent CurrentEvent, ScriptMobile Player)
        {
            m_IsDespawned = false;
            m_CurrentEvent = CurrentEvent;

            foreach (PVPTeam team in m_CurrentEvent.teams)
            {
                if (team.Contains(Player))
                {
                    m_CurrentTeam = team;
                    break;
                }
            }
        }
Esempio n. 4
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            rect = reader.ReadRect3D();

            int count = reader.ReadInt();

            for (int i = 0; i < count; ++i)
            {
                PVPEvent pvpevent = PVPEvent.CreateEvent(null, this);
                pvpevent.Deserialize(reader);
            }
        }
Esempio n. 5
0
        public static PVPEvent CreateEvent(Mobile maker, PVPStone stone)
        {
            PVPEvent pvpevent = new PVPEvent(maker, stone);

            if (maker != null)
            {
                foreach (PVPEvent _event in PVPEvent.m_InstancesList)
                {
                    if (maker == _event.m_maker && _event != pvpevent)
                    {
                        maker.SendMessage("Vous ne pouvez pas créer un autre event, étant donné que vous avez déjà créé " + _event.nom);
                        pvpevent.StopEvent();
                        return(pvpevent = null);
                    }
                }
            }

            return(pvpevent);
        }
Esempio n. 6
0
            public PreparationTimer(PVPEvent pvpevent) :
                base(TimeSpan.Zero, TimeSpan.FromSeconds(1))
            {
                m_pvpevent = pvpevent;
                m_toCheck  = new List <ScriptMobile>();
                m_EndTime  = DateTime.Now + tempsAttente;

                m_pvpevent.state = PVPEventState.Preparing;

                foreach (PVPTeam team in m_pvpevent.teams)
                {
                    foreach (ScriptMobile joueur in team)
                    {
                        m_toCheck.Add(joueur);
                    }
                }

                // Send Gump le gump de choix.
                foreach (ScriptMobile mob in m_toCheck)
                {
                    mob.SendGump(new PVPGumpPreparation(mob, m_pvpevent, m_toCheck));
                }
            }
Esempio n. 7
0
 public PVPMode(PVPEvent pvpevent)
 {
     m_pvpevent     = pvpevent;
     m_timeoutTimer = new TimeoutTimer(this);
 }
Esempio n. 8
0
 public PVPInfo(PVPEvent CurrentEvent, PVPTeam CurrentTeam)
 {
     m_IsDespawned = false;
     m_CurrentEvent = CurrentEvent;
     m_CurrentTeam = CurrentTeam;
 }
Esempio n. 9
0
 public PVPTeamArrangement(PVPEvent pvpevent)
 {
     m_pvpevent = pvpevent;
     m_teams    = new List <PVPTeam>();
 }
Esempio n. 10
0
 public KillCount(PVPEvent pvpevent)
     : base(pvpevent)
 {
     killcount = new List <int>();
 }
Esempio n. 11
0
 public Teams(PVPEvent pvpevent)
     : base(pvpevent)
 {
 }
Esempio n. 12
0
 public YOLO(PVPEvent pvpevent)
     : base(pvpevent)
 {
     NbPlayersAlive = new List <int>();
 }
Esempio n. 13
0
 public WaitingTimer(PVPEvent pvpevent)
     : base(TimeSpan.Zero, TimeSpan.FromSeconds(3))
 {
     m_pvpevent = pvpevent;
 }
Esempio n. 14
0
 public Tickets(PVPEvent pvpevent)
     : base(pvpevent)
 {
     tickets = new List <int>();
 }
Esempio n. 15
0
 public CaptureTheFlag(PVPEvent pvpevent)
     : base(pvpevent)
 {
 }
Esempio n. 16
0
 public FFA(PVPEvent pvpevent)
     : base(pvpevent)
 {
 }