From 954aa41f3bb9210a58ceaa3b397134a1c44c2df5 Mon Sep 17 00:00:00 2001 From: MSWS Date: Tue, 17 Dec 2024 21:56:27 -0800 Subject: [PATCH] Fix compiler warning --- src/CS2/Commands/Gang/InviteCommand.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/CS2/Commands/Gang/InviteCommand.cs b/src/CS2/Commands/Gang/InviteCommand.cs index dfd67ea..fa4189f 100644 --- a/src/CS2/Commands/Gang/InviteCommand.cs +++ b/src/CS2/Commands/Gang/InviteCommand.cs @@ -50,7 +50,7 @@ await GangStats.GetForGang(player.GangId.Value, return CommandResult.ERROR; } - var capacityPerk = provider.GetService(); + var capacityPerk = Provider.GetService(); if (capacityPerk != null) { var gang = await Gangs.GetGang(player.GangId.Value) ?? throw new GangNotFoundException(player.GangId.Value); @@ -108,9 +108,7 @@ private async Task handleCancelInvite(CommandInfoWrapper info, Debug.Assert(player.GangId != null, "player.GangId != null"); await GangStats.SetForGang(player.GangId.Value, gangInviteId, invites); info.ReplySync(Locale.Get(MSG.COMMAND_INVITE_CANCELED, query)); - } else { - info.ReplySync(Locale.Get(MSG.COMMAND_INVITE_NOTFOUND, query)); - } + } else { info.ReplySync(Locale.Get(MSG.COMMAND_INVITE_NOTFOUND, query)); } return steamId; } @@ -163,8 +161,7 @@ private async Task handleInvite(PlayerWrapper executor, if (info.ArgCount != 2) return CommandResult.PRINT_USAGE; if (invites.GetEntries().Count >= invites.MaxAmo) { - info.ReplySync(Locale.Get(MSG.COMMAND_INVITE_MAXINVITES, - invites.MaxAmo)); + info.ReplySync(Locale.Get(MSG.COMMAND_INVITE_MAXINVITES, invites.MaxAmo)); return CommandResult.ERROR; } @@ -209,8 +206,7 @@ private async Task processInvite(PlayerWrapper executor, Debug.Assert(player.GangId != null, "player.GangId != null"); var gangName = (await Gangs.GetGang(player.GangId.Value))?.Name; if (gangName == null) { - info.ReplySync(Locale.Get(MSG.GENERIC_ERROR_INFO, - "Gang name not found")); + info.ReplySync(Locale.Get(MSG.GENERIC_ERROR_INFO, "Gang name not found")); return CommandResult.ERROR; }