Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ArcdpsLogManager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ This is the full changelog of the arcdps Log Manager.

## Unreleased

#### EVTC Inspector notes
- Added Tick events

## Log Manager v1.16.0

#### Fixes
Expand Down
2 changes: 1 addition & 1 deletion ArcdpsLogManager/Controls/GroupCompositionControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private void RecreateLayout()

if (anyPlayerTag)
{
Image tagIcon = player.Tag == PlayerTag.Commander ? imageProvider.GetTinyCommanderIcon() : null;
Image tagIcon = player.Tag == PlayerTag.Commander ? imageProvider.GetTinyCommanderIcon(player.TagType) : null;
string tagToolTip = player.Tag == PlayerTag.Commander ? "Commander" : null;
var tagImageView = new ImageView
{
Expand Down
47 changes: 45 additions & 2 deletions ArcdpsLogManager/ImageProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using GW2Scratch.EVTCAnalytics.GameData.Encounters;
using GW2Scratch.EVTCAnalytics.Model;
using GW2Scratch.EVTCAnalytics.Model.Agents;
using GW2Scratch.EVTCAnalytics.Parsed.Enums;

namespace GW2Scratch.ArcdpsLogManager
{
Expand Down Expand Up @@ -74,7 +75,24 @@ public class ImageProvider
private Lazy<Image> TinyIconRaid { get; } = new Lazy<Image>(Resources.GetTinyIconRaid);
private Lazy<Image> TinyIconFractals { get; } = new Lazy<Image>(Resources.GetTinyIconFractals);
private Lazy<Image> TinyIconLog { get; } = new Lazy<Image>(Resources.GetTinyIconGuildRegistrar);
private Lazy<Image> TinyIconCommander { get; } = new Lazy<Image>(Resources.GetTinyIconCommander);
private Lazy<Image> TinyCommanderRed { get; } = new Lazy<Image>(Resources.GetTinyIconCommanderRed);
private Lazy<Image> TinyCommanderOrange { get; } = new Lazy<Image>(Resources.GetTinyIconCommanderOrange);
private Lazy<Image> TinyCommanderYellow { get; } = new Lazy<Image>(Resources.GetTinyIconCommanderYellow);
private Lazy<Image> TinyCommanderGreen { get; } = new Lazy<Image>(Resources.GetTinyIconCommanderGreen);
private Lazy<Image> TinyCommanderCyan { get; } = new Lazy<Image>(Resources.GetTinyIconCommanderCyan);
private Lazy<Image> TinyCommanderBlue { get; } = new Lazy<Image>(Resources.GetTinyIconCommanderBlue);
private Lazy<Image> TinyCommanderPurple { get; } = new Lazy<Image>(Resources.GetTinyIconCommanderPurple);
private Lazy<Image> TinyCommanderPink { get; } = new Lazy<Image>(Resources.GetTinyIconCommanderPink);
private Lazy<Image> TinyCommanderWhite { get; } = new Lazy<Image>(Resources.GetTinyIconCommanderWhite);
private Lazy<Image> TinyCatmanderRed { get; } = new Lazy<Image>(Resources.GetTinyIconCatmanderRed);
private Lazy<Image> TinyCatmanderOrange { get; } = new Lazy<Image>(Resources.GetTinyIconCatmanderOrange);
private Lazy<Image> TinyCatmanderYellow { get; } = new Lazy<Image>(Resources.GetTinyIconCatmanderYellow);
private Lazy<Image> TinyCatmanderGreen { get; } = new Lazy<Image>(Resources.GetTinyIconCatmanderGreen);
private Lazy<Image> TinyCatmanderCyan { get; } = new Lazy<Image>(Resources.GetTinyIconCatmanderCyan);
private Lazy<Image> TinyCatmanderBlue { get; } = new Lazy<Image>(Resources.GetTinyIconCatmanderBlue);
private Lazy<Image> TinyCatmanderPurple { get; } = new Lazy<Image>(Resources.GetTinyIconCatmanderPurple);
private Lazy<Image> TinyCatmanderPink { get; } = new Lazy<Image>(Resources.GetTinyIconCatmanderPink);
private Lazy<Image> TinyCatmanderWhite { get; } = new Lazy<Image>(Resources.GetTinyIconCatmanderWhite);
private Lazy<Image> TinyIconRaidEncounter { get; } = new Lazy<Image>(Resources.GetTinyIconRaidEncounter);
private Lazy<Image> TinyIconTrainingArea { get; } = new Lazy<Image>(Resources.GetTinyIconTrainingArea);
private Lazy<Image> TinyIconWorldVersusWorld { get; } = new Lazy<Image>(Resources.GetTinyIconWorldVersusWorld);
Expand Down Expand Up @@ -241,7 +259,6 @@ public class ImageProvider
public Image GetTinyLogIcon() => TinyIconLog.Value;
public Image GetTinyFractalsIcon() => TinyIconFractals.Value;
public Image GetTinyRaidIcon() => TinyIconRaid.Value;
public Image GetTinyCommanderIcon() => TinyIconCommander.Value;
public Image GetTinyRaidEncounterIcon() => TinyIconRaidEncounter.Value;
public Image GetTinyTrainingAreaIcon() => TinyIconTrainingArea.Value;
public Image GetTinyWorldVersusWorldIcon() => TinyIconWorldVersusWorld.Value;
Expand Down Expand Up @@ -271,6 +288,32 @@ public class ImageProvider
public Image GetWideRaidWing7Icon() => WideRaidWing7Icon.Value;
public Image GetWideRaidWing8Icon() => WideRaidWing8Icon.Value;

public Image GetTinyCommanderIcon(CommanderTags tags)
{
return tags switch
{
CommanderTags.RedCommanderTag => TinyCommanderRed.Value,
CommanderTags.OrangeCommanderTag => TinyCommanderOrange.Value,
CommanderTags.YellowCommanderTag => TinyCommanderYellow.Value,
CommanderTags.GreenCommanderTag => TinyCommanderGreen.Value,
CommanderTags.CyanCommanderTag => TinyCommanderCyan.Value,
CommanderTags.BlueCommanderTag => TinyCommanderBlue.Value,
CommanderTags.PurpleCommanderTag => TinyCommanderPurple.Value,
CommanderTags.PinkCommanderTag => TinyCommanderPink.Value,
CommanderTags.WhiteCommanderTag => TinyCommanderWhite.Value,
CommanderTags.RedCatmanderTag => TinyCatmanderRed.Value,
CommanderTags.OrangeCatmanderTag => TinyCatmanderOrange.Value,
CommanderTags.YellowCatmanderTag => TinyCatmanderYellow.Value,
CommanderTags.GreenCatmanderTag => TinyCatmanderGreen.Value,
CommanderTags.BlueCatmanderTag => TinyCatmanderBlue.Value,
CommanderTags.CyanCatmanderTag => TinyCatmanderCyan.Value,
CommanderTags.PurpleCatmanderTag => TinyCatmanderPurple.Value,
CommanderTags.PinkCatmanderTag => TinyCatmanderPink.Value,
CommanderTags.WhiteCatmanderTag => TinyCatmanderWhite.Value,
_ => throw new ArgumentOutOfRangeException(nameof(tags)),
};
}

public Image GetTinyProfessionIcon(Profession profession)
{
return profession switch
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 35 additions & 13 deletions ArcdpsLogManager/Logs/LogData.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using GW2Scratch.ArcdpsLogManager.Analytics;
using GW2Scratch.ArcdpsLogManager.Logs.Extras;
using GW2Scratch.ArcdpsLogManager.Logs.Tagging;
using GW2Scratch.EVTCAnalytics.Events;
using GW2Scratch.EVTCAnalytics.GameData;
using GW2Scratch.EVTCAnalytics.GameData.Encounters;
using GW2Scratch.EVTCAnalytics.Model.Agents;
using GW2Scratch.EVTCAnalytics.Parsed.Enums;
using GW2Scratch.EVTCAnalytics.Processing.Encounters.Modes;
using GW2Scratch.EVTCAnalytics.Processing.Encounters.Results;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;

namespace GW2Scratch.ArcdpsLogManager.Logs
{
Expand Down Expand Up @@ -273,14 +274,35 @@ public void ProcessLog(LogAnalytics logAnalytics)
HealthPercentage = 0;
}

var tagEvents = log.Events.OfType<AgentMarkerEvent>().Where(x => x.Agent is Player).ToList();
Players = analyzer.GetPlayers().Where(x => x.Identified).Select(p =>
new LogPlayer(p.Name, p.AccountName, p.Subgroup, p.Profession, p.EliteSpecialization,
GetGuildGuid(p.GuildGuid))
List<LogPlayer> logPlayers = [];
var tagEvents = log.Events.OfType<AgentMarkerEvent>().Where(x => x.Agent is Player);
var players = analyzer.GetPlayers().Where(x => x.Identified);
CommanderTags tagType = CommanderTags.RedCommanderTag; // Set a default color
bool tagFound = false;

foreach (var p in players)
{
AgentMarkerEvent tagEvent = null;

if (!tagFound)
{
Tag = tagEvents.Any(e => e.Agent == p && e.IsCommander.GetValueOrDefault(true)) ? PlayerTag.Commander : PlayerTag.None
tagEvent = tagEvents.FirstOrDefault(x => x.Agent == p && CommanderTagGUIDs.Tags.ContainsKey(ContentLocal.GetGuid(x.Marker.ContentGuid)));

if (tagEvent != null && CommanderTagGUIDs.Tags.TryGetValue(ContentLocal.GetGuid(tagEvent.Marker.ContentGuid), out var tag))
{
tagType = tag;
tagFound = true;
}
}
).ToArray();

logPlayers.Add(new LogPlayer(p.Name, p.AccountName, p.Subgroup, p.Profession, p.EliteSpecialization, GetGuildGuid(p.GuildGuid))
{
Tag = tagEvent != null ? PlayerTag.Commander : PlayerTag.None,
TagType = tagType
});
}

Players = [.. logPlayers];

if (log.StartTime != null)
{
Expand Down Expand Up @@ -354,7 +376,7 @@ string GetPart(byte[] bytes, int from, int to)
}

return $"{GetPart(guidBytes, 0, 4)}-{GetPart(guidBytes, 4, 6)}-{GetPart(guidBytes, 6, 8)}" +
$"-{GetPart(guidBytes, 8, 10)}-{GetPart(guidBytes, 10, 16)}";
$"-{GetPart(guidBytes, 8, 10)}-{GetPart(guidBytes, 10, 16)}";
}

public string ShortDurationString
Expand Down
2 changes: 2 additions & 0 deletions ArcdpsLogManager/Logs/LogPlayer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using GW2Scratch.EVTCAnalytics.Model.Agents;
using GW2Scratch.EVTCAnalytics.Parsed.Enums;

namespace GW2Scratch.ArcdpsLogManager.Logs
{
Expand All @@ -11,6 +12,7 @@ public class LogPlayer
public EliteSpecialization EliteSpecialization { get; set; }
public string GuildGuid { get; set; }
public PlayerTag Tag { get; set; }
public CommanderTags TagType { get; set; }

public LogPlayer(string name, string accountName, int subgroup, Profession profession,
EliteSpecialization eliteSpecialization, string guildGuid)
Expand Down
32 changes: 25 additions & 7 deletions ArcdpsLogManager/Resources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,25 @@ public static Icon GetProgramIcon()
public static Image GetTinyIconRaid() => GetImage("ArenaNet.raid_icon_32px.png");
public static Image GetTinyIconFractals() => GetImage("ArenaNet.fractals_icon_32px.png");
public static Image GetTinyIconGuildRegistrar() => GetImage("ArenaNet.guild_registrar_icon_26px.png");
public static Image GetTinyIconCommander() => GetImage("ArenaNet.commander_tag_red_32px.png");
public static Image GetTinyIconCommanderRed() => GetImage("ArenaNet.tags.Commander_tag_(red).png");
public static Image GetTinyIconCommanderOrange() => GetImage("ArenaNet.tags.Commander_tag_(orange).png");
public static Image GetTinyIconCommanderYellow() => GetImage("ArenaNet.tags.Commander_tag_(yellow).png");
public static Image GetTinyIconCommanderCyan() => GetImage("ArenaNet.tags.Commander_tag_(cyan).png");
public static Image GetTinyIconCommanderGreen() => GetImage("ArenaNet.tags.Commander_tag_(green).png");
public static Image GetTinyIconCommanderBlue() => GetImage("ArenaNet.tags.Commander_tag_(blue).png");
public static Image GetTinyIconCommanderPurple() => GetImage("ArenaNet.tags.Commander_tag_(purple).png");
public static Image GetTinyIconCommanderPink() => GetImage("ArenaNet.tags.Commander_tag_(pink).png");
public static Image GetTinyIconCommanderWhite() => GetImage("ArenaNet.tags.Commander_tag_(white).png");
public static Image GetTinyIconCatmanderRed() => GetImage("ArenaNet.tags.Catmander_tag_(red).png");
public static Image GetTinyIconCatmanderOrange() => GetImage("ArenaNet.tags.Catmander_tag_(orange).png");
public static Image GetTinyIconCatmanderYellow() => GetImage("ArenaNet.tags.Catmander_tag_(yellow).png");
public static Image GetTinyIconCatmanderCyan() => GetImage("ArenaNet.tags.Catmander_tag_(cyan).png");
public static Image GetTinyIconCatmanderGreen() => GetImage("ArenaNet.tags.Catmander_tag_(green).png");
public static Image GetTinyIconCatmanderBlue() => GetImage("ArenaNet.tags.Catmander_tag_(blue).png");
public static Image GetTinyIconCatmanderPurple() => GetImage("ArenaNet.tags.Catmander_tag_(purple).png");
public static Image GetTinyIconCatmanderPink() => GetImage("ArenaNet.tags.Catmander_tag_(pink).png");
public static Image GetTinyIconCatmanderWhite() => GetImage("ArenaNet.tags.Catmander_tag_(white).png");

public static Image GetTinyIconRaidEncounter() => GetImage("ArenaNet.raid_encounter_icon_32px.png");
public static Image GetTinyIconTrainingArea() => GetImage("ArenaNet.training_area_32px.png");
public static Image GetTinyIconWorldVersusWorld() => GetImage("ArenaNet.world_vs_world_32px.png");
Expand Down Expand Up @@ -223,12 +241,12 @@ public static Image GetInstabilityImage(string iconName)
public static Image GetMassiveKittyGolemIcon() => GetEncounterImage("Mini_Mister_Mittens");

// WORLD VS WORLD
public static Image GetEternalBattlegroundsIcon() => GetEncounterImage("Commander_tag_yellow");
public static Image GetRedBorderlandsIcon() => GetEncounterImage("Commander_tag_red");
public static Image GetBlueBorderlandsIcon() => GetEncounterImage("Commander_tag_blue");
public static Image GetGreenBorderlandsIcon() => GetEncounterImage("Commander_tag_green");
public static Image GetObsidianSanctumIcon() => GetEncounterImage("Commander_tag_purple");
public static Image GetEdgeOfTheMistsIcon() => GetEncounterImage("Commander_tag_white");
public static Image GetEternalBattlegroundsIcon() => GetTinyIconCommanderYellow();
public static Image GetRedBorderlandsIcon() => GetTinyIconCommanderRed();
public static Image GetBlueBorderlandsIcon() => GetTinyIconCommanderBlue();
public static Image GetGreenBorderlandsIcon() => GetTinyIconCommanderGreen();
public static Image GetObsidianSanctumIcon() => GetTinyIconCommanderPurple();
public static Image GetEdgeOfTheMistsIcon() => GetTinyIconCommanderWhite();
public static Image GetArmisticeBastionIcon() => GetEncounterImage("Armistice_Bastion_Pass");

private static Image GetEncounterImage(string iconName)
Expand Down
16 changes: 15 additions & 1 deletion EVTCAnalytics/Events/LogEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class RewardEvent(long time, ulong rewardId, int rewardType) : Event(time
/// An event specifying the current simulation tick rate.
/// </summary>
/// <remarks>
/// Introduced in arcdps version 20220520.
/// Introduced in arcdps version 20220520. Deprecated in arcdps version 20260627, replaced by <see cref="Tick"/>.
/// </remarks>
public class RateHealthEvent(long time, ulong tickRate) : Event(time)
{
Expand All @@ -29,6 +29,20 @@ public class RateHealthEvent(long time, ulong tickRate) : Event(time)
public ulong TickRate { get; } = tickRate;
}

/// <summary>
/// Event extrapolating the game ticks.
/// </summary>
/// <param name="tickInterpolated">Current extrapolated tick (ticks may go backwards if real update is lower than extrapolation).</param>
/// <param name="ticksSinceLastUpdate">Ticks since last real tick update.</param>
/// <remarks>
/// Introduced in arcdps version 20260627. Replaces <see cref="RateHealthEvent"/>.
/// </remarks>
public class Tick(long time, ulong tickInterpolated, ulong ticksSinceLastUpdate) : Event(time)
{
public ulong TickInterpolated { get; } = tickInterpolated;
public ulong TickSinceLastUpdate { get; } = ticksSinceLastUpdate;
}

/// <summary>
/// Arcdps stats reset event.
/// </summary>
Expand Down
50 changes: 50 additions & 0 deletions EVTCAnalytics/GameData/CommanderTagGUIDs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using GW2Scratch.EVTCAnalytics.Parsed.Enums;

namespace GW2Scratch.EVTCAnalytics.GameData
{
public class CommanderTagGUIDs
{
public static readonly Guid RedCommanderTag = new("4242f370-667c-e54e-b3bf-22be8d06f986");
public static readonly Guid OrangeCommanderTag = new("e57aae9e-e7fc-5d45-8b0c-f16be4b096bf");
public static readonly Guid YellowCommanderTag = new("af9442a2-90c6-2145-96e0-b339eb3bde92");
public static readonly Guid GreenCommanderTag = new("74ad480e-531f-4740-a407-879976c8ca91");
public static readonly Guid CyanCommanderTag = new("96f4ab5c-dec5-2943-8837-5c7a03ab7614");
public static readonly Guid BlueCommanderTag = new("ae714fc5-e4ea-464c-8961-cd78e86f9291");
public static readonly Guid PurpleCommanderTag = new("1993fadb-6fb7-0e43-83a2-23a54d311f7d");
public static readonly Guid PinkCommanderTag = new("e911d8c0-ef2f-df4d-8d25-2e5fb1283c62");
public static readonly Guid WhiteCommanderTag = new("a59678cd-fb57-3243-9d7f-cbf58d8bcec3");
public static readonly Guid RedCatmanderTag = new("ca76ab02-3593-b044-8f69-2fe29df03d17");
public static readonly Guid OrangeCatmanderTag = new("9fdf03e9-ba09-a245-8c1e-dda4d81bc34d");
public static readonly Guid YellowCatmanderTag = new("6bce90e9-9016-b448-969e-b317784a8334");
public static readonly Guid GreenCatmanderTag = new("2ca226e0-7262-c743-ba19-3acf6f9d0af6");
public static readonly Guid CyanCatmanderTag = new("a8072d65-ce35-924b-abba-c831b12019d7");
public static readonly Guid BlueCatmanderTag = new("9b94f0fd-616e-7f4a-a58e-fdc8c59fb689");
public static readonly Guid PurpleCatmanderTag = new("7224a4af-710e-4243-bfe0-32629e17ca6e");
public static readonly Guid PinkCatmanderTag = new("4387be61-46d4-3246-aa7b-333168ea58ea");
public static readonly Guid WhiteCatmanderTag = new("a0b0ec07-6bc8-3b40-a293-c1cdec4a7de7");

public static readonly Dictionary<Guid, CommanderTags> Tags = new()
{
{ RedCommanderTag, CommanderTags.RedCommanderTag },
{ OrangeCommanderTag, CommanderTags.OrangeCommanderTag },
{ YellowCommanderTag, CommanderTags.YellowCommanderTag },
{ GreenCommanderTag, CommanderTags.GreenCommanderTag },
{ CyanCommanderTag, CommanderTags.CyanCommanderTag },
{ BlueCommanderTag, CommanderTags.BlueCommanderTag },
{ PurpleCommanderTag, CommanderTags.PurpleCommanderTag },
{ PinkCommanderTag, CommanderTags.PinkCommanderTag },
{ WhiteCommanderTag, CommanderTags.WhiteCommanderTag },
{ RedCatmanderTag, CommanderTags.RedCatmanderTag },
{ OrangeCatmanderTag, CommanderTags.OrangeCatmanderTag },
{ YellowCatmanderTag, CommanderTags.YellowCatmanderTag },
{ GreenCatmanderTag, CommanderTags.GreenCatmanderTag },
{ CyanCatmanderTag, CommanderTags.CyanCatmanderTag },
{ BlueCatmanderTag, CommanderTags.BlueCatmanderTag },
{ PurpleCatmanderTag, CommanderTags.PurpleCatmanderTag },
{ PinkCatmanderTag, CommanderTags.PinkCatmanderTag },
{ WhiteCatmanderTag, CommanderTags.WhiteCatmanderTag },
};
}
}
19 changes: 18 additions & 1 deletion EVTCAnalytics/Model/Agents/ContentLocal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,29 @@ protected ContentLocal(uint id, byte[] contentGuid)
ContentGuid = contentGuid;
}

public static Guid GetGuid(byte[] content)
{
return new Guid(Reverse(content));
}

private static byte[] Reverse(byte[] content)
{
// Clone the array to not modify the original content sequence
byte[] guid = (byte[]) content.Clone();

Array.Reverse(guid, 0, 4);
Array.Reverse(guid, 4, 2);
Array.Reverse(guid, 6, 2);

return guid;
}

public override string ToString()
{
return $"{Id} ({(ContentGuid != null ? GuidToString(ContentGuid) : "No GUID")})";
}

protected static string GuidToString(byte[] guidBytes)
public static string GuidToString(byte[] guidBytes)
{
string GetPart(byte[] bytes, int from, int to)
{
Expand Down
24 changes: 24 additions & 0 deletions EVTCAnalytics/Parsed/Enums/CommanderTags.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace GW2Scratch.EVTCAnalytics.Parsed.Enums
{
public enum CommanderTags
{
RedCommanderTag,
OrangeCommanderTag,
YellowCommanderTag,
GreenCommanderTag,
CyanCommanderTag,
BlueCommanderTag,
PurpleCommanderTag,
PinkCommanderTag,
WhiteCommanderTag,
RedCatmanderTag,
OrangeCatmanderTag,
YellowCatmanderTag,
GreenCatmanderTag,
CyanCatmanderTag,
BlueCatmanderTag,
PurpleCatmanderTag,
PinkCatmanderTag,
WhiteCatmanderTag,
}
}
3 changes: 2 additions & 1 deletion EVTCAnalytics/Parsed/Enums/StateChange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public enum StateChange : byte
Extension = 40,
ApiDelayed = 41, // Only in realtime API; should not appear in logs
InstanceStart = 42,
TickRate = 43, // Renamed from CBTS_TICKRATE to CBTS_RATEHEALTH in arcdps at some point.
TickRate = 43, // Renamed from CBTS_TICKRATE to CBTS_RATEHEALTH in arcdps at some point. Retired with 20260627, replaced by Tick 84
Last90BeforeDown = 44, // Removed with 20240612; "redundant as healthpercent is part of the limited set"
Effect = 45, // Not used since 20230716
IdToGuid = 46,
Expand Down Expand Up @@ -89,5 +89,6 @@ public enum StateChange : byte
GadgetCaptureSplitPercent = 81, // Added 20260610
GadgetCaptureOutlineHide = 82, // Added 20260610
GadgetCaptureOutlinePoint = 83, // Added 20260612
Tick = 84, // Added 20260627, replaces RateHealth 43
};
}
Loading
Loading