PKHeX/PKHeX.Core/Saves/Storage/SlotChange.cs
Kurt 99a4c55579 Relocate some logic to core
party stats set when setting a slot to a save file
simplify set/delete slotchange duplicate logic
suggest better met locations beyond VC transfers
hatching a gen6 egg applies memories automatically
2018-03-25 19:05:49 -07:00

27 lines
No EOL
827 B
C#

namespace PKHeX.Core
{
public class SlotChange : StorageSlotOffset
{
/// <summary> Parent of the object that initiated the slot change. </summary>
public object Parent { get; set; }
/// <summary> Original Data of the slot. </summary>
public byte[] OriginalData { get; set; }
public int Slot { get; set; } = -1;
public int Box { get; set; } = -1;
public PKM PKM { get; set; }
public bool IsParty => 30 <= Slot && Slot < 36;
public bool IsValid => Slot > -1 && (Box > -1 || IsParty);
public SlotChange() { }
public SlotChange(SlotChange info, SaveFile sav)
{
Box = info.Box;
Slot = info.Slot;
Offset = info.Offset;
PKM = sav.GetStoredSlot(info.Offset);
}
}
}