From ebc23f1c6ec9a17a2abd0f6ef535dc54e0f6ad62 Mon Sep 17 00:00:00 2001 From: ABKAM2023 <149762275+ABKAM2023@users.noreply.github.com> Date: Thu, 27 Jun 2024 19:06:00 +0300 Subject: [PATCH] Add files via upload --- Core/[LR] Core.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Core/[LR] Core.cs b/Core/[LR] Core.cs index c2d8a3b..6cc49cb 100644 --- a/Core/[LR] Core.cs +++ b/Core/[LR] Core.cs @@ -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; @@ -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);