From ea3566333263f19e41e324eb5a48adccd051672c Mon Sep 17 00:00:00 2001 From: secXsQuared1995 Date: Wed, 19 Oct 2016 08:00:33 -0400 Subject: [PATCH] Fix --- MHSEC-G/MHSEC-G/Character.cs | 6 +++--- MHSEC-G/MHSEC-G/Monster.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MHSEC-G/MHSEC-G/Character.cs b/MHSEC-G/MHSEC-G/Character.cs index 6b406f7..aa0de25 100644 --- a/MHSEC-G/MHSEC-G/Character.cs +++ b/MHSEC-G/MHSEC-G/Character.cs @@ -7,7 +7,7 @@ namespace MHSEC_G public class Character : INotifyPropertyChanged { private const uint OFFSETA_CHAR_NAME = 0x9DA0; - private const uint LENGTH_CHAR_NAME = 4; + private const uint LENGTH_CHAR_NAME = 6; private const uint OFFSETA_CHAR_MONEY = 0x5B404; private const uint OFFSETA_CHAR_EXP = 0x9E68; private const uint OFFSETA_CHAR_LEVEL = 0x9E64; @@ -70,12 +70,12 @@ namespace MHSEC_G public string name { - get { return Model.read_unicode_string(_model.save_file, OFFSETA_CHAR_NAME, 65536); } + get { return Model.read_unicode_string(_model.save_file, OFFSETA_CHAR_NAME, LENGTH_CHAR_NAME); } set { if (value.Length <= LENGTH_CHAR_NAME && value.Length > 0) { - Model.write_unicode_string(_model.save_file, OFFSETA_CHAR_NAME, value, LENGTH_CHAR_NAME + 1); + Model.write_unicode_string(_model.save_file, OFFSETA_CHAR_NAME, value, LENGTH_CHAR_NAME); } else { diff --git a/MHSEC-G/MHSEC-G/Monster.cs b/MHSEC-G/MHSEC-G/Monster.cs index 78e50e6..07240c0 100644 --- a/MHSEC-G/MHSEC-G/Monster.cs +++ b/MHSEC-G/MHSEC-G/Monster.cs @@ -205,12 +205,12 @@ namespace MHSEC_G public string name { - get { return Model.read_unicode_string(_model.save_file, _offset + OFFSETR_MONSTER_NAME, 65536); } + get { return Model.read_unicode_string(_model.save_file, _offset + OFFSETR_MONSTER_NAME, 10); } set { if (value.Length <= 10 && value.Length > 0) { - Model.write_unicode_string(_model.save_file, _offset + OFFSETR_MONSTER_NAME, value, 11); + Model.write_unicode_string(_model.save_file, _offset + OFFSETR_MONSTER_NAME, value, 10); } else {