Activity Change Event
This commit is contained in:
parent
eda66a2334
commit
386c211de5
@ -28,4 +28,5 @@ public enum CS2Event : byte {
|
||||
OnBombExploded = 24,
|
||||
AnyEvent = 25,
|
||||
AnyMessage = 26,
|
||||
OnActivityChange = 27
|
||||
}
|
@ -16,6 +16,9 @@ internal static class CS2EventGenerator
|
||||
if(events.Count > 0)
|
||||
events.Add(new ValueTuple<CS2Event, CS2EventArgs>(CS2Event.AnyEvent, new CS2EventArgs(events.Count)));
|
||||
|
||||
if (lastGameState.Player?.Activity != newGameState.Player?.Activity)
|
||||
events.Add(new(CS2Event.OnActivityChange, new CS2EventArgs(newGameState.Player?.Activity)));
|
||||
|
||||
events.Add(new ValueTuple<CS2Event, CS2EventArgs>(CS2Event.AnyMessage, new CS2EventArgs()));
|
||||
return events;
|
||||
}
|
||||
|
@ -99,6 +99,7 @@ public class CS2GSI
|
||||
CS2Event.OnBombExploded => this.OnBombExploded,
|
||||
CS2Event.AnyEvent => this.AnyEvent,
|
||||
CS2Event.AnyMessage => this.AnyMessage,
|
||||
CS2Event.OnActivityChange => this.OnActivityChange,
|
||||
_ => throw new ArgumentException(Resources.Unknown_Event, nameof(cs2Event))
|
||||
};
|
||||
}
|
||||
@ -133,6 +134,7 @@ public class CS2GSI
|
||||
OnBombDefused,
|
||||
OnBombExploded,
|
||||
AnyEvent,
|
||||
AnyMessage;
|
||||
AnyMessage,
|
||||
OnActivityChange;
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user