Skip to content

Commit

Permalink
Analytics: Fix effect start durations
Browse files Browse the repository at this point in the history
  • Loading branch information
Sejsel committed Jan 5, 2024
1 parent 3471fa8 commit c54a27f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions EVTCAnalytics/Events/AgentEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -427,15 +427,15 @@ public class EffectStartEvent : AgentEvent
/// <summary>
/// The duration of the effect in milliseconds.
/// </summary>
public ushort Duration { get; }
public uint Duration { get; }

/// <summary>
/// Trackable id of this effect. Used for pairing with a corresponding EffectEndEvent.
/// </summary>
public uint TrackableId { get; }

public EffectStartEvent(long time, Agent effectOwner, Effect effect, Agent agentTarget, float[] position,
short[] orientation, ushort duration, uint trackableId) : base(time, effectOwner)
short[] orientation, uint duration, uint trackableId) : base(time, effectOwner)
{
Effect = effect;
AgentTarget = agentTarget;
Expand Down
2 changes: 1 addition & 1 deletion EVTCAnalytics/Processing/LogProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ Skill GetSkillByIdOrAdd(uint id)
orientationBytes[1] = item.IsOffCycle;
BitConverter.TryWriteBytes(orientationBytes[2..6], item.Padding);

ushort duration = BitConverter.ToUInt16(durationBytes);
uint duration = BitConverter.ToUInt32(durationBytes);
for (int i = 0; i < 3; i++)
{
orientation[i] = BitConverter.ToInt16(orientationBytes[(i*2)..(i*2+2)]);
Expand Down

0 comments on commit c54a27f

Please sign in to comment.