Skip to content

Commit

Permalink
Analytics: Fixed Adina and Sabir identification when stuck in combat
Browse files Browse the repository at this point in the history
  • Loading branch information
Sejsel committed Jul 8, 2024
1 parent 1263940 commit 044f567
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ArcdpsLogManager/ArcdpsLogManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Each new log data update causes a revision increase.
See LogDataUpdater for the updates.
-->
<Version>1.11.1.6</Version>
<Version>1.11.1.7</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DebounceThrottle" Version="2.0.0" />
Expand Down
1 change: 1 addition & 0 deletions ArcdpsLogManager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ This is the full changelog of the arcdps Log Manager.
- Fixed commander tag identification for fights where multiple overhead markers are used.
- Fixed upload button not being available for multiple selected logs if logs failed to be processed by dps.report
- Fixed crashes happening at weekly reset and on the midnight of the day for some timezones.
- Fixed Cardinal Sabir logs very rarely being identified as Cardinal Adina and vice versa.
- Fixed a Skorvald false failure triggered when the group dies after he reaches 1% (thanks, @Linkaaaaa!)
- Fixed encounter durations rounding to 1m60s (thanks, @Linkaaaaa!).

Expand Down
3 changes: 3 additions & 0 deletions ArcdpsLogManager/Logs/Updates/LogDataUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ x.Profession is Profession.Thief or Profession.Engineer or Profession.Ranger
&& string.Compare(log.EvtcVersion, "EVTC20240612", StringComparison.OrdinalIgnoreCase) >= 0
&& log.Encounter is Encounter.XunlaiJadeJunkyard or Encounter.KainengOverlook,
"Fix success detection for Xunlai Jade Junkyard and Kaineng Overlook with recent arcdps versions"),
new LogUpdate(log => log.ParsingVersion < new Version(1, 11, 1, 7)
&& log.Encounter is Encounter.Adina or Encounter.Sabir,
"Fixed Adina and Sabir possibly being identified as the other one in rare scenarios."),
// When adding a new update, you need to increase the revision (last value) of the version in the .csproj file
// unless the version changes more significantly, in that case it can be reset to 0.
};
Expand Down
6 changes: 6 additions & 0 deletions EVTCAnalytics/GameData/SkillIds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ public static class SkillIds

public const int HarvestTempleLiftOff = 63896;


// The first attack of Cardinal Adina
public const int AdinaChargeUp = 56648;
// The first autoattack of Cardinal Sabir
public const int SabirFirstAutoattack = 56620;

public const int Emboldened = 68087;
}
}
2 changes: 1 addition & 1 deletion EVTCAnalytics/GameData/SpeciesIds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static class SpeciesIds
// Cardinal Adina
public const int CardinalAdina = 22006;
// Cardinal Sabir
public const int CadinalSabir = 21964;
public const int CardinalSabir = 21964;
// Qadim the Peerless
public const int QadimThePeerless = 22000;

Expand Down
8 changes: 6 additions & 2 deletions EVTCAnalytics/Processing/EncounterDataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,17 @@ private IEncounterData GetPvEEncounterData(Encounter encounter, Agent mainTarget
// Raids - Wing 7
case Encounter.Adina:
{
return GetDefaultBuilder(encounter, mainTarget)
// We need to explicitly find Adina as this may be a Sabir main target log.
var adina = GetTargetBySpeciesId(agents, SpeciesIds.CardinalAdina);
return GetDefaultBuilder(encounter, adina ?? mainTarget)
.WithModes(new AgentHealthModeDeterminer(mainTarget, 24_000_000))
.Build();
}
case Encounter.Sabir:
{
return GetDefaultBuilder(encounter, mainTarget)
// We need to explicitly find Sabir this may be an Adina main target log.
var sabir = GetTargetBySpeciesId(agents, SpeciesIds.CardinalSabir);
return GetDefaultBuilder(encounter, sabir ?? mainTarget)
.WithModes(new AgentHealthModeDeterminer(mainTarget, 32_000_000))
.Build();
}
Expand Down
20 changes: 14 additions & 6 deletions EVTCAnalytics/Processing/EncounterIdentifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,17 @@ public Encounter IdentifyEncounter(Agent mainTarget, IReadOnlyList<Agent> agents
case SpeciesIds.Qadim:
return Encounter.Qadim;
case SpeciesIds.CardinalAdina:
return Encounter.Adina;
case SpeciesIds.CadinalSabir:
return Encounter.Sabir;
// During initial instance clearing, it is possible for the squad to start combat (clearing) near one boss
// and then move to the other and start without leaving combat.
// We check for the first cast skill of Sabir, that should happen reasonably early.
// If both bosses were attacked at the same time, then choosing one at random is acceptable as well.
return skills.Any(x => x.Id == SkillIds.SabirFirstAutoattack) ? Encounter.Sabir : Encounter.Adina;
case SpeciesIds.CardinalSabir:
// During initial instance clearing, it is possible for the squad to start combat (clearing) near one boss
// and then move to the other and start without leaving combat.
// We check for the first cast skill of Adina (often within a few milliseconds).
// If both bosses were attacked at the same time, then choosing one at random is acceptable as well.
return skills.Any(x => x.Id == SkillIds.AdinaChargeUp) ? Encounter.Adina : Encounter.Sabir;
case SpeciesIds.QadimThePeerless:
return Encounter.QadimThePeerless;
case SpeciesIds.StandardKittyGolem:
Expand Down Expand Up @@ -294,9 +302,9 @@ public IEnumerable<Encounter> IdentifyPotentialEncounters(ParsedBossData bossDat
case SpeciesIds.Qadim:
return new[] { Encounter.Qadim };
case SpeciesIds.CardinalAdina:
return new[] { Encounter.Adina };
case SpeciesIds.CadinalSabir:
return new[] { Encounter.Sabir };
return new[] { Encounter.Adina, Encounter.Sabir };
case SpeciesIds.CardinalSabir:
return new[] { Encounter.Sabir, Encounter.Adina };
case SpeciesIds.QadimThePeerless:
return new[] { Encounter.QadimThePeerless };
case SpeciesIds.StandardKittyGolem:
Expand Down

0 comments on commit 044f567

Please sign in to comment.