-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEveAgentDialogWindow.cs
38 lines (34 loc) · 1.24 KB
/
EveAgentDialogWindow.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace EveModel
{
public class EveAgentDialogWindow : EveWindow
{
public string Briefing
{
get { return this["sr"]["briefingBrowser"]["sr"]["currentTXT"].GetValueAs<String>(); }
}
public string Objective
{
get { return this["sr"]["objectiveBrowser"]["sr"]["currentTXT"].GetValueAs<String>(); }
}
public int AgentId
{
get { return this["sr"]["agentID"].GetValueAs<int>(); }
}
public bool MissionIsThroughLowSec
{
get
{
var ma = System.Text.RegularExpressions.Regex.Matches(Objective, @"//\d{8}");
var pickup = int.Parse(ma[0].ToString().Substring(2));
var dropoff = int.Parse(ma[1].ToString().Substring(2));
var pathfinder = Frame.Client.GetService("pathfinder");
var path = pathfinder.CallMethod("GetPathBetween", new object[] { pickup, dropoff }).GetList<int>();
return path.Any(p => Frame.Client.MapService.CallMethod("GetSecurityStatus", new object[] { p }).GetValueAs<double>() < 0.5);
}
}
}
}