Пример #1
0
 internal InterdictionEvent InvokeEvent(InterdictionEvent arg)
 {
     if (_api.ValidateEvent(arg))
     {
         Interdiction?.Invoke(_api, arg);
     }
     return(arg);
 }
 private IEnumerable <ApiEvent> ConvertEvent(Interdiction e)
 {
     yield return(new ApiEvent("addCommanderCombatInterdiction")
     {
         EventData = new Dictionary <string, object> {
             { "starsystemName", playerStateRecorder.GetPlayerSystem(e.Timestamp) },
             { "opponentName", e.Interdicted ?? e.Faction },
             { "isPlayer", e.IsPlayer }
         },
         Timestamp = e.Timestamp
     });
 }