Skip to content

Commit

Permalink
Merge branch 'master' into experiment-parsing-pruning
Browse files Browse the repository at this point in the history
  • Loading branch information
Sejsel authored Aug 22, 2023
2 parents c0f1fd7 + deb1582 commit e501370
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 9 deletions.
6 changes: 6 additions & 0 deletions ArcdpsLogManager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion EVTCAnalytics/Events/AgentEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{

}
}
Expand Down
26 changes: 25 additions & 1 deletion EVTCAnalytics/Events/BuffEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

/// <summary>
/// An event emitted when a single stack of a buff is added to an <see cref="Agent"/>.
/// </summary>
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;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
24 changes: 18 additions & 6 deletions EVTCAnalytics/Processing/LogProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
{
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit e501370

Please sign in to comment.