Minor style adjustments

master
Liza 2024-06-18 01:06:37 +02:00
parent 85349573d9
commit c60c929502
Signed by: liza
GPG Key ID: 7199F8D727D55F67
4 changed files with 48 additions and 49 deletions

View File

@ -1,33 +1,32 @@
namespace Gearsetter.GameData
namespace Gearsetter.GameData;
internal enum EBaseParam : byte
{
internal enum EBaseParam : byte
{
Strength = 1,
Dexterity = 2,
Vitality = 3,
Intelligence = 4,
Mind = 5,
Piety = 6,
Strength = 1,
Dexterity = 2,
Vitality = 3,
Intelligence = 4,
Mind = 5,
Piety = 6,
GP = 10,
CP = 11,
GP = 10,
CP = 11,
DamagePhys = 12,
DamageMag = 13,
DamagePhys = 12,
DamageMag = 13,
DefensePhys = 21,
DefenseMag = 24,
DefensePhys = 21,
DefenseMag = 24,
Tenacity = 19,
Crit = 27,
DirectHit = 22,
Determination = 44,
SpellSpeed = 46,
SkillSpeed = 23,
Tenacity = 19,
Crit = 27,
DirectHit = 22,
Determination = 44,
SpellSpeed = 46,
SkillSpeed = 23,
Craftsmanship = 70,
Control = 71,
Gathering = 72,
Perception = 73,
}
Craftsmanship = 70,
Control = 71,
Gathering = 72,
Perception = 73,
}

View File

@ -264,7 +264,7 @@ public sealed class GearsetterPlugin : IDalamudPlugin
})
.Take(gearsetItem.Length)
.ToList();
_pluginLog.Information(
_pluginLog.Debug(
$"{equipSlotCategory}: {string.Join(" ", currentItems.Select(x => $"{x?.ItemId}|{x?.Hq}"))}");
foreach (var currentItem in currentItems)
{

View File

@ -3,33 +3,32 @@ using System.Linq;
using Gearsetter.GameData;
using Lumina.Excel.GeneratedSheets;
namespace Gearsetter.Model
{
internal sealed class EquipmentStats
{
private readonly Dictionary<EBaseParam, short> _values;
namespace Gearsetter.Model;
public EquipmentStats(Item item, bool hq)
internal sealed class EquipmentStats
{
private readonly Dictionary<EBaseParam, short> _values;
public EquipmentStats(Item item, bool hq)
{
_values = item.UnkData59.Where(x => x.BaseParam > 0)
.ToDictionary(x => (EBaseParam)x.BaseParam, x => x.BaseParamValue);
if (hq)
{
_values = item.UnkData59.Where(x => x.BaseParam > 0)
.ToDictionary(x => (EBaseParam)x.BaseParam, x => x.BaseParamValue);
if (hq)
foreach (var hqstat in item.UnkData73.Select(x =>
((EBaseParam)x.BaseParamSpecial, x.BaseParamValueSpecial)))
{
foreach (var hqstat in item.UnkData73.Select(x =>
((EBaseParam)x.BaseParamSpecial, x.BaseParamValueSpecial)))
{
if (_values.TryGetValue(hqstat.Item1, out var stat))
_values[hqstat.Item1] = (short)(stat + hqstat.BaseParamValueSpecial);
else
_values[hqstat.Item1] = hqstat.BaseParamValueSpecial;
}
if (_values.TryGetValue(hqstat.Item1, out var stat))
_values[hqstat.Item1] = (short)(stat + hqstat.BaseParamValueSpecial);
else
_values[hqstat.Item1] = hqstat.BaseParamValueSpecial;
}
}
}
public short Get(EBaseParam param)
{
_values.TryGetValue(param, out short v);
return v;
}
public short Get(EBaseParam param)
{
_values.TryGetValue(param, out short v);
return v;
}
}

View File

@ -154,6 +154,7 @@ internal sealed class EquipmentBrowserWindow : Window
2 => ImGuiColors.ParsedGreen,
3 => ImGuiColors.ParsedBlue,
4 => ImGuiColors.ParsedPurple,
7 => ImGuiColors.ParsedPink,
_ => null,
};