Skip to content

Commit

Permalink
LogTests.EI: Update EI to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
Sejsel committed Oct 30, 2021
1 parent 2e150ec commit 28a4063
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Tests/EI
Submodule EI updated 812 files
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using GW2EIEvtcParser.Exceptions;
using GW2EIGW2API;
using GW2Scratch.EVTCAnalytics.GameData.Encounters;
using GW2Scratch.EVTCAnalytics.Model;
using GW2Scratch.EVTCAnalytics.Model.Agents;
using GW2Scratch.EVTCAnalytics.Processing;
using GW2Scratch.EVTCAnalytics.Processing.Encounters.Modes;
Expand Down Expand Up @@ -87,23 +88,23 @@ public CheckResult CheckLog(string filename)
eiFailureReason.Throw();
}

var eiDuration = TimeSpan.FromMilliseconds(eiLog.FightData.FightEnd - eiLog.FightData.FightStart);
var eiDuration = TimeSpan.FromMilliseconds(eiLog.FightData.FightDuration);
var eiResult = eiLog.FightData.Success ? EncounterResult.Success : EncounterResult.Failure;
var eiPlayers = eiLog.PlayerList
.Where(p => !p.IsFakeActor)
.Select(p =>
{
Profession profession;
if (Enum.TryParse(p.Prof, out EliteSpecialization specialization))
if (Enum.TryParse(p.Spec.ToString(), out EliteSpecialization specialization))
{
profession = GameData.Characters.GetProfession(specialization);
}
else
{
specialization = EliteSpecialization.None;
if (!Enum.TryParse(p.Prof, out profession))
if (!Enum.TryParse(p.BaseSpec.ToString(), out profession))
{
throw new Exception($"Unknown profession {p.Prof} found in Elite Insights data.");
throw new Exception($"Unknown profession {p.Spec} found in Elite Insights data.");
}
}

Expand Down

0 comments on commit 28a4063

Please sign in to comment.