Skip to content

Commit

Permalink
Merge pull request #48 from edgegamers/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
MSWS authored Dec 18, 2024
2 parents 20a6708 + 1f6c629 commit aeb8a25
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/CS2/Commands/Gang/InviteCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ await GangStats.GetForGang<DoorPolicy>(player.GangId.Value,
return CommandResult.ERROR;
}

var capacityPerk = provider.GetService<ICapacityPerk>();
var capacityPerk = Provider.GetService<ICapacityPerk>();
if (capacityPerk != null) {
var gang = await Gangs.GetGang(player.GangId.Value)
?? throw new GangNotFoundException(player.GangId.Value);
Expand Down Expand Up @@ -108,9 +108,7 @@ private async Task<CommandResult> 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;
}
Expand Down Expand Up @@ -163,8 +161,7 @@ private async Task<CommandResult> 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;
}

Expand Down Expand Up @@ -209,8 +206,7 @@ private async Task<CommandResult> 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;
}

Expand Down

0 comments on commit aeb8a25

Please sign in to comment.