mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Add setting of batrev boxname
unused in gui, no wallpapers
This commit is contained in:
parent
199512a9f7
commit
700ce00d8e
1 changed files with 14 additions and 1 deletions
|
@ -172,7 +172,20 @@ namespace PKHeX.Core
|
|||
return str;
|
||||
}
|
||||
|
||||
public override void SetBoxName(int box, string value) { }
|
||||
public override void SetBoxName(int box, string value)
|
||||
{
|
||||
if (BoxName < 0)
|
||||
return;
|
||||
|
||||
int ofs = BoxName + box * BoxNameLength;
|
||||
var str = Encoding.BigEndianUnicode.GetString(Data, ofs, BoxNameLength);
|
||||
str = Util.TrimFromZero(str);
|
||||
if (string.IsNullOrWhiteSpace(str))
|
||||
return;
|
||||
|
||||
var data = Encoding.BigEndianUnicode.GetBytes(value.PadLeft(BoxNameLength / 2, '\0'));
|
||||
SetData(data, ofs);
|
||||
}
|
||||
|
||||
public override PKM GetPKM(byte[] data)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue