Skip to content

Commit e097049

Browse files
committed
Release v1.0.39
1 parent 5803cd2 commit e097049

File tree

7 files changed

+20
-28
lines changed

7 files changed

+20
-28
lines changed

CHANGELOG

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 2025.02.26 - 1.0.39
2+
3+
- fix: Bans module connect full issue
4+
- fix: Wrong scoreboard rank with 0 points when a rank is set to a 0 point boundry
5+
16
# 2025.02.24 - 1.0.38
27

38
- feat: Enhanced rank point commands to support offline targeting via SteamID

modules/ranks/K4-Zenith-Ranks.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public sealed partial class Plugin : BasePlugin
2121

2222
public override string ModuleName => $"K4-Zenith | {MODULE_ID}";
2323
public override string ModuleAuthor => "K4ryuu @ KitsuneLab";
24-
public override string ModuleVersion => "1.0.17";
24+
public override string ModuleVersion => "1.0.18";
2525

2626
private PlayerCapability<IPlayerServices>? _playerServicesCapability;
2727
private PluginCapability<IModuleServices>? _moduleServicesCapability;

modules/ranks/Stocks.cs

+2-4
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,10 @@ private void UpdateScoreboards()
180180

181181
foreach (var player in GetValidPlayers())
182182
{
183-
long currentPoints = player.GetStorage<long>("Points");
184-
if (currentPoints <= 0)
185-
continue;
183+
long currentPoints = Math.Max(1, player.GetStorage<long>("Points"));
186184

187185
var playerData = GetOrUpdatePlayerRankInfo(player);
188-
SetCompetitiveRank(player, mode, playerData.Rank?.Id ?? 0, player.GetStorage<long>("Points"), rankMax, rankBase, rankMargin);
186+
SetCompetitiveRank(player, mode, playerData.Rank?.Id ?? 0, currentPoints, rankMax, rankBase, rankMargin);
189187
}
190188
}
191189

modules/zenith-bans/K4-Zenith-Bans.cs

+1-22
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public sealed partial class Plugin : BasePlugin
1818

1919
public override string ModuleName => $"K4-Zenith | {MODULE_ID}";
2020
public override string ModuleAuthor => "K4ryuu @ KitsuneLab";
21-
public override string ModuleVersion => "1.1.10";
21+
public override string ModuleVersion => "1.1.11";
2222

2323
private PlayerCapability<IPlayerServices>? _playerServicesCapability;
2424
private PluginCapability<IModuleServices>? _moduleServicesCapability;
@@ -127,7 +127,6 @@ public override void OnAllPluginsLoaded(bool hotReload)
127127
{
128128
_zenithEvents.OnZenithCoreUnload += OnZenithCoreUnload;
129129
_zenithEvents.OnZenithChatMessage += OnZenithChatMessage;
130-
_zenithEvents.OnZenithPlayerLoaded += OnZenithPlayerLoaded;
131130
}
132131
else
133132
{
@@ -178,26 +177,6 @@ public override void OnAllPluginsLoaded(bool hotReload)
178177
Logger.LogInformation("Zenith {0} module successfully registered.", MODULE_ID);
179178
}
180179

181-
private void OnZenithPlayerLoaded(CCSPlayerController player)
182-
{
183-
var zenithPlayer = GetZenithPlayer(player);
184-
if (zenithPlayer == null)
185-
return;
186-
187-
var playerData = _playerCache[zenithPlayer.SteamID];
188-
189-
IPlayerServices? playerServices = GetZenithPlayer(player);
190-
if (playerData.Punishments.Any(p => p.Type == PunishmentType.Mute && p.ExpiresAt.HasValue && p.ExpiresAt.Value.GetDateTime() > DateTime.Now))
191-
playerServices?.SetMute(true, ActionPriority.High);
192-
193-
if (playerData.Punishments.Any(p => p.Type == PunishmentType.Gag && p.ExpiresAt.HasValue && p.ExpiresAt.Value.GetDateTime() > DateTime.Now))
194-
playerServices?.SetGag(true, ActionPriority.High);
195-
196-
_playerCache[zenithPlayer.SteamID] = playerData;
197-
_disconnectedPlayers.RemoveAll(p => p.SteamId == zenithPlayer.SteamID);
198-
199-
}
200-
201180
private void OnZenithCoreUnload(bool hotReload)
202181
{
203182
if (hotReload)

modules/zenith-bans/Stocks.cs

+10
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,16 @@ public void ProcessPlayerData(CCSPlayerController player, bool connect)
940940
{
941941
AdminManager.SetPlayerCommandOverride(player, customOverride.Key, customOverride.Value);
942942
}
943+
944+
IPlayerServices? playerServices = GetZenithPlayer(player);
945+
if (playerData.Punishments.Any(p => p.Type == PunishmentType.Mute && p.ExpiresAt.HasValue && p.ExpiresAt.Value.GetDateTime() > DateTime.Now))
946+
playerServices?.SetMute(true, ActionPriority.High);
947+
948+
if (playerData.Punishments.Any(p => p.Type == PunishmentType.Gag && p.ExpiresAt.HasValue && p.ExpiresAt.Value.GetDateTime() > DateTime.Now))
949+
playerServices?.SetGag(true, ActionPriority.High);
950+
951+
_playerCache[steamId] = playerData;
952+
_disconnectedPlayers.RemoveAll(p => p.SteamId == steamId);
943953
});
944954
});
945955
}

src/Core/Manifest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ public sealed partial class Plugin : BasePlugin
1010

1111
public override string ModuleAuthor => "K4ryuu @ KitsuneLab";
1212

13-
public override string ModuleVersion => "1.0.38";
13+
public override string ModuleVersion => "1.0.39";
1414
}
1515
}

0 commit comments

Comments
 (0)