123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055 |
- using System;
- using System.Collections.Generic;
- using System.Globalization;
- using System.IO;
- using System.Text.RegularExpressions;
- using Edit;
- using MaidStatus.CsvData;
- using MaidStatus.Old;
- using UnityEngine;
- using wf;
- using Yotogis;
- namespace MaidStatus
- {
- public class Status
- {
- public Status()
- {
- Feature.CreateData();
- Propensity.CreateData();
- YotogiClass.CreateData();
- JobClass.CreateData();
- Personal.CreateData();
- SubMaid.CreateData();
- this.body = new BodyData();
- this.features_ = new Dictionary<int, Feature.Data>();
- this.features = new ReadOnlyDictionary<int, Feature.Data>(this.features_);
- this.propensitys_ = new Dictionary<int, Propensity.Data>();
- this.propensitys = new ReadOnlyDictionary<int, Propensity.Data>(this.propensitys_);
- this.jobClass = new JobClassSystem(this);
- this.yotogiClass = new YotogiClassSystem(this);
- this.yotogiSkill = new YotogiSkillSystem(this);
- this.workDatas_ = new Dictionary<int, WorkData>();
- this.workDatas = new ReadOnlyDictionary<int, WorkData>(this.workDatas_);
- this.flags_ = new Dictionary<string, int>();
- this.flags = new ReadOnlyDictionary<string, int>(this.flags_);
- this.eventEndFlags_ = new Dictionary<int, bool>();
- this.eventEndFlags = new ReadOnlyDictionary<int, bool>(this.eventEndFlags_);
- this.partsDic = new Dictionary<string, string>();
- this.bonusStatus = new BonusStatus();
- this.SetPersonal(Personal.GetData("Muku"));
- this.heroineType = HeroineType.Original;
- this.mainChara = false;
- this.subCharaData = null;
- this.firstName = MaidRandomName.GetFirstName();
- this.lastName = MaidRandomName.GetLastName();
- this.isFirstNameCall = true;
- this.enabledYotogiStatusLock = false;
- string empty = string.Empty;
- this.freeComment = empty;
- this.profileComment = empty;
- }
- public static int maxNameLength
- {
- get
- {
- return (!Product.isEnglish) ? 8 : 11;
- }
- }
- public static int minAge
- {
- get
- {
- return 20;
- }
- }
- public static int maxAge
- {
- get
- {
- return 999;
- }
- }
- public string guid { get; private set; }
- public string creationTime { get; private set; }
- public ulong creationTimeNum { get; private set; }
- public Maid maid { get; private set; }
- public SubMaid.Data.CharacterStatus subCharaStatus
- {
- get
- {
- return (this.subCharaData != null) ? ((!GameMain.Instance.CharacterMgr.status.lockUserDraftMaid || this.subCharaData.secondStatus == null) ? this.subCharaData.status : this.subCharaData.secondStatus) : null;
- }
- }
- public int employmentDay
- {
- get
- {
- return this.employmentDay_;
- }
- set
- {
- this.employmentDay_ = wf.Math.Round5(value);
- }
- }
- public int employmentElapsedDay
- {
- get
- {
- int num = GameMain.Instance.CharacterMgr.status.days - this.employmentDay_;
- num += ((this.OldStatus != null) ? this.OldStatus.employmentElapsedDay : 0);
- return wf.Math.Round5(num);
- }
- }
- public string lastName
- {
- get
- {
- return this.lastName_;
- }
- set
- {
- this.lastName_ = ((value != null) ? Status.ConvertString(value, Status.maxNameLength) : string.Empty);
- }
- }
- public string firstName
- {
- get
- {
- return this.firstName_;
- }
- set
- {
- this.firstName_ = ((value != null) ? Status.ConvertString(value, Status.maxNameLength) : string.Empty);
- }
- }
- public NamePair charaName
- {
- get
- {
- NamePair result = new NamePair((!Product.isEnglish) ? this.lastName : this.firstName, (!Product.isEnglish) ? this.firstName : this.lastName);
- return result;
- }
- }
- public string fullNameJpStyle
- {
- get
- {
- return this.lastName + " " + this.firstName;
- }
- }
- public string fullNameEnStyle
- {
- get
- {
- return this.firstName + " " + this.lastName;
- }
- }
- public string nickName
- {
- get
- {
- return this.nickName_;
- }
- set
- {
- this.nickName_ = ((value != null) ? Status.ConvertString(value, Status.maxNameLength) : string.Empty);
- }
- }
- public string callName
- {
- get
- {
- return (!this.isNickNameCall) ? ((!this.isFirstNameCall) ? this.lastName : this.firstName) : this.nickName;
- }
- }
- public string freeComment
- {
- get
- {
- return this.freeComment_;
- }
- set
- {
- this.freeComment_ = ((value != null) ? Status.ConvertString(value, 308) : string.Empty);
- }
- }
- public Personal.Data personal
- {
- get
- {
- return this.personal_;
- }
- }
- public ClassData<JobClass.Data> selectedJobClass { get; private set; }
- public ClassData<YotogiClass.Data> selectedYotogiClass { get; private set; }
- public Relation relation
- {
- get
- {
- return this.relation_;
- }
- set
- {
- this.relation_ = value;
- if (this.OldStatus != null)
- {
- if (value == Relation.Contact && this.OldStatus.relation != Relation.Contact)
- {
- this.OldStatus.relation = Relation.Contact;
- }
- else if (value == Relation.Trust && this.OldStatus.relation != Relation.Trust)
- {
- this.OldStatus.relation = Relation.Trust;
- }
- else if (value == Relation.Lover && this.OldStatus.relation != Relation.Lover)
- {
- this.OldStatus.relation = Relation.Lover;
- }
- }
- }
- }
- public AdditionalRelation additionalRelation
- {
- get
- {
- return this.additionalRelation_;
- }
- set
- {
- if (Product.enabeldAdditionalRelation && (this.personal.uniqueName == "Muku" || this.personal.uniqueName == "Majime" || this.personal.uniqueName == "Rindere"))
- {
- this.additionalRelation_ = value;
- }
- else
- {
- this.additionalRelation_ = AdditionalRelation.Null;
- }
- }
- }
- public string conditionText
- {
- get
- {
- return Title.Get(this);
- }
- }
- public string conditionTermText
- {
- get
- {
- return "MaidStatus/ステータス称号/" + this.conditionText;
- }
- }
- public int playCountYotogi
- {
- get
- {
- return (int)this.playCountYotogi_;
- }
- set
- {
- this.playCountYotogi_ = (ushort)wf.Math.Round4(value);
- }
- }
- public int playCountNightWork
- {
- get
- {
- return (int)this.playCountNightWork_;
- }
- set
- {
- this.playCountNightWork_ = (ushort)wf.Math.Round4(value);
- }
- }
- public int likability
- {
- get
- {
- return (int)this.likability_;
- }
- set
- {
- this.likability_ = (ushort)wf.Math.Round3(value);
- }
- }
- public int studyRate
- {
- get
- {
- return (int)this.studyRate_;
- }
- set
- {
- this.studyRate_ = (ushort)wf.Math.RoundMinMax(value, 0, 1000);
- }
- }
- public int currentExcite
- {
- get
- {
- return this.currentExcite_;
- }
- set
- {
- this.currentExcite_ = wf.Math.RoundMinMax(value, -100, 300);
- }
- }
- public int currentSensual
- {
- get
- {
- return this.currentSensual_;
- }
- set
- {
- this.currentSensual_ = wf.Math.RoundMinMax(value, 0, 300);
- }
- }
- public int maxHp
- {
- get
- {
- return wf.Math.Round3((int)this.maxHp_ + this.bonusStatus.hp);
- }
- }
- public int baseMaxHp
- {
- get
- {
- return (int)this.maxHp_;
- }
- set
- {
- this.maxHp_ = (ushort)wf.Math.Round3(value);
- }
- }
- public int currentHp
- {
- get
- {
- return (int)this.currentHp_;
- }
- set
- {
- this.currentHp_ = (ushort)wf.Math.RoundMinMax(value, 0, this.maxHp);
- }
- }
- public int maxMind
- {
- get
- {
- return wf.Math.Round3((int)this.maxMind_ + this.bonusStatus.mind);
- }
- }
- public int baseMaxMind
- {
- get
- {
- return (int)this.maxMind_;
- }
- set
- {
- this.maxMind_ = (ushort)wf.Math.Round3(value);
- }
- }
- public int currentMind
- {
- get
- {
- return (int)this.currentMind_;
- }
- set
- {
- this.currentMind_ = (ushort)wf.Math.RoundMinMax(value, 0, this.maxMind);
- }
- }
- public int maxReason
- {
- get
- {
- return wf.Math.Round3((int)this.maxReason_ + this.bonusStatus.reason);
- }
- }
- public int baseMaxReason
- {
- get
- {
- return (int)this.maxReason_;
- }
- set
- {
- this.maxReason_ = (ushort)wf.Math.Round3(value);
- }
- }
- public int currentReason
- {
- get
- {
- return (int)this.currentReason_;
- }
- set
- {
- this.currentReason_ = (ushort)wf.Math.RoundMinMax(value, 0, this.maxReason);
- }
- }
- public int reception
- {
- get
- {
- return wf.Math.Round4((int)this.reception_ + this.bonusStatus.reception);
- }
- }
- public int baseReception
- {
- get
- {
- return (int)this.reception_;
- }
- set
- {
- this.reception_ = (ushort)wf.Math.Round4(value);
- }
- }
- public int care
- {
- get
- {
- return wf.Math.Round4((int)this.care_ + this.bonusStatus.care);
- }
- }
- public int baseCare
- {
- get
- {
- return (int)this.care_;
- }
- set
- {
- this.care_ = (ushort)wf.Math.Round4(value);
- }
- }
- public int lovely
- {
- get
- {
- return wf.Math.Round4((int)this.lovely_ + this.bonusStatus.lovely);
- }
- }
- public int baseLovely
- {
- get
- {
- return (int)this.lovely_;
- }
- set
- {
- this.lovely_ = (ushort)wf.Math.Round4(value);
- }
- }
- public int elegance
- {
- get
- {
- return wf.Math.Round4((int)this.elegance_ + this.bonusStatus.elegance);
- }
- }
- public int baseElegance
- {
- get
- {
- return (int)this.elegance_;
- }
- set
- {
- this.elegance_ = (ushort)wf.Math.Round4(value);
- }
- }
- public int charm
- {
- get
- {
- return wf.Math.Round4((int)this.charm_ + this.bonusStatus.charm);
- }
- }
- public int baseCharm
- {
- get
- {
- return (int)this.charm_;
- }
- set
- {
- this.charm_ = (ushort)wf.Math.Round4(value);
- }
- }
- public int cooking
- {
- get
- {
- return wf.Math.Round4((int)this.cooking_ + this.bonusStatus.charm);
- }
- }
- public int baseCooking
- {
- get
- {
- return (int)this.cooking_;
- }
- set
- {
- this.cooking_ = (ushort)wf.Math.Round4(value);
- }
- }
- public int vocal
- {
- get
- {
- return wf.Math.Round4((int)this.vocal_ + this.bonusStatus.vocal);
- }
- }
- public int baseVocal
- {
- get
- {
- return (int)this.vocal_;
- }
- set
- {
- this.vocal_ = (ushort)wf.Math.Round4(value);
- }
- }
- public int dance
- {
- get
- {
- return wf.Math.Round4((int)this.dance_ + this.bonusStatus.dance);
- }
- }
- public int baseDance
- {
- get
- {
- return (int)this.dance_;
- }
- set
- {
- this.dance_ = (ushort)wf.Math.Round4(value);
- }
- }
- public int appealPoint
- {
- get
- {
- return wf.Math.RoundMinMax((int)this.appealPoint_ + this.bonusStatus.appealPoint, 0, this.maxAppealPoint);
- }
- }
- public int baseAppealPoint
- {
- get
- {
- return (int)this.appealPoint_;
- }
- set
- {
- this.appealPoint_ = (ushort)wf.Math.RoundMinMax(value, 0, this.maxAppealPoint);
- }
- }
- public int maxAppealPoint
- {
- get
- {
- return 200 + wf.Math.Round4(this.dance) / 1000 * 200;
- }
- }
- public int inyoku
- {
- get
- {
- return wf.Math.Round4((int)this.inyoku_ + this.bonusStatus.inyoku);
- }
- }
- public int baseInyoku
- {
- get
- {
- return (int)this.inyoku_;
- }
- set
- {
- this.inyoku_ = (ushort)wf.Math.Round4(value);
- }
- }
- public int mvalue
- {
- get
- {
- return wf.Math.Round4((int)this.m_value_ + this.bonusStatus.mvalue);
- }
- }
- public int baseMvalue
- {
- get
- {
- return (int)this.m_value_;
- }
- set
- {
- this.m_value_ = (ushort)wf.Math.Round4(value);
- }
- }
- public int hentai
- {
- get
- {
- return wf.Math.Round4((int)this.hentai_ + this.bonusStatus.hentai);
- }
- }
- public int baseHentai
- {
- get
- {
- return (int)this.hentai_;
- }
- set
- {
- this.hentai_ = (ushort)wf.Math.Round4(value);
- }
- }
- public int housi
- {
- get
- {
- return wf.Math.Round4((int)this.housi_ + this.bonusStatus.housi);
- }
- }
- public int baseHousi
- {
- get
- {
- return (int)this.housi_;
- }
- set
- {
- this.housi_ = (ushort)wf.Math.Round4(value);
- }
- }
- public int teachRate
- {
- get
- {
- return wf.Math.Round4((int)this.teachRate_ + this.bonusStatus.teachRate);
- }
- }
- public int baseTeachRate
- {
- get
- {
- return (int)this.teachRate_;
- }
- set
- {
- this.teachRate_ = (ushort)wf.Math.Round4(value);
- }
- }
- public int sexPlayNumberOfPeople
- {
- get
- {
- return (int)this.sexPlayNumberOfPeople_;
- }
- set
- {
- this.sexPlayNumberOfPeople_ = (ushort)wf.Math.Round3(value);
- }
- }
- public int popularRank
- {
- get
- {
- return (int)this.popularRank_;
- }
- set
- {
- this.popularRank_ = (ushort)wf.Math.Round3(value);
- }
- }
- public int evaluation
- {
- get
- {
- return (int)this.evaluation_;
- }
- set
- {
- this.evaluation_ = (ushort)wf.Math.Round4(value);
- }
- }
- public long totalEvaluations
- {
- get
- {
- return this.totalEvaluation_;
- }
- set
- {
- this.totalEvaluation_ = System.Math.Min(System.Math.Max(value, 0L), 9999999999L);
- }
- }
- public long sales
- {
- get
- {
- return this.sales_;
- }
- set
- {
- this.sales_ = System.Math.Min(System.Math.Max(value, 0L), 9999999999L);
- }
- }
- public long totalSales
- {
- get
- {
- return this.totalSales_;
- }
- set
- {
- this.totalSales_ = System.Math.Min(System.Math.Max(value, 0L), 9999999999L);
- }
- }
- public int inranGap
- {
- get
- {
- return this.inyoku + this.lovely;
- }
- }
- public int mValueGap
- {
- get
- {
- return this.mvalue + this.elegance;
- }
- }
- public int hentaiGap
- {
- get
- {
- return this.hentai + this.charm;
- }
- }
- public int banishmentPrice
- {
- get
- {
- return 10000;
- }
- }
- public bool isNickNameCall
- {
- get
- {
- return this.flags_.ContainsKey("__isNickNameCall__") && this.flags_["__isNickNameCall__"] != 0;
- }
- set
- {
- this.flags_["__isNickNameCall__"] = ((!value) ? 0 : 1);
- }
- }
- public VoiceGroup voiceGroup
- {
- get
- {
- return this.voiceGroup_;
- }
- set
- {
- this.voiceGroup_ = value;
- if (this.maid != null && this.maid.body0 != null)
- {
- this.maid.body0.SetVoiceGroup(value);
- }
- }
- }
- public ReadOnlyDictionary<int, Feature.Data> features { get; private set; }
- public ReadOnlyDictionary<int, Propensity.Data> propensitys { get; private set; }
- public JobClassSystem jobClass { get; private set; }
- public YotogiClassSystem yotogiClass { get; private set; }
- public YotogiSkillSystem yotogiSkill { get; private set; }
- public ReadOnlyDictionary<int, WorkData> workDatas { get; private set; }
- public ReadOnlyDictionary<string, int> flags { get; private set; }
- public ReadOnlyDictionary<int, bool> eventEndFlags { get; private set; }
- public Dictionary<string, string> partsDic { get; private set; }
- public Status OldStatus { get; private set; }
- public bool isCompatiblePersonality
- {
- get
- {
- return this.heroineType == HeroineType.Transfer && this.personal.compatible;
- }
- }
- public static string ConvertString(string str, int maxStrSize = 8)
- {
- str = Regex.Replace(str, "[\\r\\n\\t\\\\]", string.Empty);
- if (str.Length == 0)
- {
- str = " ";
- }
- StringInfo stringInfo = new StringInfo(str);
- if (maxStrSize < stringInfo.LengthInTextElements)
- {
- str = stringInfo.SubstringByTextElements(0, maxStrSize);
- }
- return str;
- }
- public void Initialize(Maid maid)
- {
- this.maid = maid;
- this.guid = Guid.NewGuid().ToString();
- this.creationTime = DateTime.Now.ToString("G", new CultureInfo("ja-JP")).Replace("/", string.Empty);
- string text = this.creationTime.Replace(":", string.Empty);
- text = text.Replace(" ", string.Empty);
- this.creationTimeNum = ulong.Parse(text);
- this.employmentDay = GameMain.Instance.CharacterMgr.status.days;
- this.additionalRelation = AdditionalRelation.Vigilance;
- List<JobClass.Data> learnPossibleClassDatas = this.jobClass.GetLearnPossibleClassDatas(true, AbstractClassData.ClassType.Share | AbstractClassData.ClassType.New);
- foreach (JobClass.Data data in learnPossibleClassDatas)
- {
- this.jobClass.Add(data, true, true);
- if (this.selectedJobClass == null)
- {
- this.ChangeJobClass(data);
- }
- }
- List<YotogiClass.Data> learnPossibleClassDatas2 = this.yotogiClass.GetLearnPossibleClassDatas(true, AbstractClassData.ClassType.Share | AbstractClassData.ClassType.New);
- foreach (YotogiClass.Data data2 in learnPossibleClassDatas2)
- {
- this.yotogiClass.Add(data2, true, true);
- if (this.selectedYotogiClass == null)
- {
- this.ChangeYotogiClass(data2);
- }
- }
- List<Skill.Data> learnPossibleSkills = Skill.GetLearnPossibleSkills(this);
- foreach (Skill.Data data3 in learnPossibleSkills)
- {
- this.yotogiSkill.Add(data3.id);
- }
- int num = 100;
- this.baseMaxReason = num;
- num = num;
- this.baseMaxMind = num;
- this.baseMaxHp = num;
- this.UpdateClassBonusStatus();
- this.sexPlayNumberOfPeople = MaidProfile.UpdateInitPlayNumber(maid);
- this.UpdateBodyParam();
- this.profileComment = MaidProfile.Create(maid, false);
- this.currentHp = this.maxHp;
- this.currentMind = this.maxMind;
- }
- public bool SetPersonal(int personalId)
- {
- return this.SetPersonal(Personal.GetData(personalId));
- }
- public bool SetPersonal(Personal.Data data)
- {
- if (!Personal.IsEnabled(data.id) && !data.oldPersonal)
- {
- Debug.LogError("性格[" + data.drawName + "]は有効ではないので設定できません");
- return false;
- }
- this.personal_ = data;
- this.additionalRelation = this.additionalRelation;
- if (this.personal_.oldPersonal)
- {
- this.heroineType = HeroineType.Transfer;
- if (this.OldStatus == null)
- {
- this.OldStatus = new Status(this);
- }
- }
- else if (this.heroineType == HeroineType.Transfer)
- {
- this.heroineType = HeroineType.Original;
- this.OldStatus = null;
- }
- return true;
- }
- public void SetSeikeikenFront(bool val)
- {
- if (val)
- {
- if (this.seikeiken == Seikeiken.Yes_Yes || this.seikeiken == Seikeiken.Yes_No)
- {
- return;
- }
- if (this.seikeiken == Seikeiken.No_No)
- {
- this.seikeiken = Seikeiken.Yes_No;
- }
- else
- {
- this.seikeiken = Seikeiken.Yes_Yes;
- }
- }
- else
- {
- if (this.seikeiken == Seikeiken.No_No || this.seikeiken == Seikeiken.No_Yes)
- {
- return;
- }
- if (this.seikeiken == Seikeiken.Yes_Yes)
- {
- this.seikeiken = Seikeiken.No_Yes;
- }
- else
- {
- this.seikeiken = Seikeiken.No_No;
- }
- }
- }
- public void SetSeikeikenBack(bool val)
- {
- if (val)
- {
- if (this.seikeiken == Seikeiken.Yes_Yes || this.seikeiken == Seikeiken.No_Yes)
- {
- return;
- }
- if (this.seikeiken == Seikeiken.No_No)
- {
- this.seikeiken = Seikeiken.No_Yes;
- }
- else
- {
- this.seikeiken = Seikeiken.Yes_Yes;
- }
- }
- else
- {
- if (this.seikeiken == Seikeiken.No_No || this.seikeiken == Seikeiken.Yes_No)
- {
- return;
- }
- if (this.seikeiken == Seikeiken.Yes_Yes)
- {
- this.seikeiken = Seikeiken.Yes_No;
- }
- else
- {
- this.seikeiken = Seikeiken.No_No;
- }
- }
- }
- public bool ChangeJobClass(int jobClassId)
- {
- return this.ChangeJobClass(JobClass.GetData(jobClassId));
- }
- public bool ChangeJobClass(JobClass.Data data)
- {
- if (data == null)
- {
- return false;
- }
- if (!JobClass.IsEnabled(data.id))
- {
- Debug.LogError("ジョブクラス[" + data.drawName + "]は有効ではないので設定できません");
- return false;
- }
- if (!this.jobClass.Contains(data.id))
- {
- Debug.LogError("ジョブクラス[" + data.drawName + "]は取得していないので設定できません");
- return false;
- }
- this.selectedJobClass = this.jobClass.Get(data.id);
- return true;
- }
- public bool ChangeYotogiClass(int yotogiClassId)
- {
- return this.ChangeYotogiClass(YotogiClass.GetData(yotogiClassId));
- }
- public bool ChangeYotogiClass(YotogiClass.Data data)
- {
- if (data == null)
- {
- return false;
- }
- if (!YotogiClass.IsEnabled(data.id))
- {
- Debug.LogError("夜伽クラス[" + data.drawName + "]は有効ではないので設定できません");
- return false;
- }
- if (!this.yotogiClass.Contains(data.id))
- {
- Debug.LogError("夜伽クラス[" + data.drawName + "]は取得していないので設定できません");
- return false;
- }
- this.selectedYotogiClass = this.yotogiClass.Get(data.id);
- return true;
- }
- public Feature.Data AddFeature(int featureId)
- {
- return this.AddFeature(Feature.GetData(featureId));
- }
- public Feature.Data AddFeature(Feature.Data data)
- {
- if (data != null && Feature.IsEnabled(data.id) && !this.features_.ContainsKey(data.id))
- {
- this.features_.Add(data.id, data);
- }
- return data;
- }
- public void RemoveFeature(int featureId)
- {
- this.RemoveFeature(Feature.GetData(featureId));
- }
- public void RemoveFeature(Feature.Data data)
- {
- if (data != null && this.features_.ContainsKey(data.id))
- {
- this.features_.Remove(data.id);
- }
- }
- public Propensity.Data AddPropensity(int propensityId)
- {
- return this.AddPropensity(Propensity.GetData(propensityId));
- }
- public Propensity.Data AddPropensity(Propensity.Data data)
- {
- if (data != null && Propensity.IsEnabled(data.id) && !this.propensitys_.ContainsKey(data.id))
- {
- this.propensitys_.Add(data.id, data);
- }
- return data;
- }
- public void RemovePropensity(int featureId)
- {
- this.RemovePropensity(Propensity.GetData(featureId));
- }
- public void RemovePropensity(Propensity.Data data)
- {
- if (data != null && this.propensitys_.ContainsKey(data.id))
- {
- this.propensitys_.Remove(data.id);
- }
- }
- public void AddWorkDataPlayCount(int id, int addPlayCount)
- {
- if (!this.workDatas_.ContainsKey(id))
- {
- this.workDatas_.Add(id, new WorkData());
- }
- this.workDatas_[id].playCount += (uint)addPlayCount;
- }
- public void SetWorkDataLevel(int id, int level)
- {
- if (!this.workDatas_.ContainsKey(id))
- {
- this.workDatas_.Add(id, new WorkData());
- }
- this.workDatas_[id].level = level;
- }
- public void SetFlag(string flagName, int value)
- {
- if (!this.flags_.ContainsKey(flagName))
- {
- this.flags_.Add(flagName, value);
- }
- else
- {
- this.flags_[flagName] = value;
- }
- }
- public void AddFlag(string flagName, int value)
- {
- if (!this.flags_.ContainsKey(flagName))
- {
- this.flags_.Add(flagName, value);
- }
- else
- {
- Dictionary<string, int> dictionary;
- (dictionary = this.flags_)[flagName] = dictionary[flagName] + value;
- }
- }
- public int GetFlag(string flagName)
- {
- return (!this.flags_.ContainsKey(flagName)) ? 0 : this.flags_[flagName];
- }
- public bool RemoveFlag(string flagName)
- {
- return this.flags_.ContainsKey(flagName) && this.flags_.Remove(flagName);
- }
- public void SetEventEndFlag(int id, bool value)
- {
- if (this.eventEndFlags_.ContainsKey(id))
- {
- this.eventEndFlags_[id] = value;
- }
- else
- {
- this.eventEndFlags_.Add(id, value);
- }
- }
- public void RemoveEventEndFlag(int id)
- {
- if (this.eventEndFlags_.ContainsKey(id))
- {
- this.eventEndFlags_.Remove(id);
- }
- }
- public bool GetEventEndFlag(int id)
- {
- return this.eventEndFlags_.ContainsKey(id) && this.eventEndFlags_[id];
- }
- public BonusStatus GetBonusStatusAsFeatureAndPropensitys()
- {
- BonusStatus result = new BonusStatus();
- foreach (Feature.Data data in this.features.GetValueArray())
- {
- if (data.bonusCorrection != null)
- {
- data.bonusCorrection.ApplyAddBonusStatus(result);
- }
- }
- foreach (Propensity.Data data2 in this.propensitys.GetValueArray())
- {
- if (data2.bonusCorrection != null)
- {
- data2.bonusCorrection.ApplyAddBonusStatus(result);
- }
- }
- return result;
- }
- public void UpdateBodyParam()
- {
- if (this.maid.Parts == null)
- {
- return;
- }
- Func<MPN, float> func = (MPN mpn) => (float)this.maid.GetProp(mpn).value;
- float num = 1340f + func(MPN.sintyou) * 4f + func(MPN.DouPer) * (1f + func(MPN.sintyou) * 0.005f) + func(MPN.KubiScl) * 0.5f + func(MPN.HeadY) * 0.5f;
- float num2 = 55f * func(MPN.RegFat) + 50f * func(MPN.sintyou) * 0.5f + 50f * func(MPN.DouPer) * 0.4f;
- float num3 = 55f * func(MPN.RegMeet) + 50f * func(MPN.sintyou) * 0.5f + 50f * func(MPN.DouPer) * 0.4f;
- float num4 = 10f * func(MPN.UdeScl) * 0.1f;
- float num5 = 5f * func(MPN.ArmL) + 5f * func(MPN.sintyou) * 1f + 5f * func(MPN.UdeScl) * 0.5f;
- float num6 = 70f * func(MPN.Hara) + 50f * func(MPN.sintyou) * 0.7f + 50f * func(MPN.west) * func(MPN.Hara) * 0.005f;
- float num7 = 10f * func(MPN.MuneL) * 2f;
- float num8 = num7 * func(MPN.MuneTare) * 0.005f;
- float num9 = 20f * func(MPN.west) * 0.5f + 15f * func(MPN.west) * func(MPN.sintyou) * 0.02f + 15f * func(MPN.west) * func(MPN.DouPer) * 0.01f;
- float num10 = 10f * func(MPN.koshi) + 7f * func(MPN.koshi) * func(MPN.sintyou) * 0.04f;
- float num11 = 4f * func(MPN.kata);
- float num12 = 38000f + num2 + num3 + num4 + num5 + num6 + num7 + num8 + num9 + num10 + num11;
- this.body.height = (int)(num / 10f);
- this.body.weight = (int)(num12 / 1000f);
- float num13 = 70f + func(MPN.MuneL) * 0.31f + func(MPN.west) * 0.02f;
- num13 -= 5f * (func(MPN.MuneS) / 100f);
- this.body.bust = (int)num13;
- this.body.waist = (int)(40f + func(MPN.west) * 0.25f + func(MPN.Hara) * 0.35f);
- this.body.hip = (int)(65f + func(MPN.koshi) * 0.3f + func(MPN.RegFat) * 0.025f + func(MPN.RegMeet) * 0.025f);
- if (num13 < 80f)
- {
- this.body.cup = "A";
- }
- else if (110f <= num13)
- {
- this.body.cup = "N";
- }
- else
- {
- char[] array = new char[]
- {
- 'B',
- 'C',
- 'D',
- 'E',
- 'F',
- 'G',
- 'H',
- 'I',
- 'J',
- 'K',
- 'L',
- 'M'
- };
- this.body.cup = array[(int)((num13 - 80f) / 2.5f)].ToString();
- }
- }
- public void UpdateClassBonusStatus()
- {
- this.bonusStatus.Clear();
- if (this.heroineType == HeroineType.Sub)
- {
- return;
- }
- foreach (KeyValuePair<int, ClassData<JobClass.Data>> keyValuePair in this.jobClass.GetAllDatas())
- {
- ClassData<JobClass.Data> value = keyValuePair.Value;
- value.data.levelBonuss[value.level - 1].ApplyAddBonusStatus(this.bonusStatus);
- }
- }
- public void Serialize(BinaryWriter binary)
- {
- binary.Write("CM3D2_MAID_STATUS");
- binary.Write(1310);
- binary.Write(this.guid);
- binary.Write(this.creationTime);
- binary.Write((short)this.heroineType);
- if (this.heroineType == HeroineType.Sub)
- {
- binary.Write(this.subCharaData.id);
- }
- binary.Write(this.mainChara);
- binary.Write(this.employmentDay_);
- binary.Write(this.lastName);
- binary.Write(this.firstName);
- binary.Write(this.profileComment);
- binary.Write(this.freeComment);
- binary.Write((short)this.initSeikeiken);
- binary.Write((short)this.seikeiken);
- binary.Write(this.personal_.id);
- binary.Write((short)this.contract);
- this.body.Serialize(binary);
- binary.Write((short)this.relation_);
- binary.Write(this.playCountYotogi_);
- binary.Write(this.playCountNightWork_);
- binary.Write(this.likability_);
- binary.Write(this.studyRate_);
- binary.Write(this.maxHp_);
- binary.Write(this.currentHp_);
- binary.Write(this.maxMind_);
- binary.Write(this.currentMind_);
- binary.Write(this.maxReason_);
- binary.Write(this.currentReason_);
- binary.Write(this.reception_);
- binary.Write(this.care_);
- binary.Write(this.lovely_);
- binary.Write(this.elegance_);
- binary.Write(this.charm_);
- binary.Write(this.cooking_);
- binary.Write(this.vocal_);
- binary.Write(this.dance_);
- binary.Write(this.appealPoint_);
- binary.Write(this.inyoku_);
- binary.Write(this.m_value_);
- binary.Write(this.hentai_);
- binary.Write(this.housi_);
- binary.Write(this.teachRate_);
- binary.Write(this.sexPlayNumberOfPeople_);
- binary.Write(this.popularRank_);
- binary.Write(this.sales_);
- binary.Write(this.totalSales_);
- binary.Write(this.evaluation_);
- binary.Write(this.totalEvaluation_);
- binary.Write(this.leader);
- binary.Write(this.isFirstNameCall);
- binary.Write(this.enabledYotogiStatusLock);
- binary.Write((short)this.eyePartsTab);
- binary.Write(this.noonWorkId);
- binary.Write(this.nightWorkId);
- binary.Write(this.noonCommu);
- binary.Write(this.nightCommu);
- binary.Write((short)this.features_.Count);
- foreach (KeyValuePair<int, Feature.Data> keyValuePair in this.features_)
- {
- binary.Write(keyValuePair.Key);
- }
- binary.Write((short)this.propensitys_.Count);
- foreach (KeyValuePair<int, Propensity.Data> keyValuePair2 in this.propensitys_)
- {
- binary.Write(keyValuePair2.Key);
- }
- this.jobClass.Serialize(binary);
- this.yotogiClass.Serialize(binary);
- this.yotogiSkill.Serialize(binary);
- binary.Write((short)this.workDatas_.Count);
- foreach (KeyValuePair<int, WorkData> keyValuePair3 in this.workDatas_)
- {
- binary.Write(keyValuePair3.Key);
- keyValuePair3.Value.Serialize(binary);
- }
- binary.Write((short)this.flags_.Count);
- foreach (KeyValuePair<string, int> keyValuePair4 in this.flags_)
- {
- binary.Write(keyValuePair4.Key);
- binary.Write(keyValuePair4.Value);
- }
- binary.Write((short)this.eventEndFlags_.Count);
- foreach (KeyValuePair<int, bool> keyValuePair5 in this.eventEndFlags_)
- {
- binary.Write(keyValuePair5.Key);
- binary.Write(keyValuePair5.Value);
- }
- binary.Write((short)this.partsDic.Count);
- foreach (KeyValuePair<string, string> keyValuePair6 in this.partsDic)
- {
- binary.Write(keyValuePair6.Key);
- binary.Write(keyValuePair6.Value);
- }
- binary.Write(this.OldStatus != null);
- if (this.OldStatus != null)
- {
- this.OldStatus.Serialize(binary);
- }
- binary.Write(this.selectedJobClass != null);
- if (this.selectedJobClass != null)
- {
- binary.Write(this.selectedJobClass.data.id);
- }
- binary.Write(this.selectedYotogiClass != null);
- if (this.selectedYotogiClass != null)
- {
- binary.Write(this.selectedYotogiClass.data.id);
- }
- binary.Write((short)this.additionalRelation_);
- binary.Write(this.nickName_);
- binary.Write(this.age);
- binary.Write(2177629204u);
- }
- public void Deserialize(BinaryReader binary)
- {
- string a = binary.ReadString();
- NDebug.Assert(a == "CM3D2_MAID_STATUS", "メイドパラメータのヘッダーが不正です。");
- this.OldStatus = null;
- int num = binary.ReadInt32();
- this.guid = binary.ReadString();
- this.creationTime = binary.ReadString();
- string text = this.creationTime.Replace(":", string.Empty);
- text = text.Replace(" ", string.Empty);
- this.creationTimeNum = ulong.Parse(text);
- this.heroineType = (HeroineType)binary.ReadInt16();
- if (this.heroineType == HeroineType.Sub)
- {
- int id = binary.ReadInt32();
- this.subCharaData = SubMaid.GetData(id);
- }
- if (205 < num)
- {
- this.mainChara = binary.ReadBoolean();
- }
- this.employmentDay_ = binary.ReadInt32();
- this.lastName = binary.ReadString();
- this.firstName = binary.ReadString();
- this.profileComment = binary.ReadString();
- this.freeComment = binary.ReadString();
- this.initSeikeiken = (Seikeiken)binary.ReadInt16();
- this.seikeiken = (Seikeiken)binary.ReadInt16();
- int num2 = binary.ReadInt32();
- if (Personal.IsEnabled(num2))
- {
- this.SetPersonal(num2);
- }
- else
- {
- Debug.LogWarning(this.fullNameJpStyle + " : ロードされたデータの性格[" + Personal.GetData(num2).drawName + "]は有効ではないので初期性格に強制変更しました");
- this.SetPersonal(Personal.GetData("Muku"));
- }
- if (207 < num)
- {
- this.contract = (Contract)binary.ReadInt16();
- }
- this.body.Deserialize(binary, num);
- this.relation_ = (Relation)binary.ReadInt16();
- if (num < 215)
- {
- binary.ReadInt16();
- }
- this.playCountYotogi_ = binary.ReadUInt16();
- this.playCountNightWork_ = binary.ReadUInt16();
- this.likability_ = binary.ReadUInt16();
- this.studyRate_ = binary.ReadUInt16();
- this.maxHp_ = binary.ReadUInt16();
- this.currentHp_ = binary.ReadUInt16();
- this.maxMind_ = binary.ReadUInt16();
- this.currentMind_ = binary.ReadUInt16();
- if (211 < num)
- {
- this.maxReason_ = binary.ReadUInt16();
- this.currentReason_ = binary.ReadUInt16();
- }
- this.reception_ = binary.ReadUInt16();
- this.care_ = binary.ReadUInt16();
- this.lovely_ = binary.ReadUInt16();
- this.elegance_ = binary.ReadUInt16();
- this.charm_ = binary.ReadUInt16();
- this.cooking_ = binary.ReadUInt16();
- this.vocal_ = binary.ReadUInt16();
- this.dance_ = binary.ReadUInt16();
- this.appealPoint_ = binary.ReadUInt16();
- this.inyoku_ = binary.ReadUInt16();
- this.m_value_ = binary.ReadUInt16();
- this.hentai_ = binary.ReadUInt16();
- this.housi_ = binary.ReadUInt16();
- this.teachRate_ = binary.ReadUInt16();
- this.sexPlayNumberOfPeople_ = binary.ReadUInt16();
- this.popularRank_ = binary.ReadUInt16();
- this.sales_ = binary.ReadInt64();
- this.totalSales_ = binary.ReadInt64();
- if (207 < num)
- {
- this.evaluation_ = binary.ReadUInt16();
- this.totalEvaluation_ = binary.ReadInt64();
- }
- this.leader = binary.ReadBoolean();
- this.isFirstNameCall = binary.ReadBoolean();
- if (202 < num)
- {
- this.enabledYotogiStatusLock = binary.ReadBoolean();
- }
- this.eyePartsTab = (EyePartsTab)binary.ReadInt16();
- this.noonWorkId = binary.ReadInt32();
- this.nightWorkId = binary.ReadInt32();
- this.noonCommu = binary.ReadBoolean();
- this.nightCommu = binary.ReadBoolean();
- int num3 = (int)binary.ReadInt16();
- this.features_.Clear();
- for (int i = 0; i < num3; i++)
- {
- int num4 = binary.ReadInt32();
- if (Feature.IsEnabled(num4))
- {
- this.features_.Add(num4, Feature.GetData(num4));
- }
- }
- num3 = (int)binary.ReadInt16();
- this.propensitys_.Clear();
- for (int j = 0; j < num3; j++)
- {
- int num5 = binary.ReadInt32();
- if (Propensity.IsEnabled(num5))
- {
- this.propensitys_.Add(num5, Propensity.GetData(num5));
- }
- }
- this.jobClass.Deserialize(binary, num);
- this.yotogiClass.Deserialize(binary, num);
- this.UpdateClassBonusStatus();
- if (211 >= num)
- {
- num3 = (int)binary.ReadInt16();
- for (int k = 0; k < num3; k++)
- {
- binary.ReadInt32();
- binary.ReadUInt32();
- binary.ReadUInt16();
- binary.ReadInt32();
- binary.ReadInt32();
- binary.ReadInt32();
- binary.ReadInt32();
- }
- }
- else
- {
- this.yotogiSkill.Deserialize(binary, num);
- }
- num3 = (int)binary.ReadInt16();
- this.workDatas_.Clear();
- for (int l = 0; l < num3; l++)
- {
- int key = binary.ReadInt32();
- WorkData workData = new WorkData();
- workData.Deserialize(binary, num);
- this.workDatas_.Add(key, workData);
- }
- num3 = (int)binary.ReadInt16();
- this.flags_.Clear();
- for (int m = 0; m < num3; m++)
- {
- string key2 = binary.ReadString();
- int value = binary.ReadInt32();
- this.flags_.Add(key2, value);
- }
- if (205 < num)
- {
- num3 = (int)binary.ReadInt16();
- this.eventEndFlags_.Clear();
- for (int n = 0; n < num3; n++)
- {
- int key3 = binary.ReadInt32();
- bool value2 = binary.ReadBoolean();
- this.eventEndFlags_.Add(key3, value2);
- }
- }
- num3 = (int)binary.ReadInt16();
- this.partsDic.Clear();
- for (int num6 = 0; num6 < num3; num6++)
- {
- string key4 = binary.ReadString();
- string value3 = binary.ReadString();
- this.partsDic.Add(key4, value3);
- }
- if (207 < num)
- {
- bool flag = binary.ReadBoolean();
- if (flag)
- {
- this.OldStatus = new Status(this);
- this.OldStatus.Deserialize(binary, num);
- }
- }
- this.selectedJobClass = null;
- if (binary.ReadBoolean())
- {
- int id2 = binary.ReadInt32();
- if (this.jobClass.Contains(id2))
- {
- this.selectedJobClass = this.jobClass.Get(id2);
- }
- }
- if (this.selectedJobClass == null)
- {
- ClassData<JobClass.Data>[] valueArray = this.jobClass.datas.GetValueArray();
- int num7 = 0;
- if (num7 < valueArray.Length)
- {
- ClassData<JobClass.Data> selectedJobClass = valueArray[num7];
- this.selectedJobClass = selectedJobClass;
- }
- }
- this.selectedYotogiClass = null;
- if (binary.ReadBoolean())
- {
- int id3 = binary.ReadInt32();
- if (this.yotogiClass.Contains(id3))
- {
- this.selectedYotogiClass = this.yotogiClass.Get(id3);
- }
- }
- if (this.selectedYotogiClass == null)
- {
- ClassData<YotogiClass.Data>[] valueArray2 = this.yotogiClass.datas.GetValueArray();
- int num8 = 0;
- if (num8 < valueArray2.Length)
- {
- ClassData<YotogiClass.Data> selectedYotogiClass = valueArray2[num8];
- this.selectedYotogiClass = selectedYotogiClass;
- }
- }
- this.additionalRelation_ = AdditionalRelation.Null;
- if (1270 <= num)
- {
- this.additionalRelation_ = (AdditionalRelation)binary.ReadInt16();
- this.nickName_ = binary.ReadString();
- this.age = binary.ReadInt32();
- if (this.additionalRelation_ == AdditionalRelation.Vigilance)
- {
- if (this.relation == Relation.Trust || this.relation == Relation.Lover)
- {
- this.additionalRelation_ = AdditionalRelation.Null;
- }
- if (this.relation == Relation.Lover)
- {
- if ((this.personal.uniqueName == "Muku" && this.GetEventEndFlag(5040)) || (this.personal.uniqueName == "Majime" && this.GetEventEndFlag(5140)) || (this.personal.uniqueName == "Rindere" && this.GetEventEndFlag(5240)))
- {
- this.additionalRelation_ = AdditionalRelation.LoverPlus;
- }
- }
- else if (this.relation == Relation.Contact && ((this.personal.uniqueName == "Muku" && this.GetEventEndFlag(5030)) || (this.personal.uniqueName == "Majime" && this.GetEventEndFlag(5130)) || (this.personal.uniqueName == "Rindere" && this.GetEventEndFlag(5230))))
- {
- this.additionalRelation_ = AdditionalRelation.Null;
- }
- }
- }
- uint num9 = binary.ReadUInt32();
- NDebug.Assert(2177629204u == num9, "メイドパラメータのロードに失敗しました");
- if (num <= 1050)
- {
- YotogiClass.Data data = YotogiClass.GetData("Kokuhakuplay");
- if (this.yotogiClass.Get(data) != null && this.contract != Contract.Free)
- {
- this.yotogiClass.Remove(data, true);
- }
- List<int> list = new List<int>();
- foreach (YotogiSkillData yotogiSkillData in this.yotogiSkill.datas.GetValueArray())
- {
- YotogiClass.Data yotogi_class = yotogiSkillData.data.getcondition_data.yotogi_class;
- if (yotogi_class != null && !this.yotogiClass.Contains(yotogi_class) && yotogi_class.learnConditions.requestContracts.Count != 0 && !yotogi_class.learnConditions.requestContracts.Contains(this.contract))
- {
- list.Add(yotogiSkillData.id);
- }
- }
- foreach (int skillId in list)
- {
- this.yotogiSkill.Remove(skillId);
- }
- }
- List<Skill.Data> learnPossibleSkills = Skill.GetLearnPossibleSkills(this);
- foreach (Skill.Data data2 in learnPossibleSkills)
- {
- if (data2.specialConditionType == Skill.Data.SpecialConditionType.GP01Recollect)
- {
- this.yotogiSkill.Add(data2);
- }
- }
- }
- public void Deserialize(StatusReader oldStatusReader, bool convertYotogiSkill)
- {
- Func<int, int> func = (int value) => (int)System.Math.Floor((double)((float)value * 0.3f));
- this.OldStatus = new Status(this);
- this.creationTimeNum = oldStatusReader.creationTimeNum;
- this.guid = oldStatusReader.guid;
- this.heroineType = HeroineType.Transfer;
- this.mainChara = false;
- this.employmentDay = GameMain.Instance.CharacterMgr.status.days;
- this.lastName = oldStatusReader.lastName;
- this.firstName = oldStatusReader.firstName;
- this.freeComment = oldStatusReader.freeComment;
- this.initSeikeiken = oldStatusReader.initSeikeiken;
- this.seikeiken = oldStatusReader.seikeiken;
- string uniqueName = oldStatusReader.personal.ToString();
- this.SetPersonal(Personal.GetData(uniqueName));
- this.contract = oldStatusReader.contract;
- this.body.height = oldStatusReader.body.height;
- this.body.weight = oldStatusReader.body.weight;
- this.body.bust = oldStatusReader.body.bust;
- this.body.waist = oldStatusReader.body.waist;
- this.body.hip = oldStatusReader.body.hip;
- this.body.cup = oldStatusReader.body.cup;
- if (oldStatusReader.relation == Relation.Tonus || oldStatusReader.relation == Relation.Contact)
- {
- this.relation_ = Relation.Contact;
- }
- else if (oldStatusReader.relation == Relation.Trust)
- {
- this.relation_ = Relation.Trust;
- }
- else
- {
- this.relation_ = Relation.Lover;
- }
- this.playCountYotogi = oldStatusReader.playCountYotogi;
- this.playCountNightWork = oldStatusReader.playCountNightWork;
- this.likability = oldStatusReader.likability;
- this.studyRate = oldStatusReader.studyRate;
- int num = 100;
- this.baseMaxHp = num;
- this.currentHp = num;
- num = 100;
- this.baseMaxMind = num;
- this.currentMind = num;
- this.baseReception = func(oldStatusReader.reception);
- this.baseCare = func(oldStatusReader.care);
- this.baseLovely = func(oldStatusReader.lovely);
- this.baseElegance = func(oldStatusReader.elegance);
- this.baseCharm = func(oldStatusReader.charm);
- num = 0;
- this.baseAppealPoint = num;
- num = num;
- this.baseDance = num;
- num = num;
- this.baseVocal = num;
- this.baseCooking = num;
- this.baseInyoku = func(oldStatusReader.inyoku);
- this.baseMvalue = func(oldStatusReader.mvalue);
- this.baseHentai = func(oldStatusReader.hentai);
- this.baseHousi = func(oldStatusReader.housi);
- this.baseTeachRate = func(oldStatusReader.teachRate);
- this.sexPlayNumberOfPeople = oldStatusReader.sexPlayNumberOfPeople;
- this.popularRank = 0;
- num = 0;
- this.evaluation = num;
- this.sales = (long)num;
- this.totalSales = oldStatusReader.totalSales;
- this.totalEvaluations = oldStatusReader.totalEvaluations;
- this.leader = false;
- this.isFirstNameCall = oldStatusReader.isFirstNameCall;
- this.eyePartsTab = EyePartsTab.LR;
- this.noonWorkId = (this.nightWorkId = 0);
- this.noonCommu = (this.nightCommu = false);
- this.features_.Clear();
- this.propensitys_.Clear();
- this.jobClass.Clear();
- this.yotogiClass.Clear();
- this.yotogiSkill.Clear();
- this.workDatas_.Clear();
- this.flags_.Clear();
- this.eventEndFlags_.Clear();
- this.selectedJobClass = null;
- AbstractClassData.ClassType classTypeFlags = AbstractClassData.ClassType.Share | AbstractClassData.ClassType.New | AbstractClassData.ClassType.Old;
- List<JobClass.Data> learnPossibleClassDatas = this.jobClass.GetLearnPossibleClassDatas(true, classTypeFlags);
- foreach (JobClass.Data data in learnPossibleClassDatas)
- {
- if (GameMain.Instance.CharacterMgr.status.IsJobClassOpenFlag(data.id))
- {
- this.jobClass.Add(data, false, false);
- }
- }
- List<YotogiClass.Data> learnPossibleClassDatas2 = this.yotogiClass.GetLearnPossibleClassDatas(true, classTypeFlags);
- foreach (YotogiClass.Data data2 in learnPossibleClassDatas2)
- {
- if (GameMain.Instance.CharacterMgr.status.IsYotogiClassOpenFlag(data2.id))
- {
- this.yotogiClass.Add(data2, false, false);
- }
- }
- foreach (StatusReader.ClassData classData in oldStatusReader.maidClassDatas)
- {
- if (classData.isHave && JobClass.IsEnabled(classData.classId) && !this.jobClass.Contains(classData.classId))
- {
- ClassData<JobClass.Data> classData2 = this.jobClass.Add(classData.classId, false, false);
- if (classData2 != null)
- {
- classData2.expSystem.SetLevel(classData.level);
- }
- }
- }
- foreach (StatusReader.ClassData classData3 in oldStatusReader.yotogiClassDatas)
- {
- if (classData3.isHave && YotogiClass.IsEnabled(classData3.classId) && !this.yotogiClass.Contains(classData3.classId))
- {
- ClassData<YotogiClass.Data> classData4 = this.yotogiClass.Add(classData3.classId, false, false);
- if (classData4 != null)
- {
- classData4.expSystem.SetLevel(classData3.level);
- }
- }
- }
- if (oldStatusReader.selectedMaidClass != null && this.jobClass.Contains(oldStatusReader.selectedMaidClass.classId))
- {
- this.selectedJobClass = this.jobClass.Get(oldStatusReader.selectedMaidClass.classId);
- }
- if (this.selectedJobClass == null)
- {
- ClassData<JobClass.Data>[] valueArray = this.jobClass.oldDatas.GetValueArray();
- int num2 = 0;
- if (num2 < valueArray.Length)
- {
- ClassData<JobClass.Data> selectedJobClass = valueArray[num2];
- this.selectedJobClass = selectedJobClass;
- }
- }
- if (convertYotogiSkill)
- {
- List<Skill.Data> learnPossibleSkills = Skill.GetLearnPossibleSkills(this);
- foreach (Skill.Data data3 in learnPossibleSkills)
- {
- this.yotogiSkill.Add(data3.id);
- }
- foreach (KeyValuePair<int, StatusReader.SkillData> keyValuePair in oldStatusReader.yotogiSkillDatas)
- {
- int id = keyValuePair.Value.id;
- int level = keyValuePair.Value.level;
- uint playCount = keyValuePair.Value.playCount;
- if (!this.yotogiSkill.Contains(id) && Skill.Old.Contains(id))
- {
- this.yotogiSkill.Add(id);
- }
- YotogiSkillData yotogiSkillData = this.yotogiSkill.Get(id);
- if (yotogiSkillData != null && yotogiSkillData.oldData != null)
- {
- yotogiSkillData.expSystem.SetLevel(level);
- yotogiSkillData.playCount = playCount;
- }
- }
- }
- foreach (KeyValuePair<int, StatusReader.WorkData> keyValuePair2 in oldStatusReader.workDatas)
- {
- this.workDatas_.Add(keyValuePair2.Key, keyValuePair2.Value.toNewWorkData());
- }
- foreach (int num3 in oldStatusReader.features)
- {
- StatusReader.Feature feature = (StatusReader.Feature)num3;
- string uniqueName2 = feature.ToString();
- this.AddFeature(Feature.GetData(uniqueName2));
- }
- this.OldStatus.employmentElapsedDay = oldStatusReader.employmentElapsedDay;
- this.OldStatus.relation = oldStatusReader.relation;
- Dictionary<StatusReader.Propensity, string> dictionary = new Dictionary<StatusReader.Propensity, string>();
- dictionary.Add(StatusReader.Propensity.淫乱, "敏感体質");
- dictionary.Add(StatusReader.Propensity.変態, "変態の素質");
- dictionary.Add(StatusReader.Propensity.飲精好き, "ごっくん大好き");
- dictionary.Add(StatusReader.Propensity.奉仕好き, "桃色泡姫");
- dictionary.Add(StatusReader.Propensity.M女, "ドMの素質");
- dictionary.Add(StatusReader.Propensity.中出し好き, "中出し大好き");
- foreach (int num4 in oldStatusReader.propensitys)
- {
- StatusReader.Propensity key = (StatusReader.Propensity)num4;
- if (dictionary.ContainsKey(key))
- {
- this.AddPropensity(Propensity.GetData(dictionary[key]));
- }
- }
- if (1000 <= oldStatusReader.sexual.curi)
- {
- this.AddPropensity(Propensity.GetData("敏感なクリトリス"));
- }
- this.partsDic = new Dictionary<string, string>(oldStatusReader.partsDic);
- this.OldStatus.isMarriage = (oldStatusReader.flags.ContainsKey("_maid_param_marriage_flag") && oldStatusReader.flags["_maid_param_marriage_flag"] != 0);
- this.OldStatus.isNewWife = (oldStatusReader.flags.ContainsKey("_maid_param_newwife_flag") && oldStatusReader.flags["_maid_param_newwife_flag"] != 0);
- foreach (KeyValuePair<string, int> keyValuePair3 in oldStatusReader.flags)
- {
- this.OldStatus.AddFlag(keyValuePair3.Key, keyValuePair3.Value);
- }
- if (!GameMain.Instance.CharacterMgr.status.isOldPlayer)
- {
- this.likability = 0;
- this.relation_ = Relation.Contact;
- this.OldStatus.isMarriage = false;
- this.OldStatus.isNewWife = false;
- }
- this.profileComment = MaidProfile.Create(this.maid, true);
- }
- public const int MaidPointUpStatus = 20;
- public const int NullID = -2147483648;
- private const uint SaveDataCheckCode = 2177629204u;
- public HeroineType heroineType;
- public bool mainChara;
- public SubMaid.Data subCharaData;
- public string profileComment;
- public int age;
- public Seikeiken initSeikeiken;
- public Seikeiken seikeiken;
- public Contract contract;
- public BodyData body;
- public int noonWorkId;
- public int nightWorkId;
- public bool noonCommu;
- public bool nightCommu;
- public bool leader;
- public bool isFirstNameCall;
- public bool enabledYotogiStatusLock;
- public EyePartsTab eyePartsTab;
- private Dictionary<int, Feature.Data> features_;
- private Dictionary<int, Propensity.Data> propensitys_;
- private BonusStatus bonusStatus;
- private string freeComment_;
- private Personal.Data personal_;
- private int employmentDay_;
- private string lastName_ = string.Empty;
- private string firstName_ = string.Empty;
- private string nickName_ = string.Empty;
- private Relation relation_;
- private AdditionalRelation additionalRelation_;
- private ushort playCountYotogi_;
- private ushort playCountNightWork_;
- private ushort likability_;
- private ushort studyRate_;
- private int currentExcite_;
- private int currentSensual_;
- private ushort maxHp_;
- private ushort currentHp_;
- private ushort maxMind_;
- private ushort currentMind_;
- private ushort maxReason_;
- private ushort currentReason_;
- private ushort reception_;
- private ushort care_;
- private ushort lovely_;
- private ushort elegance_;
- private ushort charm_;
- private ushort cooking_;
- private ushort vocal_;
- private ushort dance_;
- private ushort appealPoint_;
- private ushort inyoku_;
- private ushort m_value_;
- private ushort hentai_;
- private ushort housi_;
- private ushort teachRate_;
- private ushort sexPlayNumberOfPeople_;
- private ushort popularRank_;
- private long sales_;
- private long totalSales_;
- private ushort evaluation_;
- private long totalEvaluation_;
- private Dictionary<int, WorkData> workDatas_;
- private Dictionary<string, int> flags_;
- private Dictionary<int, bool> eventEndFlags_;
- private VoiceGroup voiceGroup_;
- }
- }
|