Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EndingRoundEventArgs"/> class.
 /// </summary>
 /// <param name="classList"><inheritdoc cref="RoundSummary.SumInfo_ClassList"/></param>
 /// <param name="leadingTeam"><inheritdoc cref="LeadingTeam"/></param>
 /// <param name="isRoundEnded"><inheritdoc cref="IsRoundEnded"/></param>
 /// <param name="isAllowed"><inheritdoc cref="IsAllowed"/></param>
 public EndingRoundEventArgs(LeadingTeam leadingTeam, RoundSummary.SumInfo_ClassList classList, bool isRoundEnded, bool isAllowed = true)
 {
     ClassList    = classList;
     LeadingTeam  = leadingTeam;
     IsRoundEnded = isRoundEnded;
     IsAllowed    = isAllowed;
 }
Exemplo n.º 2
0
        private static void EndGame(EndingRoundEventArgs ev, LeadingTeam leadingTeam)
        {
            ev.LeadingTeam  = leadingTeam;
            ev.IsAllowed    = true;
            ev.IsRoundEnded = true;

            // Force end because people bothered me to put this in
            Round.ForceEnd();

            API.BlacklistedPlayers.Clear();
            API.ModifiedRoles.Clear();

            Log.Debug($"Force ending with {ev.LeadingTeam} as the lead team.", Config.AllowDebug);

            if (Config.RoundEndFf)
            {
                foreach (var player in Player.List)
                {
                    player.IsFriendlyFireEnabled = true;
                }
            }
        }
Exemplo n.º 3
0
        public void RpcShowRoundSummary(RoundSummary.SumInfo_ClassList list_start, RoundSummary.SumInfo_ClassList list_finish, LeadingTeam leadingTeam, int e_ds, int e_sc, int scp_kills, int round_cd)
        {
            RespawnManagerCrap.blockRespawns = false;
            TimeSpan tspan = TimeSpan.FromSeconds(list_finish.time - list_start.time);

            Base.roundStartTime = null;

            try
            {
                Base.Debug("Triggering RoundEndEvent");
                PluginManager.TriggerEvent <IEventHandlerRoundEnd>(new RoundEndEvent(list_start, list_finish, leadingTeam, e_ds, e_sc, scp_kills, round_cd, string.Format("{0} minutes and {1} seconds", (int)tspan.TotalMinutes, tspan.Seconds)));
            }
            catch (Exception e)
            {
                Base.Error($"Error triggering RoundEndEvent: {e.InnerException}");
            }

            if (FFDetector.FFDetector.DetectorEnabled)
            {
                FFDetector.FFDetector.FFPlayers.Clear();
                FFDetector.FFDetector.GrenadeThrowers.Clear();
                FFDetector.FFDetector.DoCheck = false;
            }

            orig_RpcShowRoundSummary(list_start, list_finish, leadingTeam, e_ds, e_sc, scp_kills, round_cd);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RoundEndedEventArgs"/> class.
 /// </summary>
 /// <param name="leadingTeam"><inheritdoc cref="LeadingTeam"/></param>
 /// <param name="classList"><inheritdoc cref="ClassList"/></param>
 /// <param name="timeToRestart"><inheritdoc cref="TimeToRestart"/></param>
 public RoundEndedEventArgs(LeadingTeam leadingTeam, RoundSummary.SumInfo_ClassList classList, int timeToRestart)
 {
     LeadingTeam   = leadingTeam;
     ClassList     = classList;
     TimeToRestart = timeToRestart;
 }
Exemplo n.º 5
0
 public extern void orig_RpcShowRoundSummary(RoundSummary.SumInfo_ClassList list_start, RoundSummary.SumInfo_ClassList list_finish, LeadingTeam leadingTeam, int e_ds, int e_sc, int scp_kills, int round_cd);