Skip to content
This repository has been archived by the owner on Mar 6, 2022. It is now read-only.

Commit

Permalink
xp being added for no reason
Browse files Browse the repository at this point in the history
  • Loading branch information
BruteForceMaestro committed Jan 11, 2022
1 parent d842bde commit 1a8a0cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions EventHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ public void OnEscape(EscapingEventArgs ev)



public void OnRoundEnd(EndingRoundEventArgs ev)
public void OnRoundEnd(RoundEndedEventArgs ev)
{
foreach (Player player in Player.List)
{
if (player.LeadingTeam == ev.LeadingTeam && ev.IsAllowed && !Round.IsLocked)
if (player.LeadingTeam == ev.LeadingTeam && player.Role != RoleType.Spectator)
{
API.AddXP(player, Main.Instance.Config.TeamWinXP);
}
Expand Down
4 changes: 2 additions & 2 deletions Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public override void OnEnabled()
handlers = new();
Player.Verified += handlers.OnJoined;
Player.Dying += handlers.OnKill;
Server.EndingRound += handlers.OnRoundEnd;
Server.RoundEnded += handlers.OnRoundEnd;
Player.Escaping += handlers.OnEscape;
Instance = this;
GetOrCreateJson();
Expand All @@ -40,7 +40,7 @@ public override void OnDisabled()
handlers = null;
Player.Verified -= handlers.OnJoined;
Player.Dying -= handlers.OnKill;
Server.EndingRound -= handlers.OnRoundEnd;
Server.RoundEnded -= handlers.OnRoundEnd;
Player.Escaping -= handlers.OnEscape;
base.OnDisabled();
}
Expand Down

0 comments on commit 1a8a0cd

Please sign in to comment.