mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 16:48:01 +00:00
Fix mystery gift album manipulation
Add gift cloning \u3000 (jp space) replaced with international space Add type name retrieval for easy property
This commit is contained in:
parent
2116d528e4
commit
98389d05df
1 changed files with 8 additions and 1 deletions
|
@ -45,6 +45,13 @@ namespace PKHeX
|
|||
public virtual byte[] Data { get; set; }
|
||||
public abstract PKM convertToPKM(SaveFile SAV);
|
||||
|
||||
public MysteryGift Clone()
|
||||
{
|
||||
byte[] data = (byte[])Data.Clone();
|
||||
return getMysteryGift(data);
|
||||
}
|
||||
public string Type => GetType().Name;
|
||||
|
||||
// Properties
|
||||
public abstract bool GiftUsed { get; set; }
|
||||
public abstract string CardTitle { get; set; }
|
||||
|
@ -57,6 +64,6 @@ namespace PKHeX
|
|||
public virtual int Quantity { get { return 1; } set { } }
|
||||
public bool Empty => Data.SequenceEqual(new byte[Data.Length]);
|
||||
|
||||
public string getCardHeader() => (CardID > 0 ? $"Card #: {CardID.ToString("0000")}" : "N/A") + $" - {CardTitle.Trim()}" + Environment.NewLine;
|
||||
public string getCardHeader() => (CardID > 0 ? $"Card #: {CardID.ToString("0000")}" : "N/A") + $" - {CardTitle.Replace('\u3000',' ').Trim()}" + Environment.NewLine;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue