mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-28 11:15:01 -05:00
Number fused slots, check backing byte[] for slot find
This commit is contained in:
@@ -165,8 +165,8 @@ private static List<SlotInfoMisc> GetExtraSlots8(ISaveBlock8Main sav)
|
||||
var list = new List<SlotInfoMisc>
|
||||
{
|
||||
new SlotInfoMisc(fused.Data, 0, Fused8.GetFusedSlotOffset(0), true) {Type = StorageSlotType.Fused},
|
||||
new SlotInfoMisc(fused.Data, 0, Fused8.GetFusedSlotOffset(1), true) {Type = StorageSlotType.Fused},
|
||||
new SlotInfoMisc(fused.Data, 0, Fused8.GetFusedSlotOffset(2), true) {Type = StorageSlotType.Fused},
|
||||
new SlotInfoMisc(fused.Data, 1, Fused8.GetFusedSlotOffset(1), true) {Type = StorageSlotType.Fused},
|
||||
new SlotInfoMisc(fused.Data, 2, Fused8.GetFusedSlotOffset(2), true) {Type = StorageSlotType.Fused},
|
||||
|
||||
new SlotInfoMisc(dc.Data, 0, Daycare8.GetDaycareSlotOffset(0, 0)) {Type = StorageSlotType.Daycare},
|
||||
new SlotInfoMisc(dc.Data, 0, Daycare8.GetDaycareSlotOffset(0, 1)) {Type = StorageSlotType.Daycare},
|
||||
@@ -177,7 +177,7 @@ private static List<SlotInfoMisc> GetExtraSlots8(ISaveBlock8Main sav)
|
||||
if (sav is SAV8SWSH s8 && s8.SaveRevision >= 2)
|
||||
{
|
||||
var block = s8.Blocks.GetBlockSafe(SaveBlockAccessor8SWSH.KFusedCalyrex);
|
||||
var c = new SlotInfoMisc(block.Data, 0, 0, true) {Type = StorageSlotType.Fused};
|
||||
var c = new SlotInfoMisc(block.Data, 3, 0, true) {Type = StorageSlotType.Fused};
|
||||
list.Insert(3, c);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ public PKM Read(SaveFile sav)
|
||||
return PartyFormat ? sav.GetPartySlot(Data, Offset) : sav.GetStoredSlot(Data, Offset);
|
||||
}
|
||||
|
||||
private bool Equals(SlotInfoMisc other) => Offset == other.Offset;
|
||||
private bool Equals(SlotInfoMisc other) => Offset == other.Offset && Data == other.Data;
|
||||
public bool Equals(ISlotInfo other) => other is SlotInfoMisc p && Equals(p);
|
||||
public override bool Equals(object obj) => obj is SlotInfoMisc p && Equals(p);
|
||||
public override int GetHashCode() => Offset;
|
||||
|
||||
Reference in New Issue
Block a user