12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901 |
- 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 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(1150);
- 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_;
- }
- }
|