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);
Exemplo n.º 2
0
 internal ReputationEvent InvokeEvent(ReputationEvent arg)
 {
     if (_api.ValidateEvent(arg))
     {
         Reputation?.Invoke(_api, arg);
     }
     return(arg);
 }
Exemplo n.º 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);
 }
Exemplo n.º 4
0
 internal void InvokeReputationEvent(ReputationEvent arg)
 {
     ReputationEvent?.Invoke(this, arg);
 }
Exemplo n.º 5
0
 internal void InvokeReputationEvent(ReputationEvent arg) => ReputationEvent?.Invoke(null, arg);