aboutsummaryrefslogtreecommitdiffstats
path: root/WarframeClock/App.xaml.cs
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2019-06-22 22:04:11 +0900
committerKazuki Yamaguchi <k@rhe.jp>2019-06-22 22:04:11 +0900
commit78dffaaf5f6445e983120e62dcd7f68078b765f5 (patch)
treee8562518006560d8b212a03e4f3364891d449e60 /WarframeClock/App.xaml.cs
parent3c13b62b85f0d882f91c7dd98398efbff176ba0c (diff)
downloadwf-clock-78dffaaf5f6445e983120e62dcd7f68078b765f5.tar.gz
workaround for showing wrong Kuva Flood node
For some time, EE.log sometimes contains wrong information. That is, the SolNode ID doesn't always match the actual node. I guess it's a bug of the game. For the time being, use the node's planet / node name instead of the SolNode ID.
Diffstat (limited to 'WarframeClock/App.xaml.cs')
-rw-r--r--WarframeClock/App.xaml.cs35
1 files changed, 27 insertions, 8 deletions
diff --git a/WarframeClock/App.xaml.cs b/WarframeClock/App.xaml.cs
index 8e04a3c..3ebdde8 100644
--- a/WarframeClock/App.xaml.cs
+++ b/WarframeClock/App.xaml.cs
@@ -61,7 +61,7 @@ namespace WarframeClock
var regexWorldStateRefreshedFromDb = new Regex(@"^Background: world state refreshed from db$");
var regexCetusJoin = new Regex(@"^IRC out: JOIN #H_CETUSHUB4_(.+)$");
var regexArbitration = new Regex(@"^EliteAlertMission at (.+) \(.+\)$");
- var regexKuvaFlood = new Regex(@"^KuvaMission(\d+) at (.+)\(.+\)$");
+ var regexKuvaFlood = new Regex(@"^KuvaMission(\d+) at (.+)\((.+) - (.+)\)$");
parser.OnLogEntry += (sender, args) =>
{
Match match;
@@ -88,18 +88,37 @@ namespace WarframeClock
else if ((match = regexArbitration.Match(args.Content)).Success)
{
Trace.WriteLine($"EE.log: Arbitration: {match.Groups[1].Value}");
- var solNode = WfcdWorldStateData.GetSolNode(match.Groups[1].Value);
- AppData.ArbitrationSolNodeUpdated = args.DateTime;
- AppData.ArbitrationSolNode = solNode;
+ try
+ {
+ var solNode = WfcdWorldStateData.GetSolNode(match.Groups[1].Value);
+ AppData.ArbitrationSolNodeUpdated = args.DateTime;
+ AppData.ArbitrationSolNode = solNode;
+ }
+ catch (Exception ex)
+ {
+ Trace.WriteLine($"EE.log: Unknown SolNode");
+ Trace.WriteLine(ex);
+ }
}
else if ((match = regexKuvaFlood.Match(args.Content)).Success)
{
if (match.Groups[1].Value == "6" || match.Groups[1].Value == "12")
{
- Trace.WriteLine($"EE.log: Kuva Flood: {match.Groups[2].Value}");
- var solNode = WfcdWorldStateData.GetSolNode(match.Groups[2].Value);
- AppData.KuvaFloodSolNodeUpdated = args.DateTime;
- AppData.KuvaFloodSolNode = solNode;
+ Trace.WriteLine($"EE.log: Arbitration: {match.Groups[1].Value}");
+ try
+ {
+ Trace.WriteLine($"EE.log: Kuva Flood: {match.Groups[2].Value} " +
+ $"({match.Groups[3].Value} - {match.Groups[4].Value})");
+ var solNode = WfcdWorldStateData.GetSolNodeByName(match.Groups[3].Value,
+ match.Groups[4].Value);
+ AppData.KuvaFloodSolNodeUpdated = args.DateTime;
+ AppData.KuvaFloodSolNode = solNode;
+ }
+ catch (Exception ex)
+ {
+ Trace.WriteLine($"EE.log: Unknown SolNode");
+ Trace.WriteLine(ex);
+ }
}
}
};