Minor style adjustments
This commit is contained in:
parent
85349573d9
commit
c60c929502
@ -1,33 +1,32 @@
|
|||||||
namespace Gearsetter.GameData
|
namespace Gearsetter.GameData;
|
||||||
|
|
||||||
|
internal enum EBaseParam : byte
|
||||||
{
|
{
|
||||||
internal enum EBaseParam : byte
|
Strength = 1,
|
||||||
{
|
Dexterity = 2,
|
||||||
Strength = 1,
|
Vitality = 3,
|
||||||
Dexterity = 2,
|
Intelligence = 4,
|
||||||
Vitality = 3,
|
Mind = 5,
|
||||||
Intelligence = 4,
|
Piety = 6,
|
||||||
Mind = 5,
|
|
||||||
Piety = 6,
|
|
||||||
|
|
||||||
GP = 10,
|
GP = 10,
|
||||||
CP = 11,
|
CP = 11,
|
||||||
|
|
||||||
DamagePhys = 12,
|
DamagePhys = 12,
|
||||||
DamageMag = 13,
|
DamageMag = 13,
|
||||||
|
|
||||||
DefensePhys = 21,
|
DefensePhys = 21,
|
||||||
DefenseMag = 24,
|
DefenseMag = 24,
|
||||||
|
|
||||||
Tenacity = 19,
|
Tenacity = 19,
|
||||||
Crit = 27,
|
Crit = 27,
|
||||||
DirectHit = 22,
|
DirectHit = 22,
|
||||||
Determination = 44,
|
Determination = 44,
|
||||||
SpellSpeed = 46,
|
SpellSpeed = 46,
|
||||||
SkillSpeed = 23,
|
SkillSpeed = 23,
|
||||||
|
|
||||||
Craftsmanship = 70,
|
Craftsmanship = 70,
|
||||||
Control = 71,
|
Control = 71,
|
||||||
Gathering = 72,
|
Gathering = 72,
|
||||||
Perception = 73,
|
Perception = 73,
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -264,7 +264,7 @@ public sealed class GearsetterPlugin : IDalamudPlugin
|
|||||||
})
|
})
|
||||||
.Take(gearsetItem.Length)
|
.Take(gearsetItem.Length)
|
||||||
.ToList();
|
.ToList();
|
||||||
_pluginLog.Information(
|
_pluginLog.Debug(
|
||||||
$"{equipSlotCategory}: {string.Join(" ", currentItems.Select(x => $"{x?.ItemId}|{x?.Hq}"))}");
|
$"{equipSlotCategory}: {string.Join(" ", currentItems.Select(x => $"{x?.ItemId}|{x?.Hq}"))}");
|
||||||
foreach (var currentItem in currentItems)
|
foreach (var currentItem in currentItems)
|
||||||
{
|
{
|
||||||
|
@ -3,33 +3,32 @@ using System.Linq;
|
|||||||
using Gearsetter.GameData;
|
using Gearsetter.GameData;
|
||||||
using Lumina.Excel.GeneratedSheets;
|
using Lumina.Excel.GeneratedSheets;
|
||||||
|
|
||||||
namespace Gearsetter.Model
|
namespace Gearsetter.Model;
|
||||||
{
|
|
||||||
internal sealed class EquipmentStats
|
|
||||||
{
|
|
||||||
private readonly Dictionary<EBaseParam, short> _values;
|
|
||||||
|
|
||||||
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)
|
foreach (var hqstat in item.UnkData73.Select(x =>
|
||||||
.ToDictionary(x => (EBaseParam)x.BaseParam, x => x.BaseParamValue);
|
((EBaseParam)x.BaseParamSpecial, x.BaseParamValueSpecial)))
|
||||||
if (hq)
|
|
||||||
{
|
{
|
||||||
foreach (var hqstat in item.UnkData73.Select(x =>
|
if (_values.TryGetValue(hqstat.Item1, out var stat))
|
||||||
((EBaseParam)x.BaseParamSpecial, x.BaseParamValueSpecial)))
|
_values[hqstat.Item1] = (short)(stat + hqstat.BaseParamValueSpecial);
|
||||||
{
|
else
|
||||||
if (_values.TryGetValue(hqstat.Item1, out var stat))
|
_values[hqstat.Item1] = hqstat.BaseParamValueSpecial;
|
||||||
_values[hqstat.Item1] = (short)(stat + hqstat.BaseParamValueSpecial);
|
|
||||||
else
|
|
||||||
_values[hqstat.Item1] = hqstat.BaseParamValueSpecial;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public short Get(EBaseParam param)
|
public short Get(EBaseParam param)
|
||||||
{
|
{
|
||||||
_values.TryGetValue(param, out short v);
|
_values.TryGetValue(param, out short v);
|
||||||
return v;
|
return v;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,6 +154,7 @@ internal sealed class EquipmentBrowserWindow : Window
|
|||||||
2 => ImGuiColors.ParsedGreen,
|
2 => ImGuiColors.ParsedGreen,
|
||||||
3 => ImGuiColors.ParsedBlue,
|
3 => ImGuiColors.ParsedBlue,
|
||||||
4 => ImGuiColors.ParsedPurple,
|
4 => ImGuiColors.ParsedPurple,
|
||||||
|
7 => ImGuiColors.ParsedPink,
|
||||||
_ => null,
|
_ => null,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user