mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-03 01:09:18 +00:00
b81a1e1e29
Increase abstraction for arbitrary slot get/set operations, and fracture SAV4 behavior for each game type. Adds: Undo/Redo of party slot changes Fixes: Fixed Gen5 daycare slot 2 reading, and EXP reading Fixes: Some slot color glitchiness Fixed: Box layout editor now hides the flag label if no flags are present Fixed: Gen7 box flags are now shown (unknown purpose lol) Changed: savefile objects are generally smaller (removed a few shared offset fields)
25 lines
No EOL
1.1 KiB
C#
25 lines
No EOL
1.1 KiB
C#
namespace PKHeX.Core
|
|
{
|
|
public abstract class Mail
|
|
{
|
|
protected byte[] Data;
|
|
protected int DataOffset;
|
|
public virtual void CopyTo(SaveFile sav) => sav.SetData(Data, DataOffset);
|
|
public virtual void CopyTo(PK4 pk4) { }
|
|
public virtual void CopyTo(PK5 pk5) { }
|
|
public virtual string GetMessage(bool isLastLine) => null;
|
|
public virtual ushort GetMessage(int index1, int index2) => 0;
|
|
public virtual void SetMessage(string line1, string line2) { }
|
|
public virtual void SetMessage(int index1, int index2, ushort value) { }
|
|
public virtual string AuthorName { get; set; }
|
|
public virtual ushort AuthorTID { get; set; }
|
|
public virtual ushort AuthorSID { get; set; }
|
|
public virtual byte AuthorVersion { get; set; }
|
|
public virtual byte AuthorLanguage { get; set; }
|
|
public virtual byte AuthorGender { get; set; }
|
|
public virtual int AppearPKM { get; set; }
|
|
public virtual int MailType { get; set; }
|
|
public abstract bool? IsEmpty { get; } // true: empty, false: legal mail, null: illegal mail
|
|
public virtual void SetBlank() { }
|
|
}
|
|
} |