public void SetGameInfoBytes(byte[] data) { ChaFileGameInfo src = (ChaFileGameInfo)MessagePackSerializer.Deserialize <ChaFileGameInfo>(data); src.ComplementWithVersion(); this.gameinfo.Copy(src); }
public ChaFile() { this.custom = new ChaFileCustom(); this.coordinate = new ChaFileCoordinate(); this.parameter = new ChaFileParameter(); this.gameinfo = new ChaFileGameInfo(); this.status = new ChaFileStatus(); this.lastLoadErrorCode = 0; }
public void Copy(ChaFileGameInfo src) { this.version = src.version; this.gameRegistration = src.gameRegistration; this.tempBound.Copy(src.tempBound); this.moodBound.Copy(src.moodBound); this.flavorState = new Dictionary <int, int>((IDictionary <int, int>)src.flavorState); this.totalFlavor = src.totalFlavor; this.desireDefVal = new Dictionary <int, float>((IDictionary <int, float>)src.desireDefVal); this.desireBuffVal = new Dictionary <int, float>((IDictionary <int, float>)src.desireBuffVal); this.phase = src.phase; this.normalSkill = new Dictionary <int, int>((IDictionary <int, int>)src.normalSkill); this.hSkill = new Dictionary <int, int>((IDictionary <int, int>)src.hSkill); this.favoritePlace = src.favoritePlace; this.lifestyle = src.lifestyle; this.morality = src.morality; this.motivation = src.motivation; this.immoral = src.immoral; this.isHAddTaii0 = src.isHAddTaii0; this.isHAddTaii1 = src.isHAddTaii1; }
public void CopyGameInfo(ChaFileGameInfo _gameinfo) { this.SetGameInfoBytes(ChaFile.GetGameInfoBytes(_gameinfo)); }
public static byte[] GetGameInfoBytes(ChaFileGameInfo _gameinfo) { return(MessagePackSerializer.Serialize <ChaFileGameInfo>((M0)_gameinfo)); }