Status.cs 49 KB

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