Skip to content

Commit

Permalink
simplified access cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
EliphasNUIT committed Jul 15, 2023
1 parent 90f8d5d commit 064e24e
Show file tree
Hide file tree
Showing 36 changed files with 346 additions and 499 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ csharp_style_prefer_top_level_statements = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent

# IDE0002: Simplify Member Access
dotnet_diagnostic.IDE0002.severity = warning

[*.vb]
# Modifier preferences
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
14 changes: 7 additions & 7 deletions GW2EIBuilders/HtmlModels/PhaseDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ public PhaseDto(PhaseData phase, IReadOnlyList<PhaseData> phases, ParsedEvtcLog
}
StatisticsHelper statistics = log.StatisticsHelper;

DpsStats = PhaseDto.BuildDPSData(log, phase);
DpsStatsTargets = PhaseDto.BuildDPSTargetsData(log, phase);
OffensiveStatsTargets = PhaseDto.BuildOffensiveStatsTargetsData(log, phase);
OffensiveStats = PhaseDto.BuildOffensiveStatsData(log, phase);
GameplayStats = PhaseDto.BuildGameplayStatsData(log, phase);
DefStats = PhaseDto.BuildDefenseData(log, phase);
SupportStats = PhaseDto.BuildSupportData(log, phase);
DpsStats = BuildDPSData(log, phase);
DpsStatsTargets = BuildDPSTargetsData(log, phase);
OffensiveStatsTargets = BuildOffensiveStatsTargetsData(log, phase);
OffensiveStats = BuildOffensiveStatsData(log, phase);
GameplayStats = BuildGameplayStatsData(log, phase);
DefStats = BuildDefenseData(log, phase);
SupportStats = BuildSupportData(log, phase);
//
BoonStats = BuffData.BuildBuffUptimeData(log, statistics.PresentBoons, phase);
BoonDictionaries = BuffData.BuildBuffDictionariesData(log, statistics.PresentBoons, phase);
Expand Down
4 changes: 2 additions & 2 deletions GW2EIBuilders/JsonModels/JsonLogBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ internal static BuffDesc BuildBuffDesc(Buff buff, ParsedEvtcLog log)
Name = buff.Name,
Icon = buff.Link,
Stacking = buff.Type == Buff.BuffType.Intensity,
ConversionBasedHealing = log.CombatData.HasEXTHealing ? log.CombatData.EXTHealingCombatData.GetHealingType(buff, log) == GW2EIEvtcParser.Extensions.HealingStatsExtensionHandler.EXTHealingType.ConversionBased : false,
HybridHealing = log.CombatData.HasEXTHealing ? log.CombatData.EXTHealingCombatData.GetHealingType(buff, log) == GW2EIEvtcParser.Extensions.HealingStatsExtensionHandler.EXTHealingType.Hybrid : false
ConversionBasedHealing = log.CombatData.HasEXTHealing ? log.CombatData.EXTHealingCombatData.GetHealingType(buff, log) == HealingStatsExtensionHandler.EXTHealingType.ConversionBased : false,
HybridHealing = log.CombatData.HasEXTHealing ? log.CombatData.EXTHealingCombatData.GetHealingType(buff, log) == HealingStatsExtensionHandler.EXTHealingType.Hybrid : false
};
BuffInfoEvent buffInfoEvent = log.CombatData.GetBuffInfoEvent(buff.ID);
if (buffInfoEvent != null)
Expand Down
2 changes: 1 addition & 1 deletion GW2EIEvtcParser/EIData/Actors/AbstractSingleActor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ protected void SetCastEvents(ParsedEvtcLog log)
CastEvents.AddRange(log.CombatData.GetInstantCastData(AgentItem));
foreach (WeaponSwapEvent wepSwap in log.CombatData.GetWeaponSwapData(AgentItem))
{
if (CastEvents.Count > 0 && (wepSwap.Time - CastEvents.Last().Time) < ParserHelper.ServerDelayConstant && CastEvents.Last().SkillId == SkillIDs.WeaponSwap)
if (CastEvents.Count > 0 && (wepSwap.Time - CastEvents.Last().Time) < ServerDelayConstant && CastEvents.Last().SkillId == SkillIDs.WeaponSwap)
{
CastEvents[CastEvents.Count - 1] = wepSwap;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ private void ComputeBuffMap(ParsedEvtcLog log)
{
//
_buffMap = new BuffDictionary();
if (Actor.AgentItem == ParserHelper._unknownAgent)
if (Actor.AgentItem == _unknownAgent)
{
_buffMap.Finalize(log, Actor.AgentItem, out _trackedBuffs);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public IReadOnlyList<Segment> GetBarrierUpdates(ParsedEvtcLog log)



public IReadOnlyList<int> Get1SDamageList(ParsedEvtcLog log, long start, long end, AbstractSingleActor target, ParserHelper.DamageType damageType = ParserHelper.DamageType.All)
public IReadOnlyList<int> Get1SDamageList(ParsedEvtcLog log, long start, long end, AbstractSingleActor target, ParserHelper.DamageType damageType = DamageType.All)
{
if (!_damageList1S.TryGetValue(damageType, out CachingCollectionWithTarget<int[]> graphs))
{
Expand Down Expand Up @@ -139,7 +139,7 @@ public double GetCurrentHealthPercent(ParsedEvtcLog log, long time)
}
foreach (Segment seg in hps)
{
if (seg.IntersectSegment(time - ParserHelper.ServerDelayConstant, time + ParserHelper.ServerDelayConstant))
if (seg.IntersectSegment(time - ServerDelayConstant, time + ServerDelayConstant))
{
return seg.Value;
}
Expand All @@ -156,7 +156,7 @@ public double GetCurrentBarrierPercent(ParsedEvtcLog log, long time)
}
foreach (Segment seg in hps)
{
if (seg.IntersectSegment(time - ParserHelper.ServerDelayConstant, time + ParserHelper.ServerDelayConstant))
if (seg.IntersectSegment(time - ServerDelayConstant, time + ServerDelayConstant))
{
return seg.Value;
}
Expand Down
Loading

0 comments on commit 064e24e

Please sign in to comment.