mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-02 13:53:42 +01:00
Fix EQDP bug.
This commit is contained in:
parent
ad0c64d4ac
commit
30b32fdcd2
3 changed files with 4 additions and 12 deletions
|
|
@ -38,7 +38,7 @@ public sealed class EqpCache(MetaFileManager manager, ModCollection collection)
|
||||||
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
|
||||||
private EqpEntry GetSingleValue(PrimaryId id, EquipSlot slot)
|
private EqpEntry GetSingleValue(PrimaryId id, EquipSlot slot)
|
||||||
=> TryGetValue(new EqpIdentifier(id, slot), out var pair) ? pair.Entry : ExpandedEqpFile.GetDefault(manager, id) & Eqp.Mask(slot);
|
=> TryGetValue(new EqpIdentifier(id, slot), out var pair) ? pair.Entry : ExpandedEqpFile.GetDefault(Manager, id) & Eqp.Mask(slot);
|
||||||
|
|
||||||
public MetaList.MetaReverter TemporarilySetFile()
|
public MetaList.MetaReverter TemporarilySetFile()
|
||||||
=> Manager.TemporarilySetFile(_eqpFile, MetaIndex.Eqp);
|
=> Manager.TemporarilySetFile(_eqpFile, MetaIndex.Eqp);
|
||||||
|
|
|
||||||
|
|
@ -104,15 +104,11 @@ public unsafe class ExpandedEqpGmpBase : MetaBaseFile
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class ExpandedEqpFile : ExpandedEqpGmpBase, IEnumerable<EqpEntry>
|
public sealed class ExpandedEqpFile(MetaFileManager manager) : ExpandedEqpGmpBase(manager, false), IEnumerable<EqpEntry>
|
||||||
{
|
{
|
||||||
public static readonly CharacterUtility.InternalIndex InternalIndex =
|
public static readonly CharacterUtility.InternalIndex InternalIndex =
|
||||||
CharacterUtility.ReverseIndices[(int)MetaIndex.Eqp];
|
CharacterUtility.ReverseIndices[(int)MetaIndex.Eqp];
|
||||||
|
|
||||||
public ExpandedEqpFile(MetaFileManager manager)
|
|
||||||
: base(manager, false)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
public EqpEntry this[PrimaryId idx]
|
public EqpEntry this[PrimaryId idx]
|
||||||
{
|
{
|
||||||
get => (EqpEntry)GetInternal(idx);
|
get => (EqpEntry)GetInternal(idx);
|
||||||
|
|
@ -147,15 +143,11 @@ public sealed class ExpandedEqpFile : ExpandedEqpGmpBase, IEnumerable<EqpEntry>
|
||||||
=> GetEnumerator();
|
=> GetEnumerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class ExpandedGmpFile : ExpandedEqpGmpBase, IEnumerable<GmpEntry>
|
public sealed class ExpandedGmpFile(MetaFileManager manager) : ExpandedEqpGmpBase(manager, true), IEnumerable<GmpEntry>
|
||||||
{
|
{
|
||||||
public static readonly CharacterUtility.InternalIndex InternalIndex =
|
public static readonly CharacterUtility.InternalIndex InternalIndex =
|
||||||
CharacterUtility.ReverseIndices[(int)MetaIndex.Gmp];
|
CharacterUtility.ReverseIndices[(int)MetaIndex.Gmp];
|
||||||
|
|
||||||
public ExpandedGmpFile(MetaFileManager manager)
|
|
||||||
: base(manager, true)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
public GmpEntry this[PrimaryId idx]
|
public GmpEntry this[PrimaryId idx]
|
||||||
{
|
{
|
||||||
get => new() { Value = GetInternal(idx) };
|
get => new() { Value = GetInternal(idx) };
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ public sealed class EqdpMetaDrawer(ModMetaEditor editor, MetaFileManager metaFil
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
if (Checkmark("Model##eqdp"u8, "\0"u8, entry.Model, defaultEntry.Model, out var newModel))
|
if (Checkmark("Model##eqdp"u8, "\0"u8, entry.Model, defaultEntry.Model, out var newModel))
|
||||||
{
|
{
|
||||||
entry = entry with { Material = newModel };
|
entry = entry with { Model = newModel };
|
||||||
changes = true;
|
changes = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue