2018-01-30 01:52:21 +00:00
|
|
|
|
namespace PKHeX.Core
|
2017-05-23 04:55:05 +00:00
|
|
|
|
{
|
2018-01-30 01:52:21 +00:00
|
|
|
|
public class SlotChange : StorageSlotOffset
|
2017-05-23 04:55:05 +00:00
|
|
|
|
{
|
2017-06-18 20:02:02 +00:00
|
|
|
|
/// <summary> Parent of the object that initiated the slot change. </summary>
|
2017-06-18 01:37:19 +00:00
|
|
|
|
public object Parent { get; set; }
|
2017-05-23 04:55:05 +00:00
|
|
|
|
|
2017-06-18 20:02:02 +00:00
|
|
|
|
/// <summary> Original Data of the slot. </summary>
|
2017-06-18 01:37:19 +00:00
|
|
|
|
public byte[] OriginalData { get; set; }
|
2017-06-18 20:02:02 +00:00
|
|
|
|
|
2017-06-18 01:37:19 +00:00
|
|
|
|
public int Slot { get; set; } = -1;
|
|
|
|
|
public int Box { get; set; } = -1;
|
|
|
|
|
public PKM PKM { get; set; }
|
2017-05-23 04:55:05 +00:00
|
|
|
|
|
2018-05-05 15:07:22 +00:00
|
|
|
|
public bool IsParty => IsPartyFormat;
|
2017-05-23 04:55:05 +00:00
|
|
|
|
public bool IsValid => Slot > -1 && (Box > -1 || IsParty);
|
2018-05-05 15:07:22 +00:00
|
|
|
|
public bool Editable { get; set; }
|
2018-03-26 02:05:49 +00:00
|
|
|
|
|
|
|
|
|
public SlotChange() { }
|
|
|
|
|
public SlotChange(SlotChange info, SaveFile sav)
|
|
|
|
|
{
|
|
|
|
|
Box = info.Box;
|
|
|
|
|
Slot = info.Slot;
|
|
|
|
|
Offset = info.Offset;
|
|
|
|
|
PKM = sav.GetStoredSlot(info.Offset);
|
|
|
|
|
}
|
2017-05-23 04:55:05 +00:00
|
|
|
|
}
|
2018-01-30 01:52:21 +00:00
|
|
|
|
}
|