예제 #1
0
        public void SetGameInfoBytes(byte[] data)
        {
            ChaFileGameInfo src = (ChaFileGameInfo)MessagePackSerializer.Deserialize <ChaFileGameInfo>(data);

            src.ComplementWithVersion();
            this.gameinfo.Copy(src);
        }
예제 #2
0
 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;
 }
예제 #3
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;
 }
예제 #4
0
 public void CopyGameInfo(ChaFileGameInfo _gameinfo)
 {
     this.SetGameInfoBytes(ChaFile.GetGameInfoBytes(_gameinfo));
 }
예제 #5
0
 public static byte[] GetGameInfoBytes(ChaFileGameInfo _gameinfo)
 {
     return(MessagePackSerializer.Serialize <ChaFileGameInfo>((M0)_gameinfo));
 }