Number fused slots, check backing byte[] for slot find

This commit is contained in:
Kurt 2020-11-01 18:40:10 -08:00
parent a2fb9c48eb
commit db71d689b2
2 changed files with 4 additions and 4 deletions

View file

@ -165,8 +165,8 @@ namespace PKHeX.Core
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 @@ namespace PKHeX.Core
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);
}

View file

@ -44,7 +44,7 @@ namespace PKHeX.Core
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;