mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-23 23:14:20 -05:00
Add setting of batrev boxname
unused in gui, no wallpapers
This commit is contained in:
@@ -172,7 +172,20 @@ public override string GetBoxName(int box)
|
||||
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user