Example #1
0
 private void Game_ProcessFound(object sender, ProcessFoundEventArgs e)
 {
     if (!Config.Enabled)
     {
         return;
     }
     _ = SendProcessFoundAsync(e);
 }
Example #2
0
        async private Task SendProcessFoundAsync(ProcessFoundEventArgs e)
        {
            // always send complete information for this kind of event
            var body = RequestBody.FromProcessFoundEventArgs(e, di);

            body.Headers = Config.Headers;
            await PostJson(RequestBodyToJsonString(body));
        }
Example #3
0
 public static RequestBody FromProcessFoundEventArgs(ProcessFoundEventArgs e, IDiabloInterface di)
 {
     return(new RequestBody()
     {
         Event = "ProcessFound",
         D2ProcessInfo = e.ProcessInfo,
         DIApplicationInfo = di.appInfo,
     });
 }
Example #4
0
 void OnProcessFound(object sender, ProcessFoundEventArgs e) =>
 ProcessFound?.Invoke(sender, e);