diff --git a/ArcdpsLogManager/CHANGELOG.md b/ArcdpsLogManager/CHANGELOG.md index a50600fb..e0ae9774 100644 --- a/ArcdpsLogManager/CHANGELOG.md +++ b/ArcdpsLogManager/CHANGELOG.md @@ -14,9 +14,15 @@ This is the full changelog of the arcdps Log Manager. #### Fixes - Slightly improved Bandit Trio success detection in cases when the recording player leaves the fort. +- Fixed logs with Emboldened appearing mid-fight failing to be processed. - Fixed log detail pane not appearing for selected logs processed with Log Manager versions 1.3 and older. - Fixed a stray debug data section appearing when multiple logs were selected even if debug data wasn't enabled +#### EVTC Inspector notes +- Fixed buff extension events not being distinguished from normal buff applies +- Added stack ids to buff applies / extends +- Added "is stack active" to buff applies / extends + ## Log Manager v1.9 #### New features - Added support for Silent Surf CM and NM diff --git a/EVTCAnalytics/Events/AgentEvents.cs b/EVTCAnalytics/Events/AgentEvents.cs index 85b7a430..622a4b98 100644 --- a/EVTCAnalytics/Events/AgentEvents.cs +++ b/EVTCAnalytics/Events/AgentEvents.cs @@ -172,7 +172,9 @@ public AgentTagEvent(long time, Agent agent, Marker marker, bool? isCommander) : public class InitialBuffEvent : BuffApplyEvent { public InitialBuffEvent(long time, Agent agent, Skill buff, Agent sourceAgent, int durationApplied, - uint durationOfRemovedStack) : base(time, agent, buff, sourceAgent, durationApplied, durationOfRemovedStack) { + uint durationOfRemovedStack, uint instanceId, bool isActive) + : base(time, agent, buff, sourceAgent, durationApplied, durationOfRemovedStack, instanceId, isActive) + { } } diff --git a/EVTCAnalytics/Events/BuffEvents.cs b/EVTCAnalytics/Events/BuffEvents.cs index 966a877f..9d0074bf 100644 --- a/EVTCAnalytics/Events/BuffEvents.cs +++ b/EVTCAnalytics/Events/BuffEvents.cs @@ -90,12 +90,36 @@ public class BuffApplyEvent : BuffEvent { public int DurationApplied { get; } public uint DurationOfRemovedStack { get; } + public uint StackId { get; } + public bool IsStackActive { get; } public BuffApplyEvent(long time, Agent agent, Skill buff, Agent sourceAgent, int durationApplied, - uint durationOfRemovedStack) : base(time, agent, buff, sourceAgent) + uint durationOfRemovedStack, uint instanceId, bool isStackActive) : base(time, agent, buff, sourceAgent) { DurationApplied = durationApplied; DurationOfRemovedStack = durationOfRemovedStack; + StackId = instanceId; + IsStackActive = isStackActive; + } + } + + /// + /// An event emitted when a single stack of a buff is added to an . + /// + public class BuffExtensionEvent : BuffEvent + { + public int DurationChange { get; } + public uint NewDuration { get; } + public uint StackId { get; } + public bool IsStackActive { get; } + + public BuffExtensionEvent(long time, Agent agent, Skill buff, Agent sourceAgent, int durationChange, + uint newDuration, uint instanceId, bool isStackActive) : base(time, agent, buff, sourceAgent) + { + DurationChange = durationChange; + NewDuration = newDuration; + StackId = instanceId; + IsStackActive = isStackActive; } } diff --git a/EVTCAnalytics/Processing/Encounters/Modes/EmboldenedDetectingModeDeterminer.cs b/EVTCAnalytics/Processing/Encounters/Modes/EmboldenedDetectingModeDeterminer.cs index e68b1ef5..b214ef11 100644 --- a/EVTCAnalytics/Processing/Encounters/Modes/EmboldenedDetectingModeDeterminer.cs +++ b/EVTCAnalytics/Processing/Encounters/Modes/EmboldenedDetectingModeDeterminer.cs @@ -38,7 +38,13 @@ public class EmboldenedDetectingModeDeterminer : IModeDeterminer } } - var maxEmboldenedCount = emboldenedCounts.Values.Max(); + // In case Emboldened appears only due to buff applications, we currently default to 0. + // Note that this can be both correct and wrong, depending on when this happens: + // - at the end of the fight, the log can capture the emboldened buff being applied (if coming from CM fight) / reset, we want to ignore this + // - in the middle of a fight, this can be legitimate when the emboldened wing changes to the one the fight is happening in, we want to count this + // TODO: fix this ^ + + var maxEmboldenedCount = emboldenedCounts.Values.DefaultIfEmpty(0).Max(); var mode = maxEmboldenedCount switch { <= 0 => EncounterMode.Normal, 1 => EncounterMode.Emboldened1, diff --git a/EVTCAnalytics/Processing/LogProcessor.cs b/EVTCAnalytics/Processing/LogProcessor.cs index 119e2d35..99f921f1 100644 --- a/EVTCAnalytics/Processing/LogProcessor.cs +++ b/EVTCAnalytics/Processing/LogProcessor.cs @@ -961,8 +961,9 @@ Skill GetSkillByIdOrAdd(uint id) uint durationOfRemovedStack = item.OverstackValue; var agent = GetAgentByAddress(item.DstAgent); var sourceAgent = GetAgentByAddress(item.SrcAgent); - return new InitialBuffEvent(item.Time, agent, buff, sourceAgent, durationApplied, - durationOfRemovedStack); + var instanceId = item.Padding; + var isActive = item.IsShields != 0; + return new InitialBuffEvent(item.Time, agent, buff, sourceAgent, durationApplied, durationOfRemovedStack, instanceId, isActive); } case StateChange.Position: { @@ -1263,12 +1264,23 @@ Skill GetSkillByIdOrAdd(uint id) else if (item.Buff > 0 && item.BuffDmg == 0) { Skill buff = GetSkillById(item.SkillId); - int durationApplied = item.Value; - uint durationOfRemovedStack = item.OverstackValue; var agent = GetAgentByAddress(item.DstAgent); var sourceAgent = GetAgentByAddress(item.SrcAgent); - return new BuffApplyEvent(item.Time, agent, buff, sourceAgent, durationApplied, - durationOfRemovedStack); + var instanceId = item.Padding; + var isExtension = item.IsOffCycle != 0; + bool isActive = item.IsShields != 0; + if (isExtension) + { + int durationChange = item.Value; + uint newDuration = item.OverstackValue; + return new BuffExtensionEvent(item.Time, agent, buff, sourceAgent, durationChange, newDuration, instanceId, isActive); + } + else + { + int durationApplied = item.Value; + uint durationOfRemovedStack = item.OverstackValue; + return new BuffApplyEvent(item.Time, agent, buff, sourceAgent, durationApplied, durationOfRemovedStack, instanceId, isActive); + } } else if (item.Buff > 0 && item.Value == 0) {