NEO-149: fix analyzer warnings in encounter wiring
RCS1123 parentheses in quest wiring test, CA1873 guarded LogDebug, CA1859 List parameter for CompensatingRemoveGrants.pull/190/head
parent
68ba26724b
commit
6f735f8643
|
|
@ -45,7 +45,7 @@ public sealed class QuestObjectiveWiringTests
|
|||
Assert.True(deps.ProgressStore.TryGetProgress(PlayerId, GatherQuestId, out var progress));
|
||||
Assert.Equal(QuestProgressStatus.Completed, progress.Status);
|
||||
Assert.Equal(
|
||||
3 * GatherSkillXpConstants.ActivityXpPerResourceNodeGather + 25,
|
||||
(3 * GatherSkillXpConstants.ActivityXpPerResourceNodeGather) + 25,
|
||||
deps.XpStore.GetXpTotals(PlayerId).GetValueOrDefault("salvage"));
|
||||
Assert.True(deps.DeliveryStore.TryGet(PlayerId, GatherQuestId, out var deliveryEvent));
|
||||
Assert.Single(deliveryEvent.GrantedSkillXp);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using Microsoft.Extensions.Logging;
|
||||
using NeonSprawl.Server.Game.Contracts;
|
||||
using NeonSprawl.Server.Game.Factions;
|
||||
using NeonSprawl.Server.Game.Items;
|
||||
|
|
@ -115,11 +116,15 @@ public static class EncounterCombatWiring
|
|||
|
||||
if (!completion.Success)
|
||||
{
|
||||
logger?.LogDebug(
|
||||
"Encounter completion grant skipped for player {PlayerId} encounter {EncounterId} ({ReasonCode})",
|
||||
playerId,
|
||||
encounterId,
|
||||
completion.ReasonCode);
|
||||
if (logger?.IsEnabled(LogLevel.Debug) == true)
|
||||
{
|
||||
logger.LogDebug(
|
||||
"Encounter completion grant skipped for player {PlayerId} encounter {EncounterId} ({ReasonCode})",
|
||||
playerId,
|
||||
encounterId,
|
||||
completion.ReasonCode);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ public static class EncounterCompletionOperations
|
|||
|
||||
private static void CompensatingRemoveGrants(
|
||||
string playerId,
|
||||
IReadOnlyList<EncounterGrantApplied> grants,
|
||||
List<EncounterGrantApplied> grants,
|
||||
IItemDefinitionRegistry itemRegistry,
|
||||
IPlayerInventoryStore inventoryStore)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue