From 68c8afb22fde8330df5147db1db868a4720f2646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=82ngelo=20Tadeucci?= Date: Fri, 6 Mar 2026 15:46:15 -0300 Subject: [PATCH] Make WebController ranking methods private Change the visibility of several ranking and mentor-related methods in WebController from public to private to restrict external access and improve encapsulation. Affected methods: Trophy, PersonalTrophy, GuildTrophy, PersonalGuildTrophy, and MenteeList. Co-Authored-By: Claude Opus 4.6 --- Maple2.Server.Web/Controllers/WebController.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Maple2.Server.Web/Controllers/WebController.cs b/Maple2.Server.Web/Controllers/WebController.cs index 84b694b6..444d9939 100644 --- a/Maple2.Server.Web/Controllers/WebController.cs +++ b/Maple2.Server.Web/Controllers/WebController.cs @@ -286,7 +286,7 @@ private static IResult HandleUnknownMode(UgcType mode) { #endregion #region Ranking - public ByteWriter Trophy(string userName) { + private ByteWriter Trophy(string userName) { string cacheKey = $"Trophy_{userName ?? "all"}"; if (!cache.TryGetValue(cacheKey, out byte[]? cachedData)) { @@ -312,7 +312,7 @@ public ByteWriter Trophy(string userName) { return result; } - public ByteWriter PersonalTrophy(long characterId) { + private ByteWriter PersonalTrophy(long characterId) { string cacheKey = $"PersonalTrophy_{characterId}"; if (!cache.TryGetValue(cacheKey, out byte[]? cachedData)) { @@ -328,7 +328,7 @@ public ByteWriter PersonalTrophy(long characterId) { return result; } - public ByteWriter GuildTrophy(string userName) { + private ByteWriter GuildTrophy(string userName) { if (!string.IsNullOrEmpty(userName)) { string cacheKey = $"GuildTrophy_{userName}"; @@ -359,7 +359,7 @@ public ByteWriter GuildTrophy(string userName) { return InGameRankPacket.GuildTrophy(GetCachedGuildTrophyRankings()); } - public ByteWriter PersonalGuildTrophy(long characterId) { + private ByteWriter PersonalGuildTrophy(long characterId) { string cacheKey = $"PersonalGuildTrophy_{characterId}"; if (!cache.TryGetValue(cacheKey, out byte[]? cachedData)) { @@ -397,7 +397,7 @@ private IList GetCachedGuildTrophyRankings() { } #endregion - public ByteWriter MenteeList(long accountId, long characterId) { + private ByteWriter MenteeList(long accountId, long characterId) { using GameStorage.Request db = gameStorage.Context(); IList list = db.GetMentorList(accountId, characterId);