1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909 |
- 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 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, 8) : string.Empty);
- }
- }
- public string firstName
- {
- get
- {
- return this.firstName_;
- }
- set
- {
- this.firstName_ = ((value != null) ? Status.ConvertString(value, 8) : string.Empty);
- }
- }
- public string fullNameJpStyle
- {
- get
- {
- return this.lastName + " " + this.firstName;
- }
- }
- public string fullNameEnStyle
- {
- get
- {
- return this.firstName + " " + this.lastName;
- }
- }
- 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 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 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;
- 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;
- 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(1170);
- 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(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;
- }
- }
- 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);
- }
- }
- }
- 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.care);
- 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 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 Relation relation_;
- 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_;
- }
- }
|