Status.cs 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Globalization;
  4. using System.IO;
  5. using System.Text.RegularExpressions;
  6. using Edit;
  7. using MaidStatus.CsvData;
  8. using MaidStatus.Old;
  9. using UnityEngine;
  10. using wf;
  11. using Yotogis;
  12. namespace MaidStatus
  13. {
  14. public class Status
  15. {
  16. public Status()
  17. {
  18. Feature.CreateData();
  19. Propensity.CreateData();
  20. YotogiClass.CreateData();
  21. JobClass.CreateData();
  22. Personal.CreateData();
  23. SubMaid.CreateData();
  24. PersonalEventBlocker.CreateData();
  25. this.body = new BodyData();
  26. this.features_ = new Dictionary<int, Feature.Data>();
  27. this.features = new ReadOnlyDictionary<int, Feature.Data>(this.features_);
  28. this.propensitys_ = new Dictionary<int, Propensity.Data>();
  29. this.propensitys = new ReadOnlyDictionary<int, Propensity.Data>(this.propensitys_);
  30. this.jobClass = new JobClassSystem(this);
  31. this.yotogiClass = new YotogiClassSystem(this);
  32. this.yotogiSkill = new YotogiSkillSystem(this);
  33. this.workDatas_ = new Dictionary<int, WorkData>();
  34. this.workDatas = new ReadOnlyDictionary<int, WorkData>(this.workDatas_);
  35. this.flags_ = new Dictionary<string, int>();
  36. this.flags = new ReadOnlyDictionary<string, int>(this.flags_);
  37. this.eventEndFlags_ = new Dictionary<int, bool>();
  38. this.eventEndFlags = new ReadOnlyDictionary<int, bool>(this.eventEndFlags_);
  39. this.partsDic = new Dictionary<string, string>();
  40. this.bonusStatus = new BonusStatus();
  41. this.SetPersonal(Personal.GetData("Muku"));
  42. this.heroineType = HeroineType.Original;
  43. this.mainChara = false;
  44. this.subCharaData = null;
  45. this.firstName = MaidRandomName.GetFirstName();
  46. this.lastName = MaidRandomName.GetLastName();
  47. this.isFirstNameCall = true;
  48. this.enabledYotogiStatusLock = false;
  49. string empty = string.Empty;
  50. this.freeComment = empty;
  51. this.profileComment = empty;
  52. }
  53. public static int maxNameLength
  54. {
  55. get
  56. {
  57. return (!Product.isEnglish) ? 8 : 11;
  58. }
  59. }
  60. public static int minAge
  61. {
  62. get
  63. {
  64. return 20;
  65. }
  66. }
  67. public static int maxAge
  68. {
  69. get
  70. {
  71. return 999;
  72. }
  73. }
  74. public string guid { get; private set; }
  75. public string saveDataGuidGP03 { get; private set; }
  76. public string saveDataGuidGP03Temp { get; private set; }
  77. public string creationTime { get; private set; }
  78. public ulong creationTimeNum { get; private set; }
  79. public Maid maid { get; private set; }
  80. public SubMaid.Data.CharacterStatus subCharaStatus
  81. {
  82. get
  83. {
  84. return (this.subCharaData != null) ? ((!GameMain.Instance.CharacterMgr.status.lockUserDraftMaid || this.subCharaData.secondStatus == null) ? this.subCharaData.status : this.subCharaData.secondStatus) : null;
  85. }
  86. }
  87. public GP003Status gp003Status
  88. {
  89. get
  90. {
  91. return this.gp003Status_;
  92. }
  93. }
  94. public int employmentDay
  95. {
  96. get
  97. {
  98. return this.employmentDay_;
  99. }
  100. set
  101. {
  102. this.employmentDay_ = wf.Math.Round5(value);
  103. }
  104. }
  105. public int employmentElapsedDay
  106. {
  107. get
  108. {
  109. int num = GameMain.Instance.CharacterMgr.status.days - this.employmentDay_;
  110. num += ((this.OldStatus != null) ? this.OldStatus.employmentElapsedDay : 0);
  111. return wf.Math.Round5(num);
  112. }
  113. }
  114. public string lastName
  115. {
  116. get
  117. {
  118. return this.lastName_;
  119. }
  120. set
  121. {
  122. this.lastName_ = ((value != null) ? Status.ConvertString(value, Status.maxNameLength) : string.Empty);
  123. }
  124. }
  125. public string firstName
  126. {
  127. get
  128. {
  129. return this.firstName_;
  130. }
  131. set
  132. {
  133. this.firstName_ = ((value != null) ? Status.ConvertString(value, Status.maxNameLength) : string.Empty);
  134. }
  135. }
  136. public NamePair charaName
  137. {
  138. get
  139. {
  140. NamePair result = new NamePair((!Product.isEnglish) ? this.lastName : this.firstName, (!Product.isEnglish) ? this.firstName : this.lastName);
  141. return result;
  142. }
  143. }
  144. public string fullNameJpStyle
  145. {
  146. get
  147. {
  148. return this.lastName + " " + this.firstName;
  149. }
  150. }
  151. public string fullNameEnStyle
  152. {
  153. get
  154. {
  155. return this.firstName + " " + this.lastName;
  156. }
  157. }
  158. public string nickName
  159. {
  160. get
  161. {
  162. return this.nickName_;
  163. }
  164. set
  165. {
  166. this.nickName_ = ((value != null) ? Status.ConvertString(value, Status.maxNameLength) : string.Empty);
  167. }
  168. }
  169. public string callName
  170. {
  171. get
  172. {
  173. return (!this.isNickNameCall) ? ((!this.isFirstNameCall) ? this.lastName : this.firstName) : this.nickName;
  174. }
  175. }
  176. public string freeComment
  177. {
  178. get
  179. {
  180. return this.freeComment_;
  181. }
  182. set
  183. {
  184. this.freeComment_ = ((value != null) ? Status.ConvertString(value, 308) : string.Empty);
  185. }
  186. }
  187. public Personal.Data personal
  188. {
  189. get
  190. {
  191. return this.personal_;
  192. }
  193. }
  194. public ClassData<JobClass.Data> selectedJobClass { get; private set; }
  195. public ClassData<YotogiClass.Data> selectedYotogiClass { get; private set; }
  196. public Relation relation
  197. {
  198. get
  199. {
  200. return this.relation_;
  201. }
  202. set
  203. {
  204. this.relation_ = value;
  205. if (this.OldStatus != null)
  206. {
  207. if (value == Relation.Contact && this.OldStatus.relation != Relation.Contact)
  208. {
  209. this.OldStatus.relation = Relation.Contact;
  210. }
  211. else if (value == Relation.Trust && this.OldStatus.relation != Relation.Trust)
  212. {
  213. this.OldStatus.relation = Relation.Trust;
  214. }
  215. else if (value == Relation.Lover && this.OldStatus.relation != Relation.Lover)
  216. {
  217. this.OldStatus.relation = Relation.Lover;
  218. }
  219. }
  220. }
  221. }
  222. public AdditionalRelation additionalRelation
  223. {
  224. get
  225. {
  226. return this.additionalRelation_;
  227. }
  228. set
  229. {
  230. if (Product.enabeldAdditionalRelation && this.personal.enabledAdditionalRelation)
  231. {
  232. this.additionalRelation_ = ((this.heroineType == HeroineType.Sub) ? AdditionalRelation.Null : value);
  233. }
  234. else
  235. {
  236. this.additionalRelation_ = AdditionalRelation.Null;
  237. }
  238. }
  239. }
  240. public string conditionText
  241. {
  242. get
  243. {
  244. return Title.Get(this);
  245. }
  246. }
  247. public string conditionTermText
  248. {
  249. get
  250. {
  251. return "MaidStatus/ステータス称号/" + this.conditionText;
  252. }
  253. }
  254. public int playCountYotogi
  255. {
  256. get
  257. {
  258. return (int)this.playCountYotogi_;
  259. }
  260. set
  261. {
  262. this.playCountYotogi_ = (ushort)wf.Math.Round4(value);
  263. }
  264. }
  265. public int playCountNightWork
  266. {
  267. get
  268. {
  269. return (int)this.playCountNightWork_;
  270. }
  271. set
  272. {
  273. this.playCountNightWork_ = (ushort)wf.Math.Round4(value);
  274. }
  275. }
  276. public int likability
  277. {
  278. get
  279. {
  280. return (int)this.likability_;
  281. }
  282. set
  283. {
  284. this.likability_ = (ushort)wf.Math.Round3(value);
  285. }
  286. }
  287. public int studyRate
  288. {
  289. get
  290. {
  291. return (int)this.studyRate_;
  292. }
  293. set
  294. {
  295. this.studyRate_ = (ushort)wf.Math.RoundMinMax(value, 0, 1000);
  296. }
  297. }
  298. public int currentExcite
  299. {
  300. get
  301. {
  302. return this.currentExcite_;
  303. }
  304. set
  305. {
  306. this.currentExcite_ = wf.Math.RoundMinMax(value, -100, 300);
  307. }
  308. }
  309. public int currentSensual
  310. {
  311. get
  312. {
  313. return this.currentSensual_;
  314. }
  315. set
  316. {
  317. this.currentSensual_ = wf.Math.RoundMinMax(value, 0, 300);
  318. }
  319. }
  320. public int maxHp
  321. {
  322. get
  323. {
  324. return wf.Math.Round3((int)this.maxHp_ + this.bonusStatus.hp);
  325. }
  326. }
  327. public int baseMaxHp
  328. {
  329. get
  330. {
  331. return (int)this.maxHp_;
  332. }
  333. set
  334. {
  335. this.maxHp_ = (ushort)wf.Math.Round3(value);
  336. }
  337. }
  338. public int currentHp
  339. {
  340. get
  341. {
  342. return (int)this.currentHp_;
  343. }
  344. set
  345. {
  346. this.currentHp_ = (ushort)wf.Math.RoundMinMax(value, 0, this.maxHp);
  347. }
  348. }
  349. public int maxMind
  350. {
  351. get
  352. {
  353. return wf.Math.Round3((int)this.maxMind_ + this.bonusStatus.mind);
  354. }
  355. }
  356. public int baseMaxMind
  357. {
  358. get
  359. {
  360. return (int)this.maxMind_;
  361. }
  362. set
  363. {
  364. this.maxMind_ = (ushort)wf.Math.Round3(value);
  365. }
  366. }
  367. public int currentMind
  368. {
  369. get
  370. {
  371. return (int)this.currentMind_;
  372. }
  373. set
  374. {
  375. this.currentMind_ = (ushort)wf.Math.RoundMinMax(value, 0, this.maxMind);
  376. }
  377. }
  378. public int maxReason
  379. {
  380. get
  381. {
  382. return wf.Math.Round3((int)this.maxReason_ + this.bonusStatus.reason);
  383. }
  384. }
  385. public int baseMaxReason
  386. {
  387. get
  388. {
  389. return (int)this.maxReason_;
  390. }
  391. set
  392. {
  393. this.maxReason_ = (ushort)wf.Math.Round3(value);
  394. }
  395. }
  396. public int currentReason
  397. {
  398. get
  399. {
  400. return (int)this.currentReason_;
  401. }
  402. set
  403. {
  404. this.currentReason_ = (ushort)wf.Math.RoundMinMax(value, 0, this.maxReason);
  405. }
  406. }
  407. public int reception
  408. {
  409. get
  410. {
  411. return wf.Math.Round4((int)this.reception_ + this.bonusStatus.reception);
  412. }
  413. }
  414. public int baseReception
  415. {
  416. get
  417. {
  418. return (int)this.reception_;
  419. }
  420. set
  421. {
  422. this.reception_ = (ushort)wf.Math.Round4(value);
  423. }
  424. }
  425. public int care
  426. {
  427. get
  428. {
  429. return wf.Math.Round4((int)this.care_ + this.bonusStatus.care);
  430. }
  431. }
  432. public int baseCare
  433. {
  434. get
  435. {
  436. return (int)this.care_;
  437. }
  438. set
  439. {
  440. this.care_ = (ushort)wf.Math.Round4(value);
  441. }
  442. }
  443. public int lovely
  444. {
  445. get
  446. {
  447. return wf.Math.Round4((int)this.lovely_ + this.bonusStatus.lovely);
  448. }
  449. }
  450. public int baseLovely
  451. {
  452. get
  453. {
  454. return (int)this.lovely_;
  455. }
  456. set
  457. {
  458. this.lovely_ = (ushort)wf.Math.Round4(value);
  459. }
  460. }
  461. public int elegance
  462. {
  463. get
  464. {
  465. return wf.Math.Round4((int)this.elegance_ + this.bonusStatus.elegance);
  466. }
  467. }
  468. public int baseElegance
  469. {
  470. get
  471. {
  472. return (int)this.elegance_;
  473. }
  474. set
  475. {
  476. this.elegance_ = (ushort)wf.Math.Round4(value);
  477. }
  478. }
  479. public int charm
  480. {
  481. get
  482. {
  483. return wf.Math.Round4((int)this.charm_ + this.bonusStatus.charm);
  484. }
  485. }
  486. public int baseCharm
  487. {
  488. get
  489. {
  490. return (int)this.charm_;
  491. }
  492. set
  493. {
  494. this.charm_ = (ushort)wf.Math.Round4(value);
  495. }
  496. }
  497. public int cooking
  498. {
  499. get
  500. {
  501. return wf.Math.Round4((int)this.cooking_ + this.bonusStatus.charm);
  502. }
  503. }
  504. public int baseCooking
  505. {
  506. get
  507. {
  508. return (int)this.cooking_;
  509. }
  510. set
  511. {
  512. this.cooking_ = (ushort)wf.Math.Round4(value);
  513. }
  514. }
  515. public int vocal
  516. {
  517. get
  518. {
  519. return wf.Math.Round4((int)this.vocal_ + this.bonusStatus.vocal);
  520. }
  521. }
  522. public int baseVocal
  523. {
  524. get
  525. {
  526. return (int)this.vocal_;
  527. }
  528. set
  529. {
  530. this.vocal_ = (ushort)wf.Math.Round4(value);
  531. }
  532. }
  533. public int dance
  534. {
  535. get
  536. {
  537. return wf.Math.Round4((int)this.dance_ + this.bonusStatus.dance);
  538. }
  539. }
  540. public int baseDance
  541. {
  542. get
  543. {
  544. return (int)this.dance_;
  545. }
  546. set
  547. {
  548. this.dance_ = (ushort)wf.Math.Round4(value);
  549. }
  550. }
  551. public int appealPoint
  552. {
  553. get
  554. {
  555. return wf.Math.RoundMinMax((int)this.appealPoint_ + this.bonusStatus.appealPoint, 0, this.maxAppealPoint);
  556. }
  557. }
  558. public int baseAppealPoint
  559. {
  560. get
  561. {
  562. return (int)this.appealPoint_;
  563. }
  564. set
  565. {
  566. this.appealPoint_ = (ushort)wf.Math.RoundMinMax(value, 0, this.maxAppealPoint);
  567. }
  568. }
  569. public int maxAppealPoint
  570. {
  571. get
  572. {
  573. return 200 + wf.Math.Round4(this.dance) / 1000 * 200;
  574. }
  575. }
  576. public int inyoku
  577. {
  578. get
  579. {
  580. return wf.Math.Round4((int)this.inyoku_ + this.bonusStatus.inyoku);
  581. }
  582. }
  583. public int baseInyoku
  584. {
  585. get
  586. {
  587. return (int)this.inyoku_;
  588. }
  589. set
  590. {
  591. this.inyoku_ = (ushort)wf.Math.Round4(value);
  592. }
  593. }
  594. public int mvalue
  595. {
  596. get
  597. {
  598. return wf.Math.Round4((int)this.m_value_ + this.bonusStatus.mvalue);
  599. }
  600. }
  601. public int baseMvalue
  602. {
  603. get
  604. {
  605. return (int)this.m_value_;
  606. }
  607. set
  608. {
  609. this.m_value_ = (ushort)wf.Math.Round4(value);
  610. }
  611. }
  612. public int hentai
  613. {
  614. get
  615. {
  616. return wf.Math.Round4((int)this.hentai_ + this.bonusStatus.hentai);
  617. }
  618. }
  619. public int baseHentai
  620. {
  621. get
  622. {
  623. return (int)this.hentai_;
  624. }
  625. set
  626. {
  627. this.hentai_ = (ushort)wf.Math.Round4(value);
  628. }
  629. }
  630. public int housi
  631. {
  632. get
  633. {
  634. return wf.Math.Round4((int)this.housi_ + this.bonusStatus.housi);
  635. }
  636. }
  637. public int baseHousi
  638. {
  639. get
  640. {
  641. return (int)this.housi_;
  642. }
  643. set
  644. {
  645. this.housi_ = (ushort)wf.Math.Round4(value);
  646. }
  647. }
  648. public int teachRate
  649. {
  650. get
  651. {
  652. return wf.Math.Round4((int)this.teachRate_ + this.bonusStatus.teachRate);
  653. }
  654. }
  655. public int baseTeachRate
  656. {
  657. get
  658. {
  659. return (int)this.teachRate_;
  660. }
  661. set
  662. {
  663. this.teachRate_ = (ushort)wf.Math.Round4(value);
  664. }
  665. }
  666. public int sexPlayNumberOfPeople
  667. {
  668. get
  669. {
  670. return (int)this.sexPlayNumberOfPeople_;
  671. }
  672. set
  673. {
  674. this.sexPlayNumberOfPeople_ = (ushort)wf.Math.Round3(value);
  675. }
  676. }
  677. public int popularRank
  678. {
  679. get
  680. {
  681. return (int)this.popularRank_;
  682. }
  683. set
  684. {
  685. this.popularRank_ = (ushort)wf.Math.Round3(value);
  686. }
  687. }
  688. public int evaluation
  689. {
  690. get
  691. {
  692. return (int)this.evaluation_;
  693. }
  694. set
  695. {
  696. this.evaluation_ = (ushort)wf.Math.Round4(value);
  697. }
  698. }
  699. public long totalEvaluations
  700. {
  701. get
  702. {
  703. return this.totalEvaluation_;
  704. }
  705. set
  706. {
  707. this.totalEvaluation_ = System.Math.Min(System.Math.Max(value, 0L), 9999999999L);
  708. }
  709. }
  710. public long sales
  711. {
  712. get
  713. {
  714. return this.sales_;
  715. }
  716. set
  717. {
  718. this.sales_ = System.Math.Min(System.Math.Max(value, 0L), 9999999999L);
  719. }
  720. }
  721. public long totalSales
  722. {
  723. get
  724. {
  725. return this.totalSales_;
  726. }
  727. set
  728. {
  729. this.totalSales_ = System.Math.Min(System.Math.Max(value, 0L), 9999999999L);
  730. }
  731. }
  732. public Feeling feeling
  733. {
  734. get
  735. {
  736. return (Feeling)this.flags_["__vr_feeling"];
  737. }
  738. set
  739. {
  740. this.flags_["__vr_feeling"] = (int)value;
  741. }
  742. }
  743. public bool isScoutMaid
  744. {
  745. get
  746. {
  747. return this.flags_["__is_scout_maid"] == 1;
  748. }
  749. set
  750. {
  751. this.flags_["__is_scout_maid"] = ((!value) ? 0 : 1);
  752. }
  753. }
  754. public int inranGap
  755. {
  756. get
  757. {
  758. return this.inyoku + this.lovely;
  759. }
  760. }
  761. public int mValueGap
  762. {
  763. get
  764. {
  765. return this.mvalue + this.elegance;
  766. }
  767. }
  768. public int hentaiGap
  769. {
  770. get
  771. {
  772. return this.hentai + this.charm;
  773. }
  774. }
  775. public int banishmentPrice
  776. {
  777. get
  778. {
  779. return (this.subCharaData == null) ? 10000 : 0;
  780. }
  781. }
  782. public bool isNickNameCall
  783. {
  784. get
  785. {
  786. return this.flags_.ContainsKey("__isNickNameCall__") && this.flags_["__isNickNameCall__"] != 0;
  787. }
  788. set
  789. {
  790. this.flags_["__isNickNameCall__"] = ((!value) ? 0 : 1);
  791. }
  792. }
  793. public VoiceGroup voiceGroup
  794. {
  795. get
  796. {
  797. return this.voiceGroup_;
  798. }
  799. set
  800. {
  801. this.voiceGroup_ = value;
  802. if (this.maid != null && this.maid.body0 != null)
  803. {
  804. this.maid.body0.SetVoiceGroup(value);
  805. }
  806. }
  807. }
  808. public ReadOnlyDictionary<int, Feature.Data> features { get; private set; }
  809. public ReadOnlyDictionary<int, Propensity.Data> propensitys { get; private set; }
  810. public JobClassSystem jobClass { get; private set; }
  811. public YotogiClassSystem yotogiClass { get; private set; }
  812. public YotogiSkillSystem yotogiSkill { get; private set; }
  813. public ReadOnlyDictionary<int, WorkData> workDatas { get; private set; }
  814. public ReadOnlyDictionary<string, int> flags { get; private set; }
  815. public ReadOnlyDictionary<int, bool> eventEndFlags { get; private set; }
  816. public Dictionary<string, string> partsDic { get; private set; }
  817. public Status OldStatus { get; private set; }
  818. public bool isCompatiblePersonality
  819. {
  820. get
  821. {
  822. return this.heroineType == HeroineType.Transfer && this.personal.compatible && !this.maid.IsCrcBody;
  823. }
  824. }
  825. public static string ConvertString(string str, int maxStrSize = 8)
  826. {
  827. str = Regex.Replace(str, "[\\r\\n\\t\\\\]", string.Empty);
  828. if (str.Length == 0)
  829. {
  830. str = " ";
  831. }
  832. StringInfo stringInfo = new StringInfo(str);
  833. if (maxStrSize < stringInfo.LengthInTextElements)
  834. {
  835. str = stringInfo.SubstringByTextElements(0, maxStrSize);
  836. }
  837. return str;
  838. }
  839. public void SetNewGuidAndCreationTime(string guidText = null, string creationTimeText = null)
  840. {
  841. this.guid = ((!string.IsNullOrEmpty(guidText)) ? guidText : Guid.NewGuid().ToString());
  842. this.saveDataGuidGP03 = this.guid;
  843. this.creationTime = ((!string.IsNullOrEmpty(creationTimeText)) ? creationTimeText : DateTime.Now.ToString("G", new CultureInfo("ja-JP")).Replace("/", string.Empty));
  844. string text = this.creationTime.Replace(":", string.Empty);
  845. text = text.Replace(" ", string.Empty);
  846. this.creationTimeNum = ulong.Parse(text);
  847. }
  848. public void Initialize(Maid maid)
  849. {
  850. this.maid = maid;
  851. this.SetNewGuidAndCreationTime(null, null);
  852. this.employmentDay = GameMain.Instance.CharacterMgr.status.days;
  853. this.additionalRelation = AdditionalRelation.Vigilance;
  854. this.specialRelation = SpecialRelation.Null;
  855. List<JobClass.Data> learnPossibleClassDatas = this.jobClass.GetLearnPossibleClassDatas(true, AbstractClassData.ClassType.Share | AbstractClassData.ClassType.New);
  856. foreach (JobClass.Data data in learnPossibleClassDatas)
  857. {
  858. this.jobClass.Add(data, true, true);
  859. if (this.selectedJobClass == null)
  860. {
  861. this.ChangeJobClass(data);
  862. }
  863. }
  864. List<YotogiClass.Data> learnPossibleClassDatas2 = this.yotogiClass.GetLearnPossibleClassDatas(true, AbstractClassData.ClassType.Share | AbstractClassData.ClassType.New);
  865. foreach (YotogiClass.Data data2 in learnPossibleClassDatas2)
  866. {
  867. this.yotogiClass.Add(data2, true, true);
  868. if (this.selectedYotogiClass == null)
  869. {
  870. this.ChangeYotogiClass(data2);
  871. }
  872. }
  873. List<Skill.Data> learnPossibleSkills = Skill.GetLearnPossibleSkills(this);
  874. foreach (Skill.Data data3 in learnPossibleSkills)
  875. {
  876. this.yotogiSkill.Add(data3.id);
  877. }
  878. int num = 100;
  879. this.baseMaxReason = num;
  880. num = num;
  881. this.baseMaxMind = num;
  882. this.baseMaxHp = num;
  883. this.UpdateClassBonusStatus();
  884. this.sexPlayNumberOfPeople = MaidProfile.UpdateInitPlayNumber(maid);
  885. this.UpdateBodyParam();
  886. this.profileComment = MaidProfile.Create(maid, false);
  887. this.currentHp = this.maxHp;
  888. this.currentMind = this.maxMind;
  889. }
  890. public bool SetPersonal(int personalId)
  891. {
  892. return this.SetPersonal(Personal.GetData(personalId));
  893. }
  894. public bool SetPersonal(Personal.Data data)
  895. {
  896. if (!Personal.IsEnabled(data.id) && !data.oldPersonal)
  897. {
  898. Debug.LogError("性格[" + data.drawName + "]は有効ではないので設定できません");
  899. return false;
  900. }
  901. this.personal_ = data;
  902. this.additionalRelation = this.additionalRelation;
  903. if (this.personal_.oldPersonal)
  904. {
  905. this.heroineType = HeroineType.Transfer;
  906. if (this.OldStatus == null)
  907. {
  908. this.OldStatus = new Status(this);
  909. }
  910. }
  911. else if (this.heroineType == HeroineType.Transfer)
  912. {
  913. this.heroineType = HeroineType.Original;
  914. this.OldStatus = null;
  915. }
  916. return true;
  917. }
  918. public void SetSeikeikenFront(bool val)
  919. {
  920. if (val)
  921. {
  922. if (this.seikeiken == Seikeiken.Yes_Yes || this.seikeiken == Seikeiken.Yes_No)
  923. {
  924. return;
  925. }
  926. if (this.seikeiken == Seikeiken.No_No)
  927. {
  928. this.seikeiken = Seikeiken.Yes_No;
  929. }
  930. else
  931. {
  932. this.seikeiken = Seikeiken.Yes_Yes;
  933. }
  934. }
  935. else
  936. {
  937. if (this.seikeiken == Seikeiken.No_No || this.seikeiken == Seikeiken.No_Yes)
  938. {
  939. return;
  940. }
  941. if (this.seikeiken == Seikeiken.Yes_Yes)
  942. {
  943. this.seikeiken = Seikeiken.No_Yes;
  944. }
  945. else
  946. {
  947. this.seikeiken = Seikeiken.No_No;
  948. }
  949. }
  950. }
  951. public void SetSeikeikenBack(bool val)
  952. {
  953. if (val)
  954. {
  955. if (this.seikeiken == Seikeiken.Yes_Yes || this.seikeiken == Seikeiken.No_Yes)
  956. {
  957. return;
  958. }
  959. if (this.seikeiken == Seikeiken.No_No)
  960. {
  961. this.seikeiken = Seikeiken.No_Yes;
  962. }
  963. else
  964. {
  965. this.seikeiken = Seikeiken.Yes_Yes;
  966. }
  967. }
  968. else
  969. {
  970. if (this.seikeiken == Seikeiken.No_No || this.seikeiken == Seikeiken.Yes_No)
  971. {
  972. return;
  973. }
  974. if (this.seikeiken == Seikeiken.Yes_Yes)
  975. {
  976. this.seikeiken = Seikeiken.Yes_No;
  977. }
  978. else
  979. {
  980. this.seikeiken = Seikeiken.No_No;
  981. }
  982. }
  983. }
  984. public bool ChangeJobClass(int jobClassId)
  985. {
  986. return this.ChangeJobClass(JobClass.GetData(jobClassId));
  987. }
  988. public bool ChangeJobClass(JobClass.Data data)
  989. {
  990. if (data == null)
  991. {
  992. return false;
  993. }
  994. if (!JobClass.IsEnabled(data.id))
  995. {
  996. Debug.LogError("ジョブクラス[" + data.drawName + "]は有効ではないので設定できません");
  997. return false;
  998. }
  999. if (!this.jobClass.Contains(data.id))
  1000. {
  1001. Debug.LogError("ジョブクラス[" + data.drawName + "]は取得していないので設定できません");
  1002. return false;
  1003. }
  1004. this.selectedJobClass = this.jobClass.Get(data.id);
  1005. return true;
  1006. }
  1007. public bool ChangeYotogiClass(int yotogiClassId)
  1008. {
  1009. return this.ChangeYotogiClass(YotogiClass.GetData(yotogiClassId));
  1010. }
  1011. public bool ChangeYotogiClass(YotogiClass.Data data)
  1012. {
  1013. if (data == null)
  1014. {
  1015. return false;
  1016. }
  1017. if (!YotogiClass.IsEnabled(data.id))
  1018. {
  1019. Debug.LogError("夜伽クラス[" + data.drawName + "]は有効ではないので設定できません");
  1020. return false;
  1021. }
  1022. if (!this.yotogiClass.Contains(data.id))
  1023. {
  1024. Debug.LogError("夜伽クラス[" + data.drawName + "]は取得していないので設定できません");
  1025. return false;
  1026. }
  1027. this.selectedYotogiClass = this.yotogiClass.Get(data.id);
  1028. return true;
  1029. }
  1030. public Feature.Data AddFeature(int featureId)
  1031. {
  1032. return this.AddFeature(Feature.GetData(featureId));
  1033. }
  1034. public Feature.Data AddFeature(Feature.Data data)
  1035. {
  1036. if (data != null && Feature.IsEnabled(data.id) && !this.features_.ContainsKey(data.id))
  1037. {
  1038. this.features_.Add(data.id, data);
  1039. }
  1040. return data;
  1041. }
  1042. public void RemoveFeature(int featureId)
  1043. {
  1044. this.RemoveFeature(Feature.GetData(featureId));
  1045. }
  1046. public void RemoveFeature(Feature.Data data)
  1047. {
  1048. if (data != null && this.features_.ContainsKey(data.id))
  1049. {
  1050. this.features_.Remove(data.id);
  1051. }
  1052. }
  1053. public Propensity.Data AddPropensity(int propensityId)
  1054. {
  1055. return this.AddPropensity(Propensity.GetData(propensityId));
  1056. }
  1057. public Propensity.Data AddPropensity(Propensity.Data data)
  1058. {
  1059. if (data != null && Propensity.IsEnabled(data.id) && !this.propensitys_.ContainsKey(data.id))
  1060. {
  1061. this.propensitys_.Add(data.id, data);
  1062. }
  1063. return data;
  1064. }
  1065. public void RemovePropensity(int featureId)
  1066. {
  1067. this.RemovePropensity(Propensity.GetData(featureId));
  1068. }
  1069. public void RemovePropensity(Propensity.Data data)
  1070. {
  1071. if (data != null && this.propensitys_.ContainsKey(data.id))
  1072. {
  1073. this.propensitys_.Remove(data.id);
  1074. }
  1075. }
  1076. public void SetWorkData(Dictionary<int, WorkData> src)
  1077. {
  1078. this.workDatas_.Clear();
  1079. if (src == null)
  1080. {
  1081. return;
  1082. }
  1083. foreach (KeyValuePair<int, WorkData> keyValuePair in src)
  1084. {
  1085. this.workDatas_.Add(keyValuePair.Key, keyValuePair.Value);
  1086. }
  1087. }
  1088. public void AddWorkDataPlayCount(int id, int addPlayCount)
  1089. {
  1090. if (!this.workDatas_.ContainsKey(id))
  1091. {
  1092. this.workDatas_.Add(id, new WorkData());
  1093. }
  1094. this.workDatas_[id].playCount += (uint)addPlayCount;
  1095. }
  1096. public void SetWorkDataLevel(int id, int level)
  1097. {
  1098. if (!this.workDatas_.ContainsKey(id))
  1099. {
  1100. this.workDatas_.Add(id, new WorkData());
  1101. }
  1102. this.workDatas_[id].level = level;
  1103. }
  1104. public void SetFlag(string flagName, int value)
  1105. {
  1106. if (!this.flags_.ContainsKey(flagName))
  1107. {
  1108. this.flags_.Add(flagName, value);
  1109. }
  1110. else
  1111. {
  1112. this.flags_[flagName] = value;
  1113. }
  1114. }
  1115. public void AddFlag(string flagName, int value)
  1116. {
  1117. if (!this.flags_.ContainsKey(flagName))
  1118. {
  1119. this.flags_.Add(flagName, value);
  1120. }
  1121. else
  1122. {
  1123. Dictionary<string, int> dictionary;
  1124. (dictionary = this.flags_)[flagName] = dictionary[flagName] + value;
  1125. }
  1126. }
  1127. public int GetFlag(string flagName)
  1128. {
  1129. return (!this.flags_.ContainsKey(flagName)) ? 0 : this.flags_[flagName];
  1130. }
  1131. public bool RemoveFlag(string flagName)
  1132. {
  1133. return this.flags_.ContainsKey(flagName) && this.flags_.Remove(flagName);
  1134. }
  1135. public void RemoveFlagAll()
  1136. {
  1137. this.flags_.Clear();
  1138. }
  1139. public void SetEventEndFlag(int id, bool value)
  1140. {
  1141. if (this.eventEndFlags_.ContainsKey(id))
  1142. {
  1143. this.eventEndFlags_[id] = value;
  1144. }
  1145. else
  1146. {
  1147. this.eventEndFlags_.Add(id, value);
  1148. }
  1149. }
  1150. public void RemoveEventEndFlag(int id)
  1151. {
  1152. if (this.eventEndFlags_.ContainsKey(id))
  1153. {
  1154. this.eventEndFlags_.Remove(id);
  1155. }
  1156. }
  1157. public bool GetEventEndFlag(int id)
  1158. {
  1159. return this.eventEndFlags_.ContainsKey(id) && this.eventEndFlags_[id];
  1160. }
  1161. public void RemoveEventEndFlagAll()
  1162. {
  1163. this.eventEndFlags_.Clear();
  1164. }
  1165. public BonusStatus GetBonusStatusAsFeatureAndPropensitys()
  1166. {
  1167. BonusStatus result = new BonusStatus();
  1168. foreach (Feature.Data data in this.features.GetValueArray())
  1169. {
  1170. if (data.bonusCorrection != null)
  1171. {
  1172. data.bonusCorrection.ApplyAddBonusStatus(result);
  1173. }
  1174. }
  1175. foreach (Propensity.Data data2 in this.propensitys.GetValueArray())
  1176. {
  1177. if (data2.bonusCorrection != null)
  1178. {
  1179. data2.bonusCorrection.ApplyAddBonusStatus(result);
  1180. }
  1181. }
  1182. return result;
  1183. }
  1184. public void UpdateBodyParam()
  1185. {
  1186. if (this.maid.Parts == null)
  1187. {
  1188. return;
  1189. }
  1190. Func<MPN, float> func = (MPN mpn) => (float)this.maid.GetProp(mpn).value;
  1191. 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;
  1192. float num2 = 55f * func(MPN.RegFat) + 50f * func(MPN.sintyou) * 0.5f + 50f * func(MPN.DouPer) * 0.4f;
  1193. float num3 = 55f * func(MPN.RegMeet) + 50f * func(MPN.sintyou) * 0.5f + 50f * func(MPN.DouPer) * 0.4f;
  1194. float num4 = 10f * func(MPN.UdeScl) * 0.1f;
  1195. float num5 = 5f * func(MPN.ArmL) + 5f * func(MPN.sintyou) * 1f + 5f * func(MPN.UdeScl) * 0.5f;
  1196. float num6 = 70f * func(MPN.Hara) + 50f * func(MPN.sintyou) * 0.7f + 50f * func(MPN.west) * func(MPN.Hara) * 0.005f;
  1197. float num7 = 10f * func(MPN.MuneL) * 2f;
  1198. float num8 = num7 * func(MPN.MuneTare) * 0.005f;
  1199. 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;
  1200. float num10 = 10f * func(MPN.koshi) + 7f * func(MPN.koshi) * func(MPN.sintyou) * 0.04f;
  1201. float num11 = 4f * func(MPN.kata);
  1202. float num12 = 38000f + num2 + num3 + num4 + num5 + num6 + num7 + num8 + num9 + num10 + num11;
  1203. this.body.height = (int)(num / 10f);
  1204. this.body.weight = (int)(num12 / 1000f);
  1205. float num13 = 70f + func(MPN.MuneL) * 0.31f + func(MPN.west) * 0.02f;
  1206. num13 -= 5f * (func(MPN.MuneS) / 100f);
  1207. this.body.bust = (int)num13;
  1208. this.body.waist = (int)(40f + func(MPN.west) * 0.25f + func(MPN.Hara) * 0.35f);
  1209. this.body.hip = (int)(65f + func(MPN.koshi) * 0.3f + func(MPN.RegFat) * 0.025f + func(MPN.RegMeet) * 0.025f);
  1210. if (num13 < 80f)
  1211. {
  1212. this.body.cup = "A";
  1213. }
  1214. else if (110f <= num13)
  1215. {
  1216. this.body.cup = "N";
  1217. }
  1218. else
  1219. {
  1220. char[] array = new char[]
  1221. {
  1222. 'B',
  1223. 'C',
  1224. 'D',
  1225. 'E',
  1226. 'F',
  1227. 'G',
  1228. 'H',
  1229. 'I',
  1230. 'J',
  1231. 'K',
  1232. 'L',
  1233. 'M'
  1234. };
  1235. this.body.cup = array[(int)((num13 - 80f) / 2.5f)].ToString();
  1236. }
  1237. }
  1238. public void UpdateClassBonusStatus()
  1239. {
  1240. this.bonusStatus.Clear();
  1241. if (this.heroineType == HeroineType.Sub)
  1242. {
  1243. return;
  1244. }
  1245. foreach (KeyValuePair<int, ClassData<JobClass.Data>> keyValuePair in this.jobClass.GetAllDatas())
  1246. {
  1247. ClassData<JobClass.Data> value = keyValuePair.Value;
  1248. value.data.levelBonuss[value.level - 1].ApplyAddBonusStatus(this.bonusStatus);
  1249. }
  1250. }
  1251. public string RenewSaveDataGuidGP03ToTemp()
  1252. {
  1253. string text = Guid.NewGuid().ToString();
  1254. this.saveDataGuidGP03Temp = text;
  1255. return text;
  1256. }
  1257. public string RenewSaveDataGuidGP03FromTemp()
  1258. {
  1259. string saveDataGuidGP03Temp = this.saveDataGuidGP03Temp;
  1260. this.saveDataGuidGP03 = saveDataGuidGP03Temp;
  1261. return saveDataGuidGP03Temp;
  1262. }
  1263. public void Serialize(BinaryWriter binary)
  1264. {
  1265. this.SetFlag("__1330_specialrelation__", (int)this.specialRelation);
  1266. binary.Write("CM3D2_MAID_STATUS");
  1267. binary.Write(Status.MAID_STATUS_VER);
  1268. binary.Write(this.guid);
  1269. binary.Write(this.saveDataGuidGP03);
  1270. binary.Write(this.creationTime);
  1271. binary.Write((short)this.heroineType);
  1272. if (this.heroineType == HeroineType.Sub)
  1273. {
  1274. binary.Write(this.subCharaData.id);
  1275. }
  1276. binary.Write(this.mainChara);
  1277. binary.Write(this.employmentDay_);
  1278. binary.Write(this.lastName);
  1279. binary.Write(this.firstName);
  1280. binary.Write(this.profileComment);
  1281. binary.Write(this.freeComment);
  1282. binary.Write((short)this.initSeikeiken);
  1283. binary.Write((short)this.seikeiken);
  1284. binary.Write(this.personal_.id);
  1285. binary.Write((short)this.contract);
  1286. this.body.Serialize(binary);
  1287. binary.Write((short)this.relation_);
  1288. binary.Write(this.playCountYotogi_);
  1289. binary.Write(this.playCountNightWork_);
  1290. binary.Write(this.likability_);
  1291. binary.Write(this.studyRate_);
  1292. binary.Write(this.maxHp_);
  1293. binary.Write(this.currentHp_);
  1294. binary.Write(this.maxMind_);
  1295. binary.Write(this.currentMind_);
  1296. binary.Write(this.maxReason_);
  1297. binary.Write(this.currentReason_);
  1298. binary.Write(this.reception_);
  1299. binary.Write(this.care_);
  1300. binary.Write(this.lovely_);
  1301. binary.Write(this.elegance_);
  1302. binary.Write(this.charm_);
  1303. binary.Write(this.cooking_);
  1304. binary.Write(this.vocal_);
  1305. binary.Write(this.dance_);
  1306. binary.Write(this.appealPoint_);
  1307. binary.Write(this.inyoku_);
  1308. binary.Write(this.m_value_);
  1309. binary.Write(this.hentai_);
  1310. binary.Write(this.housi_);
  1311. binary.Write(this.teachRate_);
  1312. binary.Write(this.sexPlayNumberOfPeople_);
  1313. binary.Write(this.popularRank_);
  1314. binary.Write(this.sales_);
  1315. binary.Write(this.totalSales_);
  1316. binary.Write(this.evaluation_);
  1317. binary.Write(this.totalEvaluation_);
  1318. binary.Write(this.leader);
  1319. binary.Write(this.isFirstNameCall);
  1320. binary.Write(this.enabledYotogiStatusLock);
  1321. binary.Write((short)this.eyePartsTab);
  1322. binary.Write(this.noonWorkId);
  1323. binary.Write(this.nightWorkId);
  1324. binary.Write(this.noonCommu);
  1325. binary.Write(this.nightCommu);
  1326. binary.Write((short)this.features_.Count);
  1327. foreach (KeyValuePair<int, Feature.Data> keyValuePair in this.features_)
  1328. {
  1329. binary.Write(keyValuePair.Key);
  1330. }
  1331. binary.Write((short)this.propensitys_.Count);
  1332. foreach (KeyValuePair<int, Propensity.Data> keyValuePair2 in this.propensitys_)
  1333. {
  1334. binary.Write(keyValuePair2.Key);
  1335. }
  1336. this.jobClass.Serialize(binary);
  1337. this.yotogiClass.Serialize(binary);
  1338. this.yotogiSkill.Serialize(binary);
  1339. binary.Write((short)this.workDatas_.Count);
  1340. foreach (KeyValuePair<int, WorkData> keyValuePair3 in this.workDatas_)
  1341. {
  1342. binary.Write(keyValuePair3.Key);
  1343. keyValuePair3.Value.Serialize(binary);
  1344. }
  1345. binary.Write((short)this.flags_.Count);
  1346. foreach (KeyValuePair<string, int> keyValuePair4 in this.flags_)
  1347. {
  1348. binary.Write(keyValuePair4.Key);
  1349. binary.Write(keyValuePair4.Value);
  1350. }
  1351. binary.Write((short)this.eventEndFlags_.Count);
  1352. foreach (KeyValuePair<int, bool> keyValuePair5 in this.eventEndFlags_)
  1353. {
  1354. binary.Write(keyValuePair5.Key);
  1355. binary.Write(keyValuePair5.Value);
  1356. }
  1357. binary.Write((short)this.partsDic.Count);
  1358. foreach (KeyValuePair<string, string> keyValuePair6 in this.partsDic)
  1359. {
  1360. binary.Write(keyValuePair6.Key);
  1361. binary.Write(keyValuePair6.Value);
  1362. }
  1363. binary.Write(this.OldStatus != null);
  1364. if (this.OldStatus != null)
  1365. {
  1366. this.OldStatus.Serialize(binary);
  1367. }
  1368. binary.Write(this.selectedJobClass != null);
  1369. if (this.selectedJobClass != null)
  1370. {
  1371. binary.Write(this.selectedJobClass.data.id);
  1372. }
  1373. binary.Write(this.selectedYotogiClass != null);
  1374. if (this.selectedYotogiClass != null)
  1375. {
  1376. binary.Write(this.selectedYotogiClass.data.id);
  1377. }
  1378. binary.Write((short)this.additionalRelation_);
  1379. binary.Write(this.nickName_);
  1380. binary.Write(this.age);
  1381. binary.Write(1000);
  1382. binary.Write(2177629204U);
  1383. }
  1384. public void Deserialize(BinaryReader binary)
  1385. {
  1386. string a = binary.ReadString();
  1387. NDebug.Assert(a == "CM3D2_MAID_STATUS", "メイドパラメータのヘッダーが不正です。");
  1388. this.OldStatus = null;
  1389. int num = binary.ReadInt32();
  1390. this.guid = binary.ReadString();
  1391. if (2000 <= num)
  1392. {
  1393. this.saveDataGuidGP03 = binary.ReadString();
  1394. }
  1395. else
  1396. {
  1397. this.saveDataGuidGP03 = this.guid;
  1398. }
  1399. this.creationTime = binary.ReadString();
  1400. string text = this.creationTime.Replace(":", string.Empty);
  1401. text = text.Replace(" ", string.Empty);
  1402. this.creationTimeNum = ulong.Parse(text);
  1403. this.heroineType = (HeroineType)binary.ReadInt16();
  1404. if (this.heroineType == HeroineType.Sub)
  1405. {
  1406. int id = binary.ReadInt32();
  1407. this.subCharaData = SubMaid.GetData(id);
  1408. }
  1409. if (205 < num)
  1410. {
  1411. this.mainChara = binary.ReadBoolean();
  1412. }
  1413. this.employmentDay_ = binary.ReadInt32();
  1414. this.lastName = binary.ReadString();
  1415. this.firstName = binary.ReadString();
  1416. this.profileComment = binary.ReadString();
  1417. this.freeComment = binary.ReadString();
  1418. this.initSeikeiken = (Seikeiken)binary.ReadInt16();
  1419. this.seikeiken = (Seikeiken)binary.ReadInt16();
  1420. int num2 = binary.ReadInt32();
  1421. if (Personal.IsEnabled(num2))
  1422. {
  1423. this.SetPersonal(num2);
  1424. }
  1425. else
  1426. {
  1427. Debug.LogWarning(this.fullNameJpStyle + " : ロードされたデータの性格[" + Personal.GetData(num2).drawName + "]は有効ではないので初期性格に強制変更しました");
  1428. this.SetPersonal(Personal.GetData("Muku"));
  1429. }
  1430. if (207 < num)
  1431. {
  1432. this.contract = (Contract)binary.ReadInt16();
  1433. }
  1434. this.body.Deserialize(binary, num);
  1435. this.relation_ = (Relation)binary.ReadInt16();
  1436. if (num < 215)
  1437. {
  1438. binary.ReadInt16();
  1439. }
  1440. this.playCountYotogi_ = binary.ReadUInt16();
  1441. this.playCountNightWork_ = binary.ReadUInt16();
  1442. this.likability_ = binary.ReadUInt16();
  1443. this.studyRate_ = binary.ReadUInt16();
  1444. this.maxHp_ = binary.ReadUInt16();
  1445. this.currentHp_ = binary.ReadUInt16();
  1446. this.maxMind_ = binary.ReadUInt16();
  1447. this.currentMind_ = binary.ReadUInt16();
  1448. if (211 < num)
  1449. {
  1450. this.maxReason_ = binary.ReadUInt16();
  1451. this.currentReason_ = binary.ReadUInt16();
  1452. }
  1453. this.reception_ = binary.ReadUInt16();
  1454. this.care_ = binary.ReadUInt16();
  1455. this.lovely_ = binary.ReadUInt16();
  1456. this.elegance_ = binary.ReadUInt16();
  1457. this.charm_ = binary.ReadUInt16();
  1458. this.cooking_ = binary.ReadUInt16();
  1459. this.vocal_ = binary.ReadUInt16();
  1460. this.dance_ = binary.ReadUInt16();
  1461. this.appealPoint_ = binary.ReadUInt16();
  1462. this.inyoku_ = binary.ReadUInt16();
  1463. this.m_value_ = binary.ReadUInt16();
  1464. this.hentai_ = binary.ReadUInt16();
  1465. this.housi_ = binary.ReadUInt16();
  1466. this.teachRate_ = binary.ReadUInt16();
  1467. this.sexPlayNumberOfPeople_ = binary.ReadUInt16();
  1468. this.popularRank_ = binary.ReadUInt16();
  1469. this.sales_ = binary.ReadInt64();
  1470. this.totalSales_ = binary.ReadInt64();
  1471. if (207 < num)
  1472. {
  1473. this.evaluation_ = binary.ReadUInt16();
  1474. this.totalEvaluation_ = binary.ReadInt64();
  1475. }
  1476. this.leader = binary.ReadBoolean();
  1477. this.isFirstNameCall = binary.ReadBoolean();
  1478. if (202 < num)
  1479. {
  1480. this.enabledYotogiStatusLock = binary.ReadBoolean();
  1481. }
  1482. this.eyePartsTab = (EyePartsTab)binary.ReadInt16();
  1483. this.noonWorkId = binary.ReadInt32();
  1484. this.nightWorkId = binary.ReadInt32();
  1485. this.noonCommu = binary.ReadBoolean();
  1486. this.nightCommu = binary.ReadBoolean();
  1487. int num3 = (int)binary.ReadInt16();
  1488. this.features_.Clear();
  1489. for (int i = 0; i < num3; i++)
  1490. {
  1491. int num4 = binary.ReadInt32();
  1492. if (Feature.IsEnabled(num4))
  1493. {
  1494. this.features_.Add(num4, Feature.GetData(num4));
  1495. }
  1496. }
  1497. num3 = (int)binary.ReadInt16();
  1498. this.propensitys_.Clear();
  1499. for (int j = 0; j < num3; j++)
  1500. {
  1501. int num5 = binary.ReadInt32();
  1502. if (Propensity.IsEnabled(num5))
  1503. {
  1504. this.propensitys_.Add(num5, Propensity.GetData(num5));
  1505. }
  1506. }
  1507. this.jobClass.Deserialize(binary, num);
  1508. this.yotogiClass.Deserialize(binary, num);
  1509. this.UpdateClassBonusStatus();
  1510. if (211 >= num)
  1511. {
  1512. num3 = (int)binary.ReadInt16();
  1513. for (int k = 0; k < num3; k++)
  1514. {
  1515. binary.ReadInt32();
  1516. binary.ReadUInt32();
  1517. binary.ReadUInt16();
  1518. binary.ReadInt32();
  1519. binary.ReadInt32();
  1520. binary.ReadInt32();
  1521. binary.ReadInt32();
  1522. }
  1523. }
  1524. else
  1525. {
  1526. this.yotogiSkill.Deserialize(binary, num);
  1527. }
  1528. num3 = (int)binary.ReadInt16();
  1529. this.workDatas_.Clear();
  1530. for (int l = 0; l < num3; l++)
  1531. {
  1532. int key = binary.ReadInt32();
  1533. WorkData workData = new WorkData();
  1534. workData.Deserialize(binary, num);
  1535. this.workDatas_.Add(key, workData);
  1536. }
  1537. num3 = (int)binary.ReadInt16();
  1538. this.flags_.Clear();
  1539. for (int m = 0; m < num3; m++)
  1540. {
  1541. string key2 = binary.ReadString();
  1542. int value = binary.ReadInt32();
  1543. this.flags_.Add(key2, value);
  1544. }
  1545. if (205 < num)
  1546. {
  1547. num3 = (int)binary.ReadInt16();
  1548. this.eventEndFlags_.Clear();
  1549. for (int n = 0; n < num3; n++)
  1550. {
  1551. int key3 = binary.ReadInt32();
  1552. bool value2 = binary.ReadBoolean();
  1553. this.eventEndFlags_.Add(key3, value2);
  1554. }
  1555. }
  1556. num3 = (int)binary.ReadInt16();
  1557. this.partsDic.Clear();
  1558. for (int num6 = 0; num6 < num3; num6++)
  1559. {
  1560. string key4 = binary.ReadString();
  1561. string value3 = binary.ReadString();
  1562. this.partsDic.Add(key4, value3);
  1563. }
  1564. if (207 < num)
  1565. {
  1566. bool flag = binary.ReadBoolean();
  1567. if (flag)
  1568. {
  1569. this.OldStatus = new Status(this);
  1570. this.OldStatus.Deserialize(binary, num);
  1571. }
  1572. }
  1573. this.selectedJobClass = null;
  1574. if (binary.ReadBoolean())
  1575. {
  1576. int id2 = binary.ReadInt32();
  1577. if (this.jobClass.Contains(id2))
  1578. {
  1579. this.selectedJobClass = this.jobClass.Get(id2);
  1580. }
  1581. }
  1582. if (this.selectedJobClass == null)
  1583. {
  1584. ClassData<JobClass.Data>[] valueArray = this.jobClass.datas.GetValueArray();
  1585. int num7 = 0;
  1586. if (num7 < valueArray.Length)
  1587. {
  1588. ClassData<JobClass.Data> selectedJobClass = valueArray[num7];
  1589. this.selectedJobClass = selectedJobClass;
  1590. }
  1591. }
  1592. this.selectedYotogiClass = null;
  1593. if (binary.ReadBoolean())
  1594. {
  1595. int id3 = binary.ReadInt32();
  1596. if (this.yotogiClass.Contains(id3))
  1597. {
  1598. this.selectedYotogiClass = this.yotogiClass.Get(id3);
  1599. }
  1600. }
  1601. if (this.selectedYotogiClass == null)
  1602. {
  1603. ClassData<YotogiClass.Data>[] valueArray2 = this.yotogiClass.datas.GetValueArray();
  1604. int num8 = 0;
  1605. if (num8 < valueArray2.Length)
  1606. {
  1607. ClassData<YotogiClass.Data> selectedYotogiClass = valueArray2[num8];
  1608. this.selectedYotogiClass = selectedYotogiClass;
  1609. }
  1610. }
  1611. this.additionalRelation_ = AdditionalRelation.Null;
  1612. if (1270 <= num)
  1613. {
  1614. this.additionalRelation_ = (AdditionalRelation)binary.ReadInt16();
  1615. if (this.additionalRelation_ != AdditionalRelation.Null && this.heroineType == HeroineType.Sub)
  1616. {
  1617. this.additionalRelation_ = AdditionalRelation.Null;
  1618. }
  1619. this.nickName_ = binary.ReadString();
  1620. this.age = binary.ReadInt32();
  1621. if (this.additionalRelation_ == AdditionalRelation.Vigilance)
  1622. {
  1623. if (this.relation == Relation.Trust || this.relation == Relation.Lover)
  1624. {
  1625. this.additionalRelation_ = AdditionalRelation.Null;
  1626. }
  1627. if (this.relation == Relation.Lover)
  1628. {
  1629. if ((this.personal.uniqueName == "Muku" && this.GetEventEndFlag(5040)) || (this.personal.uniqueName == "Majime" && this.GetEventEndFlag(5140)) || (this.personal.uniqueName == "Rindere" && this.GetEventEndFlag(5240)))
  1630. {
  1631. this.additionalRelation_ = AdditionalRelation.LoverPlus;
  1632. }
  1633. }
  1634. else if (this.relation == Relation.Contact && ((this.personal.uniqueName == "Muku" && this.GetEventEndFlag(5030)) || (this.personal.uniqueName == "Majime" && this.GetEventEndFlag(5130)) || (this.personal.uniqueName == "Rindere" && this.GetEventEndFlag(5230))))
  1635. {
  1636. this.additionalRelation_ = AdditionalRelation.Null;
  1637. }
  1638. }
  1639. }
  1640. if (!PluginData.IsEnabled("GP002") || this.GetFlag("__1330_specialrelation__") == 0)
  1641. {
  1642. this.specialRelation = SpecialRelation.Null;
  1643. }
  1644. else
  1645. {
  1646. this.specialRelation = (SpecialRelation)this.GetFlag("__1330_specialrelation__");
  1647. }
  1648. this.RemoveFlag("__1330_specialrelation__");
  1649. if (1540 <= num)
  1650. {
  1651. int num9 = binary.ReadInt32();
  1652. }
  1653. uint num10 = binary.ReadUInt32();
  1654. NDebug.Assert(2177629204U == num10, "メイドパラメータのロードに失敗しました");
  1655. if (num <= 1050)
  1656. {
  1657. YotogiClass.Data data = YotogiClass.GetData("Kokuhakuplay");
  1658. if (this.yotogiClass.Get(data) != null && this.contract != Contract.Free)
  1659. {
  1660. this.yotogiClass.Remove(data, true);
  1661. }
  1662. List<int> list = new List<int>();
  1663. foreach (YotogiSkillData yotogiSkillData in this.yotogiSkill.datas.GetValueArray())
  1664. {
  1665. YotogiClass.Data yotogi_class = yotogiSkillData.data.getcondition_data.yotogi_class;
  1666. if (yotogi_class != null && !this.yotogiClass.Contains(yotogi_class) && yotogi_class.learnConditions.requestContracts.Count != 0 && !yotogi_class.learnConditions.requestContracts.Contains(this.contract))
  1667. {
  1668. list.Add(yotogiSkillData.id);
  1669. }
  1670. }
  1671. foreach (int skillId in list)
  1672. {
  1673. this.yotogiSkill.Remove(skillId);
  1674. }
  1675. }
  1676. if (num == 1380 && this.specialRelation == SpecialRelation.Null)
  1677. {
  1678. List<int> list2 = new List<int>();
  1679. foreach (YotogiSkillData yotogiSkillData2 in this.yotogiSkill.datas.GetValueArray())
  1680. {
  1681. if (yotogiSkillData2.data.getcondition_data.requestMarried)
  1682. {
  1683. list2.Add(yotogiSkillData2.id);
  1684. }
  1685. }
  1686. foreach (int skillId2 in list2)
  1687. {
  1688. this.yotogiSkill.Remove(skillId2);
  1689. }
  1690. }
  1691. List<Skill.Data> learnPossibleSkills = Skill.GetLearnPossibleSkills(this);
  1692. foreach (Skill.Data data2 in learnPossibleSkills)
  1693. {
  1694. if (data2.specialConditionType == Skill.Data.SpecialConditionType.GP01Recollect || data2.specialConditionType == Skill.Data.SpecialConditionType.GP02Recollect || data2.specialConditionType == Skill.Data.SpecialConditionType.OnlyRecollect)
  1695. {
  1696. this.yotogiSkill.Add(data2);
  1697. }
  1698. }
  1699. if (this.GetFlag("処女喪失シナリオ初回") == 1 && this.initSeikeiken != Seikeiken.No_No)
  1700. {
  1701. this.initSeikeiken = Seikeiken.No_No;
  1702. }
  1703. }
  1704. public void Deserialize(StatusReader oldStatusReader, bool convertYotogiSkill)
  1705. {
  1706. Func<int, int> func = (int value) => (int)System.Math.Floor((double)((float)value * 0.3f));
  1707. this.OldStatus = new Status(this);
  1708. this.creationTimeNum = oldStatusReader.creationTimeNum;
  1709. this.guid = oldStatusReader.guid;
  1710. this.heroineType = HeroineType.Transfer;
  1711. this.mainChara = false;
  1712. this.employmentDay = GameMain.Instance.CharacterMgr.status.days;
  1713. this.lastName = oldStatusReader.lastName;
  1714. this.firstName = oldStatusReader.firstName;
  1715. this.freeComment = oldStatusReader.freeComment;
  1716. this.initSeikeiken = oldStatusReader.initSeikeiken;
  1717. this.seikeiken = oldStatusReader.seikeiken;
  1718. string uniqueName = oldStatusReader.personal.ToString();
  1719. this.SetPersonal(Personal.GetData(uniqueName));
  1720. this.contract = oldStatusReader.contract;
  1721. this.additionalRelation = AdditionalRelation.Null;
  1722. this.body.height = oldStatusReader.body.height;
  1723. this.body.weight = oldStatusReader.body.weight;
  1724. this.body.bust = oldStatusReader.body.bust;
  1725. this.body.waist = oldStatusReader.body.waist;
  1726. this.body.hip = oldStatusReader.body.hip;
  1727. this.body.cup = oldStatusReader.body.cup;
  1728. if (oldStatusReader.relation == Relation.Tonus || oldStatusReader.relation == Relation.Contact)
  1729. {
  1730. this.relation_ = Relation.Contact;
  1731. }
  1732. else if (oldStatusReader.relation == Relation.Trust)
  1733. {
  1734. this.relation_ = Relation.Trust;
  1735. }
  1736. else
  1737. {
  1738. this.relation_ = Relation.Lover;
  1739. }
  1740. this.playCountYotogi = oldStatusReader.playCountYotogi;
  1741. this.playCountNightWork = oldStatusReader.playCountNightWork;
  1742. this.likability = oldStatusReader.likability;
  1743. this.studyRate = oldStatusReader.studyRate;
  1744. int num = 100;
  1745. this.baseMaxHp = num;
  1746. this.currentHp = num;
  1747. num = 100;
  1748. this.baseMaxMind = num;
  1749. this.currentMind = num;
  1750. this.baseReception = func(oldStatusReader.reception);
  1751. this.baseCare = func(oldStatusReader.care);
  1752. this.baseLovely = func(oldStatusReader.lovely);
  1753. this.baseElegance = func(oldStatusReader.elegance);
  1754. this.baseCharm = func(oldStatusReader.charm);
  1755. num = 0;
  1756. this.baseAppealPoint = num;
  1757. num = num;
  1758. this.baseDance = num;
  1759. num = num;
  1760. this.baseVocal = num;
  1761. this.baseCooking = num;
  1762. this.baseInyoku = func(oldStatusReader.inyoku);
  1763. this.baseMvalue = func(oldStatusReader.mvalue);
  1764. this.baseHentai = func(oldStatusReader.hentai);
  1765. this.baseHousi = func(oldStatusReader.housi);
  1766. this.baseTeachRate = func(oldStatusReader.teachRate);
  1767. this.sexPlayNumberOfPeople = oldStatusReader.sexPlayNumberOfPeople;
  1768. this.popularRank = 0;
  1769. num = 0;
  1770. this.evaluation = num;
  1771. this.sales = (long)num;
  1772. this.totalSales = oldStatusReader.totalSales;
  1773. this.totalEvaluations = oldStatusReader.totalEvaluations;
  1774. this.leader = false;
  1775. this.isFirstNameCall = oldStatusReader.isFirstNameCall;
  1776. this.eyePartsTab = EyePartsTab.LR;
  1777. this.noonWorkId = (this.nightWorkId = 0);
  1778. this.noonCommu = (this.nightCommu = false);
  1779. this.features_.Clear();
  1780. this.propensitys_.Clear();
  1781. this.jobClass.Clear();
  1782. this.yotogiClass.Clear();
  1783. this.yotogiSkill.Clear();
  1784. this.workDatas_.Clear();
  1785. this.flags_.Clear();
  1786. this.eventEndFlags_.Clear();
  1787. this.selectedJobClass = null;
  1788. AbstractClassData.ClassType classTypeFlags = AbstractClassData.ClassType.Share | AbstractClassData.ClassType.New | AbstractClassData.ClassType.Old;
  1789. List<JobClass.Data> learnPossibleClassDatas = this.jobClass.GetLearnPossibleClassDatas(true, classTypeFlags);
  1790. foreach (JobClass.Data data in learnPossibleClassDatas)
  1791. {
  1792. if (GameMain.Instance.CharacterMgr.status.IsJobClassOpenFlag(data.id))
  1793. {
  1794. this.jobClass.Add(data, false, false);
  1795. }
  1796. }
  1797. List<YotogiClass.Data> learnPossibleClassDatas2 = this.yotogiClass.GetLearnPossibleClassDatas(true, classTypeFlags);
  1798. foreach (YotogiClass.Data data2 in learnPossibleClassDatas2)
  1799. {
  1800. if (GameMain.Instance.CharacterMgr.status.IsYotogiClassOpenFlag(data2.id))
  1801. {
  1802. this.yotogiClass.Add(data2, false, false);
  1803. }
  1804. }
  1805. foreach (StatusReader.ClassData classData in oldStatusReader.maidClassDatas)
  1806. {
  1807. if (classData.isHave && JobClass.IsEnabled(classData.classId) && !this.jobClass.Contains(classData.classId))
  1808. {
  1809. ClassData<JobClass.Data> classData2 = this.jobClass.Add(classData.classId, false, false);
  1810. if (classData2 != null)
  1811. {
  1812. classData2.expSystem.SetLevel(classData.level);
  1813. }
  1814. }
  1815. }
  1816. foreach (StatusReader.ClassData classData3 in oldStatusReader.yotogiClassDatas)
  1817. {
  1818. if (classData3.isHave && YotogiClass.IsEnabled(classData3.classId) && !this.yotogiClass.Contains(classData3.classId))
  1819. {
  1820. ClassData<YotogiClass.Data> classData4 = this.yotogiClass.Add(classData3.classId, false, false);
  1821. if (classData4 != null)
  1822. {
  1823. classData4.expSystem.SetLevel(classData3.level);
  1824. }
  1825. }
  1826. }
  1827. if (oldStatusReader.selectedMaidClass != null && this.jobClass.Contains(oldStatusReader.selectedMaidClass.classId))
  1828. {
  1829. this.selectedJobClass = this.jobClass.Get(oldStatusReader.selectedMaidClass.classId);
  1830. }
  1831. if (this.selectedJobClass == null)
  1832. {
  1833. ClassData<JobClass.Data>[] valueArray = this.jobClass.oldDatas.GetValueArray();
  1834. int num2 = 0;
  1835. if (num2 < valueArray.Length)
  1836. {
  1837. ClassData<JobClass.Data> selectedJobClass = valueArray[num2];
  1838. this.selectedJobClass = selectedJobClass;
  1839. }
  1840. }
  1841. if (convertYotogiSkill)
  1842. {
  1843. List<Skill.Data> learnPossibleSkills = Skill.GetLearnPossibleSkills(this);
  1844. foreach (Skill.Data data3 in learnPossibleSkills)
  1845. {
  1846. this.yotogiSkill.Add(data3.id);
  1847. }
  1848. foreach (KeyValuePair<int, StatusReader.SkillData> keyValuePair in oldStatusReader.yotogiSkillDatas)
  1849. {
  1850. int id = keyValuePair.Value.id;
  1851. int level = keyValuePair.Value.level;
  1852. uint playCount = keyValuePair.Value.playCount;
  1853. if (!this.yotogiSkill.Contains(id) && Skill.Old.Contains(id))
  1854. {
  1855. this.yotogiSkill.Add(id);
  1856. }
  1857. YotogiSkillData yotogiSkillData = this.yotogiSkill.Get(id);
  1858. if (yotogiSkillData != null && yotogiSkillData.oldData != null)
  1859. {
  1860. yotogiSkillData.expSystem.SetLevel(level);
  1861. yotogiSkillData.playCount = playCount;
  1862. }
  1863. }
  1864. }
  1865. foreach (KeyValuePair<int, StatusReader.WorkData> keyValuePair2 in oldStatusReader.workDatas)
  1866. {
  1867. this.workDatas_.Add(keyValuePair2.Key, keyValuePair2.Value.toNewWorkData());
  1868. }
  1869. foreach (int num3 in oldStatusReader.features)
  1870. {
  1871. StatusReader.Feature feature = (StatusReader.Feature)num3;
  1872. string uniqueName2 = feature.ToString();
  1873. this.AddFeature(Feature.GetData(uniqueName2));
  1874. }
  1875. this.OldStatus.employmentElapsedDay = oldStatusReader.employmentElapsedDay;
  1876. this.OldStatus.relation = oldStatusReader.relation;
  1877. Dictionary<StatusReader.Propensity, string> dictionary = new Dictionary<StatusReader.Propensity, string>();
  1878. dictionary.Add(StatusReader.Propensity.淫乱, "敏感体質");
  1879. dictionary.Add(StatusReader.Propensity.変態, "変態の素質");
  1880. dictionary.Add(StatusReader.Propensity.飲精好き, "ごっくん大好き");
  1881. dictionary.Add(StatusReader.Propensity.奉仕好き, "桃色泡姫");
  1882. dictionary.Add(StatusReader.Propensity.M女, "ドMの素質");
  1883. dictionary.Add(StatusReader.Propensity.中出し好き, "中出し大好き");
  1884. foreach (int num4 in oldStatusReader.propensitys)
  1885. {
  1886. StatusReader.Propensity key = (StatusReader.Propensity)num4;
  1887. if (dictionary.ContainsKey(key))
  1888. {
  1889. this.AddPropensity(Propensity.GetData(dictionary[key]));
  1890. }
  1891. }
  1892. if (1000 <= oldStatusReader.sexual.curi)
  1893. {
  1894. this.AddPropensity(Propensity.GetData("敏感なクリトリス"));
  1895. }
  1896. this.partsDic = new Dictionary<string, string>(oldStatusReader.partsDic);
  1897. this.OldStatus.isMarriage = (oldStatusReader.flags.ContainsKey("_maid_param_marriage_flag") && oldStatusReader.flags["_maid_param_marriage_flag"] != 0);
  1898. this.OldStatus.isNewWife = (oldStatusReader.flags.ContainsKey("_maid_param_newwife_flag") && oldStatusReader.flags["_maid_param_newwife_flag"] != 0);
  1899. foreach (KeyValuePair<string, int> keyValuePair3 in oldStatusReader.flags)
  1900. {
  1901. this.OldStatus.AddFlag(keyValuePair3.Key, keyValuePair3.Value);
  1902. }
  1903. if (!GameMain.Instance.CharacterMgr.status.isOldPlayer)
  1904. {
  1905. this.likability = 0;
  1906. this.relation_ = Relation.Contact;
  1907. this.OldStatus.isMarriage = false;
  1908. this.OldStatus.isNewWife = false;
  1909. }
  1910. this.profileComment = MaidProfile.Create(this.maid, true);
  1911. }
  1912. public const int SaveDataVersion = 1000;
  1913. public const int MaidPointUpStatus = 20;
  1914. public const int NullID = -2147483648;
  1915. private const uint SaveDataCheckCode = 2177629204U;
  1916. public HeroineType heroineType;
  1917. public bool mainChara;
  1918. public SubMaid.Data subCharaData;
  1919. public string profileComment;
  1920. public int age;
  1921. public Seikeiken initSeikeiken;
  1922. public Seikeiken seikeiken;
  1923. public Contract contract;
  1924. public BodyData body;
  1925. public SpecialRelation specialRelation;
  1926. public int noonWorkId;
  1927. public int nightWorkId;
  1928. public bool noonCommu;
  1929. public bool nightCommu;
  1930. public bool leader;
  1931. public bool isFirstNameCall;
  1932. public bool enabledYotogiStatusLock;
  1933. public EyePartsTab eyePartsTab;
  1934. private Dictionary<int, Feature.Data> features_;
  1935. private Dictionary<int, Propensity.Data> propensitys_;
  1936. private BonusStatus bonusStatus;
  1937. private string freeComment_;
  1938. private Personal.Data personal_;
  1939. private int employmentDay_;
  1940. private string lastName_ = string.Empty;
  1941. private string firstName_ = string.Empty;
  1942. private string nickName_ = string.Empty;
  1943. private Relation relation_;
  1944. private AdditionalRelation additionalRelation_;
  1945. private ushort playCountYotogi_;
  1946. private ushort playCountNightWork_;
  1947. private ushort likability_;
  1948. private ushort studyRate_;
  1949. private int currentExcite_;
  1950. private int currentSensual_;
  1951. private ushort maxHp_;
  1952. private ushort currentHp_;
  1953. private ushort maxMind_;
  1954. private ushort currentMind_;
  1955. private ushort maxReason_;
  1956. private ushort currentReason_;
  1957. private ushort reception_;
  1958. private ushort care_;
  1959. private ushort lovely_;
  1960. private ushort elegance_;
  1961. private ushort charm_;
  1962. private ushort cooking_;
  1963. private ushort vocal_;
  1964. private ushort dance_;
  1965. private ushort appealPoint_;
  1966. private ushort inyoku_;
  1967. private ushort m_value_;
  1968. private ushort hentai_;
  1969. private ushort housi_;
  1970. private ushort teachRate_;
  1971. private ushort sexPlayNumberOfPeople_;
  1972. private ushort popularRank_;
  1973. private long sales_;
  1974. private long totalSales_;
  1975. private ushort evaluation_;
  1976. private long totalEvaluation_;
  1977. private Dictionary<int, WorkData> workDatas_;
  1978. private Dictionary<string, int> flags_;
  1979. private Dictionary<int, bool> eventEndFlags_;
  1980. private VoiceGroup voiceGroup_;
  1981. private GP003Status gp003Status_ = new GP003Status();
  1982. private static int MAID_STATUS_VER = 2000;
  1983. }
  1984. }