private async void PlayerOnReputationAsync(object sender, ReputationEvent e) =>
 await AddCommand(new SetCommanderReputationMajorFaction(MajorFaction.Federation, e.Federation))
 .AddCommand(new SetCommanderReputationMajorFaction(MajorFaction.Alliance, e.Alliance))
 .AddCommand(new SetCommanderReputationMajorFaction(MajorFaction.Empire, e.Empire))
 .AddCommand(new SetCommanderReputationMajorFaction(MajorFaction.Independent, e.Independent))
 .SendAsync()
 .ConfigureAwait(false);
 internal ReputationEvent InvokeEvent(ReputationEvent arg)
 {
     if (_api.ValidateEvent(arg))
     {
         Reputation?.Invoke(_api, arg);
     }
     return(arg);
 }
Example #3
0
 private void AssertEvent(ReputationEvent @event)
 {
     Assert.NotNull(@event);
     Assert.Equal(DateTime.Parse("2019-09-08T09:53:32Z"), @event.Timestamp);
     Assert.Equal("Reputation", @event.Event);
     Assert.Equal(2.830170, @event.Empire, 6);
     Assert.Equal(3.797780, @event.Federation, 6);
     Assert.Equal(0, @event.Alliance, 6);
     Assert.Equal(0, @event.Independent, 6);
 }
Example #4
0
 internal void InvokeReputationEvent(ReputationEvent arg)
 {
     ReputationEvent?.Invoke(this, arg);
 }
Example #5
0
 internal void InvokeReputationEvent(ReputationEvent arg) => ReputationEvent?.Invoke(null, arg);