Skip to content

Commit

Permalink
Use profession abbreviations used by community in character lists
Browse files Browse the repository at this point in the history
  • Loading branch information
Plenyx committed Feb 26, 2024
1 parent 9ac1791 commit 26d4fe7
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion DpsReport/ExtraJSON/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,53 @@ internal sealed class Player
[JsonProperty("profession")]
internal string Profession { get; set; }

internal string ProfessionShort => (!string.IsNullOrWhiteSpace(Profession) && Profession.Length > 2) ? Profession[..3] : "";
internal string ProfessionShort
{
get
{
if ("Soulbeast".Equals(Profession))
{
return "Slb";
}
if ("Specter".Equals(Profession))
{
return "Spec";
}
if ("Bladesworn".Equals(Profession))
{
return "BS";
}
if ("Spellbreaker".Equals(Profession))
{
return "Spb";
}
if ("Engineer".Equals(Profession))
{
return "Engi";
}
if ("Dragonhunter".Equals(Profession))
{
return "DH";
}
if ("Holosmith".Equals(Profession))
{
return "Holo";
}
if ("Willbender".Equals(Profession))
{
return "WB";
}
if ("Mechanist".Equals(Profession))
{
return "Mech";
}
if ("Virtuoso".Equals(Profession))
{
return "Virt";
}
return (!string.IsNullOrWhiteSpace(Profession) && Profession.Length > 2) ? Profession[..3] : "";
}
}

[JsonProperty("friendlyNPC")]
internal bool FriendlyNpc { get; set; }
Expand Down

0 comments on commit 26d4fe7

Please sign in to comment.