Skip to content

Commit cbe31e4

Browse files
committed
[Analytics] Added IIDChangeEvent
1 parent e8f9a01 commit cbe31e4

File tree

4 files changed

+27
-2
lines changed

4 files changed

+27
-2
lines changed

EVTCAnalytics/Events/LogEvents.cs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,32 @@ public class LogNPCUpdateEvent(long time, ulong specieId, Agent agent, int times
6262
public int Timestamp { get; } = timestamp;
6363
}
6464

65+
/// <summary>
66+
/// Agent address IID changed.
67+
/// </summary>
68+
public class IIDChangeEvent(long time, ulong oldIID, ulong newIID) : Event(time)
69+
{
70+
/// <summary>
71+
/// Old address IID.
72+
/// </summary>
73+
public ulong OldIID { get; } = oldIID;
74+
/// <summary>
75+
/// New address IID.
76+
/// </summary>
77+
public ulong NewIID { get; } = newIID;
78+
}
79+
6580
/// <summary>
6681
/// Player changed map event.
6782
/// </summary>
6883
public class MapChangeEvent(long time, ulong newMapID, ulong oldMapID) : Event(time)
6984
{
7085
/// <summary>
71-
/// New Map ID
86+
/// New Map ID.
7287
/// </summary>
7388
public ulong NewMapID { get; } = newMapID;
7489
/// <summary>
75-
/// Old Map ID
90+
/// Old Map ID.
7691
/// </summary>
7792
public ulong OldMapID { get; } = oldMapID;
7893
}

EVTCAnalytics/Parsed/Enums/StateChange.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public enum StateChange : byte
6161
SquadMarker = 53, // Added 20240328
6262
ArcBuild = 54, // Added 20240614
6363
Glider = 55, // Added 20240627
64+
IIDChange = 64,
6465
MapChange = 65,
6566
};
6667
}

EVTCAnalytics/Parsing/CombatItemFilters.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ private static IEnumerable<StateChange> GetDirectStateChangesForEventType(Type e
266266
if (eventType == typeof(RateHealthEvent)) return [StateChange.TickRate];
267267
if (eventType == typeof(StatResetEvent)) return [StateChange.StatReset];
268268
if (eventType == typeof(LogNPCUpdateEvent)) return [StateChange.LogNPCUpdate];
269+
if (eventType == typeof(IIDChangeEvent)) return [StateChange.IIDChange];
269270
if (eventType == typeof(MapChangeEvent)) return [StateChange.MapChange];
270271

271272
if (eventType == typeof(CrowdControlEvent)) return [];
@@ -348,6 +349,7 @@ private static bool IsDirectBuffDamage(Type eventType)
348349
if (eventType == typeof(RateHealthEvent)) return false;
349350
if (eventType == typeof(StatResetEvent)) return false;
350351
if (eventType == typeof(LogNPCUpdateEvent)) return false;
352+
if (eventType == typeof(IIDChangeEvent)) return false;
351353
if (eventType == typeof(MapChangeEvent)) return false;
352354

353355
if (eventType == typeof(SkillCastEvent)) return false;
@@ -426,6 +428,7 @@ private static bool IsDirectSkillCast(Type eventType)
426428
if (eventType == typeof(RateHealthEvent)) return false;
427429
if (eventType == typeof(StatResetEvent)) return false;
428430
if (eventType == typeof(LogNPCUpdateEvent)) return false;
431+
if (eventType == typeof(IIDChangeEvent)) return false;
429432
if (eventType == typeof(MapChangeEvent)) return false;
430433

431434
if (eventType == typeof(SkillCastEvent)) return false;
@@ -504,6 +507,7 @@ private static IEnumerable<Result> GetDirectPhysicalResultsForEventType(Type eve
504507
if (eventType == typeof(RateHealthEvent)) return [];
505508
if (eventType == typeof(StatResetEvent)) return [];
506509
if (eventType == typeof(LogNPCUpdateEvent)) return [];
510+
if (eventType == typeof(IIDChangeEvent)) return [];
507511
if (eventType == typeof(MapChangeEvent)) return [];
508512

509513
if (eventType == typeof(SkillCastEvent)) return [];
@@ -594,6 +598,7 @@ public static bool IsAlwaysKept(StateChange stateChange)
594598
StateChange.SquadMarker => false,
595599
StateChange.ArcBuild => true,
596600
StateChange.Glider => false,
601+
StateChange.IIDChange => false,
597602
StateChange.MapChange => false,
598603
_ => throw new ArgumentOutOfRangeException(nameof(stateChange), stateChange, null)
599604
};

EVTCAnalytics/Processing/LogProcessor.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,6 +1328,10 @@ static WeaponSet WeaponSetFromId(long id)
13281328
_ => new UnknownEvent(item.Time, item)
13291329
};
13301330
}
1331+
case StateChange.IIDChange:
1332+
{
1333+
return new IIDChangeEvent(item.Time, item.SrcAgent, item.DstAgent);
1334+
}
13311335
case StateChange.MapChange:
13321336
{
13331337
return new MapChangeEvent(item.Time, item.SrcAgent, item.DstAgent);

0 commit comments

Comments
 (0)