mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-02 05:43:42 +01:00
Update for new gamedata.
This commit is contained in:
parent
2585de8b21
commit
c06d5b0871
4 changed files with 8 additions and 10 deletions
|
|
@ -19,8 +19,8 @@ public sealed unsafe class CmpFile : MetaBaseFile
|
|||
|
||||
public float this[SubRace subRace, RspAttribute attribute]
|
||||
{
|
||||
get => *(float*)(Data + RacialScalingStart + ToRspIndex(subRace) * RspEntry.ByteSize + (int)attribute * 4);
|
||||
set => *(float*)(Data + RacialScalingStart + ToRspIndex(subRace) * RspEntry.ByteSize + (int)attribute * 4) = value;
|
||||
get => *(float*)(Data + RacialScalingStart + ToRspIndex(subRace) * RspData.ByteSize + (int)attribute * 4);
|
||||
set => *(float*)(Data + RacialScalingStart + ToRspIndex(subRace) * RspData.ByteSize + (int)attribute * 4) = value;
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
|
|
@ -42,7 +42,7 @@ public sealed unsafe class CmpFile : MetaBaseFile
|
|||
public static float GetDefault(MetaFileManager manager, SubRace subRace, RspAttribute attribute)
|
||||
{
|
||||
var data = (byte*)manager.CharacterUtility.DefaultResource(InternalIndex).Address;
|
||||
return *(float*)(data + RacialScalingStart + ToRspIndex(subRace) * RspEntry.ByteSize + (int)attribute * 4);
|
||||
return *(float*)(data + RacialScalingStart + ToRspIndex(subRace) * RspData.ByteSize + (int)attribute * 4);
|
||||
}
|
||||
|
||||
private static int ToRspIndex(SubRace subRace)
|
||||
|
|
|
|||
|
|
@ -157,12 +157,12 @@ public sealed class ExpandedGmpFile : ExpandedEqpGmpBase, IEnumerable<GmpEntry>
|
|||
|
||||
public GmpEntry this[PrimaryId idx]
|
||||
{
|
||||
get => (GmpEntry)GetInternal(idx);
|
||||
set => SetInternal(idx, (ulong)value);
|
||||
get => new() { Value = GetInternal(idx) };
|
||||
set => SetInternal(idx, value.Value);
|
||||
}
|
||||
|
||||
public static GmpEntry GetDefault(MetaFileManager manager, PrimaryId primaryIdx)
|
||||
=> (GmpEntry)GetDefaultInternal(manager, InternalIndex, primaryIdx, (ulong)GmpEntry.Default);
|
||||
=> new() { Value = GetDefaultInternal(manager, InternalIndex, primaryIdx, GmpEntry.Default.Value) };
|
||||
|
||||
public void Reset(IEnumerable<PrimaryId> entries)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue