Ejemplo n.º 1
0
 public static void InitializePool()
 {
     for (int i = 0; i < Config.DeadPlayerCacheSize; i++)
     {
         CachedClasses[i] = new VictimOf049();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Save a player killed by SCP 049.
        /// </summary>
        private void Player_Died(Exiled.Events.EventArgs.DiedEventArgs ev)
        {
            var killer = ev.Killer;

            if (killer.Role != RoleType.Scp049)
            {
                return;
            }

            var player = ev.Target;

            _infectedPlayers.Add((byte)player.Id, VictimOf049.SetNewVictim(player, killer, this));
        }
Ejemplo n.º 3
0
        public static VictimOf049 SetNewVictim(Player player, Player killer, AssistInfection plugin)
        {
            for (int i = 0; i < Config.DeadPlayerCacheSize; i++)
            {
                var c = CachedClasses[i];

                if (c.Coroutine.IsRunning)
                {
                    continue;
                }

                c.Initialize(player, killer, plugin);
                return(c);
            }

            var createNew = new VictimOf049();

            createNew.Initialize(player, killer, plugin);
            return(createNew);
        }
Ejemplo n.º 4
0
 public AssistInfection()
 {
     VictimOf049.InitializePool();
 }
Ejemplo n.º 5
0
 private void Server_RoundEnded(Exiled.Events.EventArgs.RoundEndedEventArgs ev)
 {
     VictimOf049.Reset();
     _infectedPlayers.Clear();
 }