Skip to content

Commit

Permalink
[PR] New Release
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfcomp authored Nov 15, 2024
2 parents a397321 + b6d57c9 commit b085085
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
13 changes: 7 additions & 6 deletions DeepDungeonDex/Weather/WeatherManager.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using FFXIVClientStructs.FFXIV.Client.System.Framework;
using Lumina.Excel.GeneratedSheets;
using Lumina.Excel.Sheets;

namespace DeepDungeonDex.Weather;
public class WeatherManager : IDisposable
Expand All @@ -20,7 +20,7 @@ public string GetWeatherName(uint weatherId)
if (_weatherNames.TryGetValue(weatherId, out var name))
return name;

name = _data.GetExcelSheet<Lumina.Excel.GeneratedSheets.Weather>()!.FirstOrDefault(t => t.RowId == weatherId)!.Name.ToString();
name = _data.GetExcelSheet<Lumina.Excel.Sheets.Weather>()!.FirstOrDefault(t => t.RowId == weatherId)!.Name.ToString();
_weatherNames[weatherId] = name;

return name;
Expand All @@ -31,7 +31,7 @@ public int GetWeatherIconId(uint weatherId)
if (_weatherIcons.TryGetValue(weatherId, out var iconId))
return iconId;

iconId = _data.GetExcelSheet<Lumina.Excel.GeneratedSheets.Weather>()!.FirstOrDefault(t => t.RowId == weatherId)!.Icon;
iconId = _data.GetExcelSheet<Lumina.Excel.Sheets.Weather>()!.FirstOrDefault(t => t.RowId == weatherId)!.Icon;
_weatherIcons[weatherId] = iconId;

return iconId;
Expand All @@ -40,12 +40,13 @@ public int GetWeatherIconId(uint weatherId)
public void BuildWeatherRates(uint weatherRateId)
{
var rates = new List<(uint id, byte rate)>();
foreach (var weatherRate in _data.GetExcelSheet<WeatherRate>()!.Where(t => t.RowId == weatherRateId).SelectMany(t => t.UnkData0))
var weatherRate = _data.GetExcelSheet<WeatherRate>().GetRow(weatherRateId);
for (var i = 0; i < weatherRate.Rate.Count; i++)
{
if (weatherRate.Weather == 0)
if (weatherRate.Weather[i].RowId == 0)
break;
var (_, prevRate) = rates.LastOrDefault();
rates.Add(((uint)weatherRate.Weather, (byte)(weatherRate.Rate + prevRate)));
rates.Add((weatherRate.Weather[i].RowId, (byte)(weatherRate.Rate[i] + prevRate)));
}
_weatherRates[weatherRateId] = rates.ToArray();
}
Expand Down
6 changes: 3 additions & 3 deletions DeepDungeonDex/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"net8.0-windows7.0": {
"DalamudPackager": {
"type": "Direct",
"requested": "[2.1.13, )",
"resolved": "2.1.13",
"contentHash": "rMN1omGe8536f4xLMvx9NwfvpAc9YFFfeXJ1t4P4PE6Gu8WCIoFliR1sh07hM+bfODmesk/dvMbji7vNI+B/pQ=="
"requested": "[11.0.0, )",
"resolved": "11.0.0",
"contentHash": "bjT7XUlhIJSmsE/O76b7weUX+evvGQctbQB8aKXt94o+oPWxHpCepxAGMs7Thow3AzCyqWs7cOpp9/2wcgRRQA=="
},
"Microsoft.Extensions.DependencyInjection": {
"type": "Direct",
Expand Down
2 changes: 1 addition & 1 deletion DeepDungeonDexConsole/data
Submodule data updated 1 files
+1 −0 DD/EO/51-100.yml

0 comments on commit b085085

Please sign in to comment.