Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ABKAM2023 authored Jun 27, 2024
1 parent 922e6d4 commit ebc23f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Core/[LR] Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ public string GetColorFromLocalizer(string colorKey)
public void ApplyExperienceUpdateSync(User user, CCSPlayerController player, int expChange, string eventDescription,
string colorKey)
{
if (expChange == 0) return;
if ((BlockExpDuringWarmup && IsWarmupPeriod()) || (!GiveExpOnRoundEnd && IsRoundEnded)) return;


Expand Down Expand Up @@ -303,9 +304,11 @@ public void ApplyExperienceUpdateSync(User user, CCSPlayerController player, int
public void ApplyExperienceUpdateSyncWithoutLimits(User user, CCSPlayerController player, int expChange,
string eventDescription, char color)
{
if (expChange == 0) return;

var newExp = user.Value += expChange;
if (newExp < 0) user.Value = newExp = 0;

_userUpdateQueue.Enqueue(user);

CheckAndUpdateRank(user);
Expand Down

0 comments on commit ebc23f1

Please sign in to comment.