Skip to content

Added StunBreak Event #256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions EVTCAnalytics/Events/AgentEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -445,4 +445,16 @@ public class AgentGliderOpenEvent(long time, Agent agent) : AgentEvent(time, age
/// Introduced in EVTC20240627.
/// </remarks>
public class AgentGliderCloseEvent(long time, Agent agent) : AgentEvent(time, agent);

/// <summary>
/// Indicates that an agent broke a crowd control status.
/// </summary>
/// <remarks>Introduced in EVTC20240627</remarks>
public class AgentStunBreakEvent(long time, Agent agent, int duration) : AgentEvent(time, agent)
{
/// <summary>
/// Remaining crowd control duration.
/// </summary>
public int RemainingDuration { get; } = duration;
}
}
1 change: 1 addition & 0 deletions EVTCAnalytics/Parsed/Enums/StateChange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@ public enum StateChange : byte
SquadMarker = 53, // Added 20240328
ArcBuild = 54, // Added 20240614
Glider = 55, // Added 20240627
StunBreak = 56, // Added 20240627
};
}
5 changes: 5 additions & 0 deletions EVTCAnalytics/Parsing/CombatItemFilters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ private static IEnumerable<StateChange> GetDirectStateChangesForEventType(Type e
if (eventType == typeof(EffectEndEvent)) return [StateChange.Effect2];
if (eventType == typeof(AgentGliderOpenEvent)) return [StateChange.Glider];
if (eventType == typeof(AgentGliderCloseEvent)) return [StateChange.Glider];
if (eventType == typeof(AgentStunBreakEvent)) return [StateChange.StunBreak];

if (eventType == typeof(BuffEvent)) return [];
if (eventType == typeof(BuffRemoveEvent)) return [];
Expand Down Expand Up @@ -319,6 +320,7 @@ private static bool IsDirectBuffDamage(Type eventType)
if (eventType == typeof(EffectEndEvent)) return false;
if (eventType == typeof(AgentGliderOpenEvent)) return false;
if (eventType == typeof(AgentGliderCloseEvent)) return false;
if (eventType == typeof(AgentStunBreakEvent)) return false;

if (eventType == typeof(BuffEvent)) return false;
if (eventType == typeof(BuffRemoveEvent)) return false;
Expand Down Expand Up @@ -394,6 +396,7 @@ private static bool IsDirectSkillCast(Type eventType)
if (eventType == typeof(EffectEndEvent)) return false;
if (eventType == typeof(AgentGliderOpenEvent)) return false;
if (eventType == typeof(AgentGliderCloseEvent)) return false;
if (eventType == typeof(AgentStunBreakEvent)) return false;

if (eventType == typeof(BuffEvent)) return false;
if (eventType == typeof(BuffRemoveEvent)) return false;
Expand Down Expand Up @@ -469,6 +472,7 @@ private static IEnumerable<Result> GetDirectPhysicalResultsForEventType(Type eve
if (eventType == typeof(EffectEndEvent)) return [];
if (eventType == typeof(AgentGliderOpenEvent)) return [];
if (eventType == typeof(AgentGliderCloseEvent)) return [];
if (eventType == typeof(AgentStunBreakEvent)) return [];

if (eventType == typeof(BuffEvent)) return [];
if (eventType == typeof(BuffRemoveEvent)) return [];
Expand Down Expand Up @@ -581,6 +585,7 @@ public static bool IsAlwaysKept(StateChange stateChange)
StateChange.SquadMarker => false,
StateChange.ArcBuild => true,
StateChange.Glider => false,
StateChange.StunBreak => false,
_ => throw new ArgumentOutOfRangeException(nameof(stateChange), stateChange, null)
};
}
Expand Down
4 changes: 4 additions & 0 deletions EVTCAnalytics/Processing/LogProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,10 @@ static WeaponSet WeaponSetFromId(long id)
_ => new UnknownEvent(item.Time, item)
};
}
case StateChange.StunBreak:
{
return new AgentStunBreakEvent(item.Time, GetAgentByAddress(item.SrcAgent), item.Value);
}
default:
return new UnknownEvent(item.Time, item);
}
Expand Down
Loading