Skip to content

Commit

Permalink
Properly update plugin for Dawntrail
Browse files Browse the repository at this point in the history
  • Loading branch information
MidoriKami committed Jul 14, 2024
1 parent efc5b96 commit 2ba2277
Show file tree
Hide file tree
Showing 28 changed files with 799 additions and 1,270 deletions.
6 changes: 2 additions & 4 deletions ZodiacBuddy/BonusLight/BonusLightConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ namespace ZodiacBuddy.BonusLight;
/// <summary>
/// Configuration class for Nexus relic.
/// </summary>
public class BonusLightConfiguration
{
public class BonusLightConfiguration {
/// <summary>
/// Gets the list of Territory Id of duty with bonus of light.
/// </summary>
[JsonIgnore]
public List<uint> ActiveBonus { get; } = new();
[JsonIgnore] public List<uint> ActiveBonus { get; } = [];

/// <summary>
/// Gets or sets a value indicating whether to display the current duty with light bonus on the Novus information window.
Expand Down
159 changes: 78 additions & 81 deletions ZodiacBuddy/BonusLight/BonusLightDuty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,103 +8,100 @@ namespace ZodiacBuddy.BonusLight;
/// <summary>
/// Define a duty susceptible to have the light bonus.
/// </summary>
public class BonusLightDuty
{
public class BonusLightDuty {
// key: Territory ID
private static readonly Dictionary<uint, BonusLightDuty> Dataset = new()
{
private static readonly Dictionary<uint, BonusLightDuty> Dataset = new() {
#pragma warning disable format,SA1008,SA1025
// Hard Trials and Urth's Fount
{ 292, new( 292, 16) }, // the Bowl of Embers (Hard)
{ 294, new( 294, 16) }, // the Howling Eye (Hard)
{ 293, new( 293, 16) }, // the Navel (Hard)
{ 207, new( 207, 16) }, // Thornmarch (Hard)
{ 281, new( 281, 16) }, // the Whorleater (Hard)
{ 374, new( 374, 16) }, // the Striking Tree (Hard)
{ 377, new( 377, 16) }, // the Akh Afah Amphitheatre (Hard)
{ 394, new( 394, 16) }, // Urth's Fount
{ 1048, new(1048, 16) }, // The Porta Decumana
{ 292, new BonusLightDuty( 292, 16) }, // the Bowl of Embers (Hard)
{ 294, new BonusLightDuty( 294, 16) }, // the Howling Eye (Hard)
{ 293, new BonusLightDuty( 293, 16) }, // the Navel (Hard)
{ 207, new BonusLightDuty( 207, 16) }, // Thornmarch (Hard)
{ 281, new BonusLightDuty( 281, 16) }, // the Whorleater (Hard)
{ 374, new BonusLightDuty( 374, 16) }, // the Striking Tree (Hard)
{ 377, new BonusLightDuty( 377, 16) }, // the Akh Afah Amphitheatre (Hard)
{ 394, new BonusLightDuty( 394, 16) }, // Urth's Fount
{ 1048, new BonusLightDuty(1048, 16) }, // The Porta Decumana

// Raids
{ 241, new(241, 32) }, // the Binding Coil of Bahamut - Turn 1
{ 242, new(242, 32) }, // the Binding Coil of Bahamut - Turn 2
{ 244, new(244, 16) }, // the Binding Coil of Bahamut - Turn 4
{ 245, new(245, 32) }, // the Binding Coil of Bahamut - Turn 5
{ 355, new(355, 32) }, // the Second Coil of Bahamut - Turn 1
{ 356, new(356, 32) }, // the Second Coil of Bahamut - Turn 2
{ 357, new(357, 32) }, // the Second Coil of Bahamut - Turn 3
{ 358, new(358, 32) }, // the Second Coil of Bahamut - Turn 4
{ 380, new(380, 32) }, // the Second Coil of Bahamut (Savage) - Turn 1
{ 381, new(381, 32) }, // the Second Coil of Bahamut (Savage) - Turn 2
{ 382, new(382, 32) }, // the Second Coil of Bahamut (Savage) - Turn 3
{ 383, new(383, 32) }, // the Second Coil of Bahamut (Savage) - Turn 4
{ 193, new(193, 32) }, // the Final Coil of Bahamut - Turn 1
{ 194, new(194, 32) }, // the Final Coil of Bahamut - Turn 2
{ 195, new(195, 32) }, // the Final Coil of Bahamut - Turn 3
{ 196, new(196, 32) }, // the Final Coil of Bahamut - Turn 4
{ 241, new BonusLightDuty(241, 32) }, // the Binding Coil of Bahamut - Turn 1
{ 242, new BonusLightDuty(242, 32) }, // the Binding Coil of Bahamut - Turn 2
{ 244, new BonusLightDuty(244, 16) }, // the Binding Coil of Bahamut - Turn 4
{ 245, new BonusLightDuty(245, 32) }, // the Binding Coil of Bahamut - Turn 5
{ 355, new BonusLightDuty(355, 32) }, // the Second Coil of Bahamut - Turn 1
{ 356, new BonusLightDuty(356, 32) }, // the Second Coil of Bahamut - Turn 2
{ 357, new BonusLightDuty(357, 32) }, // the Second Coil of Bahamut - Turn 3
{ 358, new BonusLightDuty(358, 32) }, // the Second Coil of Bahamut - Turn 4
{ 380, new BonusLightDuty(380, 32) }, // the Second Coil of Bahamut (Savage) - Turn 1
{ 381, new BonusLightDuty(381, 32) }, // the Second Coil of Bahamut (Savage) - Turn 2
{ 382, new BonusLightDuty(382, 32) }, // the Second Coil of Bahamut (Savage) - Turn 3
{ 383, new BonusLightDuty(383, 32) }, // the Second Coil of Bahamut (Savage) - Turn 4
{ 193, new BonusLightDuty(193, 32) }, // the Final Coil of Bahamut - Turn 1
{ 194, new BonusLightDuty(194, 32) }, // the Final Coil of Bahamut - Turn 2
{ 195, new BonusLightDuty(195, 32) }, // the Final Coil of Bahamut - Turn 3
{ 196, new BonusLightDuty(196, 32) }, // the Final Coil of Bahamut - Turn 4

// Extreme Trials
{ 348, new(348, 16) }, // the Minstrel's Ballad: Ultima's Bane
{ 295, new(295, 32) }, // the Bowl of Embers (Extreme)
{ 297, new(297, 16) }, // the Howling Eye (Extreme)
{ 296, new(296, 32) }, // the Navel (Extreme)
{ 364, new(364, 32) }, // Thornmarch (Extreme)
{ 359, new(359, 32) }, // the Whorleater (Extreme)
{ 375, new(375, 32) }, // the Striking Tree (Extreme)
{ 378, new(378, 32) }, // the Akh Afah Amphitheatre (Extreme)
{ 348, new BonusLightDuty(348, 16) }, // the Minstrel's Ballad: Ultima's Bane
{ 295, new BonusLightDuty(295, 32) }, // the Bowl of Embers (Extreme)
{ 297, new BonusLightDuty(297, 16) }, // the Howling Eye (Extreme)
{ 296, new BonusLightDuty(296, 32) }, // the Navel (Extreme)
{ 364, new BonusLightDuty(364, 32) }, // Thornmarch (Extreme)
{ 359, new BonusLightDuty(359, 32) }, // the Whorleater (Extreme)
{ 375, new BonusLightDuty(375, 32) }, // the Striking Tree (Extreme)
{ 378, new BonusLightDuty(378, 32) }, // the Akh Afah Amphitheatre (Extreme)

// Dungeons
{ 1036, new(1036, 48) }, // Sastasha
{ 1037, new(1037, 48) }, // The Tam-Tara Deepcroft
{ 1038, new(1038, 48) }, // Copperbell Mines
{ 162, new( 162, 48) }, // Halatali
{ 1039, new(1039, 48) }, // The Thousand Maws of Toto-Rak
{ 1040, new(1040, 48) }, // Haukke Manor
{ 1041, new(1041, 48) }, // Brayflox's Longstop
{ 163, new( 163, 48) }, // The Sunken Temple of Qarn
{ 170, new( 170, 48) }, // Cutter's Cry
{ 1042, new(1042, 48) }, // Stone Vigil
{ 171, new( 171, 48) }, // Dzemael Darkhold
{ 172, new( 172, 48) }, // Aurum Vale
{ 159, new( 159, 48) }, // the Wanderer's Palace
{ 1043, new(1043, 48) }, // Castrum Meridianum
{ 1044, new(1044, 48) }, // the Praetorium
{ 167, new( 167, 48) }, // Amdapor Keep
{ 160, new( 160, 48) }, // Pharos Sirius
{ 349, new( 349, 48) }, // Copperbell Mines (Hard)
{ 350, new( 350, 48) }, // Haukke Manor (Hard)
{ 363, new( 363, 48) }, // the Lost City of Amdapor
{ 360, new( 360, 48) }, // Halatali (Hard)
{ 362, new( 362, 32) }, // Brayflox's Longstop (Hard)
{ 361, new( 361, 48) }, // Hullbreaker Isle
{ 373, new( 373, 48) }, // the Tam–Tara Deepcroft (Hard)
{ 365, new( 365, 48) }, // the Stone Vigil (Hard)
{ 371, new( 371, 48) }, // Snowcloak
{ 387, new( 387, 48) }, // Sastasha (Hard)
{ 367, new( 367, 48) }, // the Sunken Temple of Qarn (Hard)
{ 150, new( 150, 48) }, // the Keeper of the Lake
{ 188, new( 188, 48) }, // the Wanderer's Palace (Hard)
{ 189, new( 189, 48) }, // Amdapor Keep (Hard)
{ 1036, new BonusLightDuty(1036, 48) }, // Sastasha
{ 1037, new BonusLightDuty(1037, 48) }, // The Tam-Tara Deepcroft
{ 1038, new BonusLightDuty(1038, 48) }, // Copperbell Mines
{ 162, new BonusLightDuty( 162, 48) }, // Halatali
{ 1039, new BonusLightDuty(1039, 48) }, // The Thousand Maws of Toto-Rak
{ 1040, new BonusLightDuty(1040, 48) }, // Haukke Manor
{ 1041, new BonusLightDuty(1041, 48) }, // Brayflox's Longstop
{ 163, new BonusLightDuty( 163, 48) }, // The Sunken Temple of Qarn
{ 170, new BonusLightDuty( 170, 48) }, // Cutter's Cry
{ 1042, new BonusLightDuty(1042, 48) }, // Stone Vigil
{ 171, new BonusLightDuty( 171, 48) }, // Dzemael Darkhold
{ 172, new BonusLightDuty( 172, 48) }, // Aurum Vale
{ 159, new BonusLightDuty( 159, 48) }, // the Wanderer's Palace
{ 1043, new BonusLightDuty(1043, 48) }, // Castrum Meridianum
{ 1044, new BonusLightDuty(1044, 48) }, // the Praetorium
{ 167, new BonusLightDuty( 167, 48) }, // Amdapor Keep
{ 160, new BonusLightDuty( 160, 48) }, // Pharos Sirius
{ 349, new BonusLightDuty( 349, 48) }, // Copperbell Mines (Hard)
{ 350, new BonusLightDuty( 350, 48) }, // Haukke Manor (Hard)
{ 363, new BonusLightDuty( 363, 48) }, // the Lost City of Amdapor
{ 360, new BonusLightDuty( 360, 48) }, // Halatali (Hard)
{ 362, new BonusLightDuty( 362, 32) }, // Brayflox's Longstop (Hard)
{ 361, new BonusLightDuty( 361, 48) }, // Hullbreaker Isle
{ 373, new BonusLightDuty( 373, 48) }, // the Tam–Tara Deepcroft (Hard)
{ 365, new BonusLightDuty( 365, 48) }, // the Stone Vigil (Hard)
{ 371, new BonusLightDuty( 371, 48) }, // Snowcloak
{ 387, new BonusLightDuty( 387, 48) }, // Sastasha (Hard)
{ 367, new BonusLightDuty( 367, 48) }, // the Sunken Temple of Qarn (Hard)
{ 150, new BonusLightDuty( 150, 48) }, // the Keeper of the Lake
{ 188, new BonusLightDuty( 188, 48) }, // the Wanderer's Palace (Hard)
{ 189, new BonusLightDuty( 189, 48) }, // Amdapor Keep (Hard)

// PVP
{ 376, new(376, 48) }, // The Borderland Ruins (Secure)
{ 376, new BonusLightDuty(376, 48) }, // The Borderland Ruins (Secure)

// Alliance Raids
{ 151, new(151, 96) }, // The World of Darkness
{ 174, new(174, 48) }, // Labyrinth of the Ancients
{ 372, new(372, 96) }, // Syrcus Tower
{ 151, new BonusLightDuty(151, 96) }, // The World of Darkness
{ 174, new BonusLightDuty(174, 48) }, // Labyrinth of the Ancients
{ 372, new BonusLightDuty(372, 96) }, // Syrcus Tower
#pragma warning restore format,SA1008,SA1025
};

private BonusLightDuty(uint territoryId, uint defaultLightIntensity)
{
private BonusLightDuty(uint territoryId, uint defaultLightIntensity) {
this.DefaultLightIntensity = defaultLightIntensity;

this.DutyName = Service.DataManager.Excel.GetSheet<TerritoryType>()!
.GetRow(territoryId)!
.ContentFinderCondition.Value!.Name
.ToDalamudString()
.ToString()!;
.ToString();
}

/// <summary>
Expand All @@ -120,17 +117,17 @@ private BonusLightDuty(uint territoryId, uint defaultLightIntensity)
/// <summary>
/// Gets the value associated with the specified key.
/// </summary>
/// <param name="territoryID">Territory ID.</param>
/// <param name="territoryId">Territory ID.</param>
/// <returns>Novus duty data.</returns>
public static BonusLightDuty GetValue(uint territoryID)
=> Dataset[territoryID];
public static BonusLightDuty GetValue(uint territoryId)
=> Dataset[territoryId];

/// <summary>
/// Gets the value associated with the specified key.
/// </summary>
/// <param name="territoryID">Territory ID.</param>
/// <param name="territoryId">Territory ID.</param>
/// <param name="duty">Novus duty data.</param>
/// <returns>True if the duty was found, otherwise false.</returns>
public static bool TryGetValue(uint territoryID, out BonusLightDuty? duty)
=> Dataset.TryGetValue(territoryID, out duty);
public static bool TryGetValue(uint territoryId, out BonusLightDuty? duty)
=> Dataset.TryGetValue(territoryId, out duty);
}
6 changes: 2 additions & 4 deletions ZodiacBuddy/BonusLight/BonusLightLevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ namespace ZodiacBuddy.BonusLight;
/// <summary>
/// Define the quantity of light gain and it's log message.
/// </summary>
public class BonusLightLevel
{
public class BonusLightLevel {
/// <summary>
/// Initializes a new instance of the <see cref="BonusLightLevel"/> class.
/// </summary>
/// <param name="intensity">Light intensity.</param>
/// <param name="rowId">Log messageID.</param>
public BonusLightLevel(uint intensity, uint rowId)
{
public BonusLightLevel(uint intensity, uint rowId) {
this.Intensity = intensity;
this.Message = Service.DataManager.Excel.GetSheet<LogMessage>()!
.GetRow(rowId)!
Expand Down
Loading

0 comments on commit 2ba2277

Please sign in to comment.