//写入种族值 public static void WriteBreedValue(int num, BreedValue bv) { long offset = OFFSET_Poke + 0x1C * num; Util.WriteByte(Rom.filePath, offset + 00L, bv.HP); Util.WriteByte(Rom.filePath, offset + 01L, bv.ATK); Util.WriteByte(Rom.filePath, offset + 02L, bv.DEF); Util.WriteByte(Rom.filePath, offset + 03L, bv.SPEED); Util.WriteByte(Rom.filePath, offset + 04L, bv.SPATK); Util.WriteByte(Rom.filePath, offset + 05L, bv.SPDEF); }
//读取种族值 public static BreedValue ReadBreedValue(int num) { long offset = OFFSET_Poke + 0x1C * num; BreedValue bv = new BreedValue(); bv.HP = Util.ReadByte(Rom.filePath, offset + 00L); bv.ATK = Util.ReadByte(Rom.filePath, offset + 01L); bv.DEF = Util.ReadByte(Rom.filePath, offset + 02L); bv.SPEED = Util.ReadByte(Rom.filePath, offset + 03L); bv.SPATK = Util.ReadByte(Rom.filePath, offset + 04L); bv.SPDEF = Util.ReadByte(Rom.filePath, offset + 05L); return(bv); }