StatusReader.cs 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. namespace MaidStatus.Old
  5. {
  6. public class StatusReader
  7. {
  8. public StatusReader(BinaryReader reader, int day)
  9. {
  10. string a = reader.ReadString();
  11. NDebug.Assert(a == "CM3D2_MAID_PPARAM", "メイドパラメータのヘッダーが不正です。");
  12. int num = reader.ReadInt32();
  13. this.guid = reader.ReadString();
  14. this.creationTime = reader.ReadString();
  15. this.creationTimeNum = reader.ReadUInt64();
  16. this.employmentDay = reader.ReadInt32();
  17. this.employmentElapsedDay = day - this.employmentDay;
  18. this.maidPoint = reader.ReadInt32();
  19. this.lastName = reader.ReadString();
  20. this.firstName = reader.ReadString();
  21. this.profileComment = reader.ReadString();
  22. this.freeComment = reader.ReadString();
  23. this.initSeikeiken = (Seikeiken)reader.ReadInt32();
  24. this.seikeiken = (Seikeiken)reader.ReadInt32();
  25. this.personal = (Personal)reader.ReadInt32();
  26. this.contract = (Contract)reader.ReadInt32();
  27. this.maidClassDatas = new List<StatusReader.ClassData>();
  28. int num2 = reader.ReadInt32();
  29. for (int i = 0; i < num2; i++)
  30. {
  31. this.maidClassDatas.Add(new StatusReader.ClassData(i, reader));
  32. }
  33. this.selectedMaidClass = this.maidClassDatas[reader.ReadInt32()];
  34. this.yotogiClassDatas = new List<StatusReader.ClassData>();
  35. num2 = reader.ReadInt32();
  36. for (int j = 0; j < num2; j++)
  37. {
  38. this.yotogiClassDatas.Add(new StatusReader.ClassData(j, reader));
  39. }
  40. this.selectedYotogiClass = this.yotogiClassDatas[reader.ReadInt32()];
  41. this.features = new List<int>();
  42. num2 = reader.ReadInt32();
  43. for (int k = 0; k < num2; k++)
  44. {
  45. this.features.Add(reader.ReadInt32());
  46. }
  47. this.propensitys = new List<int>();
  48. num2 = reader.ReadInt32();
  49. for (int l = 0; l < num2; l++)
  50. {
  51. this.propensitys.Add(reader.ReadInt32());
  52. }
  53. this.body = new StatusReader.Body(reader);
  54. this.relation = (Relation)reader.ReadInt32();
  55. this.condition = (Condition)reader.ReadInt32();
  56. this.playCountYotogi = reader.ReadInt32();
  57. this.playCountNightWork = reader.ReadInt32();
  58. this.likability = reader.ReadInt32();
  59. this.studyRate = reader.ReadInt32();
  60. this.currentHp = reader.ReadInt32();
  61. this.maxHp = reader.ReadInt32();
  62. this.currentMind = reader.ReadInt32();
  63. this.maxMind = reader.ReadInt32();
  64. this.currentReason = reader.ReadInt32();
  65. this.reason = reader.ReadInt32();
  66. this.reception = reader.ReadInt32();
  67. this.care = reader.ReadInt32();
  68. this.lovely = reader.ReadInt32();
  69. this.inyoku = reader.ReadInt32();
  70. this.elegance = reader.ReadInt32();
  71. this.mvalue = reader.ReadInt32();
  72. this.charm = reader.ReadInt32();
  73. this.hentai = reader.ReadInt32();
  74. this.housi = reader.ReadInt32();
  75. this.teachRate = reader.ReadInt32();
  76. this.sexual = new Sexual();
  77. this.sexual.Deserialize(reader, num);
  78. this.sexPlayNumberOfPeople = reader.ReadInt32();
  79. reader.ReadInt32();
  80. this.popularRank = reader.ReadInt32();
  81. this.evaluation = reader.ReadInt64();
  82. this.totalEvaluations = reader.ReadInt64();
  83. this.sales = reader.ReadInt64();
  84. this.totalSales = reader.ReadInt64();
  85. if (num > 6)
  86. {
  87. this.isFirstNameCall = reader.ReadBoolean();
  88. }
  89. else
  90. {
  91. this.isFirstNameCall = true;
  92. }
  93. if (num > 8)
  94. {
  95. this.isRentalMaid = reader.ReadBoolean();
  96. }
  97. else
  98. {
  99. this.isRentalMaid = false;
  100. }
  101. reader.ReadInt32();
  102. reader.ReadInt32();
  103. this.yotogiSkillDatas = new Dictionary<int, StatusReader.SkillData>();
  104. num2 = reader.ReadInt32();
  105. for (int m = 0; m < num2; m++)
  106. {
  107. int key = reader.ReadInt32();
  108. StatusReader.SkillData value = new StatusReader.SkillData(reader);
  109. this.yotogiSkillDatas.Add(key, value);
  110. }
  111. this.workDatas = new Dictionary<int, StatusReader.WorkData>();
  112. num2 = reader.ReadInt32();
  113. for (int n = 0; n < num2; n++)
  114. {
  115. reader.ReadInt32();
  116. StatusReader.WorkData workData = new StatusReader.WorkData(reader);
  117. if (!this.workDatas.ContainsKey(workData.id))
  118. {
  119. this.workDatas.Add(workData.id, workData);
  120. }
  121. }
  122. this.flags = new Dictionary<string, int>();
  123. num2 = reader.ReadInt32();
  124. for (int num3 = 0; num3 < num2; num3++)
  125. {
  126. string key2 = reader.ReadString();
  127. int value2 = reader.ReadInt32();
  128. this.flags.Add(key2, value2);
  129. }
  130. reader.ReadBoolean();
  131. this.leader = reader.ReadBoolean();
  132. reader.ReadInt32();
  133. this.partsDic = new Dictionary<string, string>();
  134. num2 = reader.ReadInt32();
  135. for (int num4 = 0; num4 < num2; num4++)
  136. {
  137. string key3 = reader.ReadString();
  138. string value3 = reader.ReadString();
  139. this.partsDic.Add(key3, value3);
  140. }
  141. for (int num5 = 0; num5 < 12; num5++)
  142. {
  143. reader.ReadInt32();
  144. }
  145. int num6 = reader.ReadInt32();
  146. NDebug.Assert(1923480616 == num6, "メイドパラメータのロードに失敗しました");
  147. }
  148. public string guid;
  149. public string creationTime;
  150. public ulong creationTimeNum;
  151. public int employmentDay;
  152. public int employmentElapsedDay;
  153. public int maidPoint;
  154. public string lastName;
  155. public string firstName;
  156. public string profileComment;
  157. public string freeComment;
  158. public Seikeiken initSeikeiken;
  159. public Seikeiken seikeiken;
  160. public Personal personal;
  161. public Contract contract;
  162. public List<StatusReader.ClassData> maidClassDatas;
  163. public StatusReader.ClassData selectedMaidClass;
  164. public List<StatusReader.ClassData> yotogiClassDatas;
  165. public StatusReader.ClassData selectedYotogiClass;
  166. public List<int> features;
  167. public List<int> propensitys;
  168. public StatusReader.Body body;
  169. public Sexual sexual;
  170. public Relation relation;
  171. public Condition condition;
  172. public int playCountYotogi;
  173. public int playCountNightWork;
  174. public int likability;
  175. public int studyRate;
  176. public int currentHp;
  177. public int maxHp;
  178. public int currentMind;
  179. public int maxMind;
  180. public int currentReason;
  181. public int reason;
  182. public int reception;
  183. public int care;
  184. public int lovely;
  185. public int inyoku;
  186. public int elegance;
  187. public int mvalue;
  188. public int charm;
  189. public int hentai;
  190. public int housi;
  191. public int teachRate;
  192. public int sexPlayNumberOfPeople;
  193. public int popularRank;
  194. public long evaluation;
  195. public long totalEvaluations;
  196. public long sales;
  197. public long totalSales;
  198. public bool isFirstNameCall;
  199. public bool isRentalMaid;
  200. public bool leader;
  201. public Dictionary<int, StatusReader.SkillData> yotogiSkillDatas;
  202. public Dictionary<int, StatusReader.WorkData> workDatas;
  203. public Dictionary<string, int> flags;
  204. public Dictionary<string, string> partsDic;
  205. public enum Feature
  206. {
  207. Null,
  208. 元気な笑顔,
  209. 朗らかな魅力,
  210. 優美,
  211. 純真無垢,
  212. 天使,
  213. 魅了,
  214. 大人びた魅力,
  215. 魔性の魅力,
  216. 凜とした,
  217. 高貴,
  218. 恥ずかしがり屋,
  219. 素直,
  220. 妖艶な魅力,
  221. 上品,
  222. 優雅,
  223. とことん尽くす,
  224. 傅く,
  225. 過去の秘密,
  226. 疲労,
  227. 過去の過ち,
  228. 雅,
  229. 撫子,
  230. 一途,
  231. 盲目的,
  232. 風雅,
  233. 母性的,
  234. 女神,
  235. 無防備,
  236. 小悪魔,
  237. 落ち着きがある,
  238. 礼儀正しい,
  239. 妹系,
  240. 元気,
  241. ハニ\u30FCトラップ,
  242. 傾国の美女,
  243. Max
  244. }
  245. public enum Propensity
  246. {
  247. Null,
  248. 淫乱,
  249. M女,
  250. 尻穴好き,
  251. 二穴好き,
  252. 変態,
  253. 奉仕好き,
  254. 中出し好き,
  255. 飲精好き,
  256. Max
  257. }
  258. public class WorkData
  259. {
  260. public WorkData(BinaryReader reader)
  261. {
  262. this.id = reader.ReadInt32();
  263. this.play_count = reader.ReadUInt32();
  264. this.level = reader.ReadInt32();
  265. }
  266. public MaidStatus.WorkData toNewWorkData()
  267. {
  268. return new MaidStatus.WorkData
  269. {
  270. id = this.id,
  271. playCount = this.play_count,
  272. level = this.level
  273. };
  274. }
  275. public int id;
  276. public uint play_count;
  277. public int level;
  278. }
  279. public class ClassData
  280. {
  281. public ClassData(int classId, BinaryReader reader)
  282. {
  283. this.classId = classId;
  284. this.isHave = reader.ReadBoolean();
  285. this.currentExp = reader.ReadInt32();
  286. this.totalExp = reader.ReadInt32();
  287. this.nextExp = reader.ReadInt32();
  288. this.level = reader.ReadInt32();
  289. }
  290. public readonly int classId;
  291. public readonly bool isHave;
  292. public readonly int currentExp;
  293. public readonly int totalExp;
  294. public readonly int nextExp;
  295. public readonly int level;
  296. }
  297. public class SkillData
  298. {
  299. public SkillData(BinaryReader reader)
  300. {
  301. this.id = reader.ReadInt32();
  302. this.playCount = reader.ReadUInt32();
  303. this.currentExp = reader.ReadInt32();
  304. this.totalExp = reader.ReadInt32();
  305. this.nextExp = reader.ReadInt32();
  306. this.level = reader.ReadInt32();
  307. }
  308. public readonly int id;
  309. public readonly uint playCount;
  310. public readonly int currentExp;
  311. public readonly int totalExp;
  312. public readonly int nextExp;
  313. public readonly int level;
  314. }
  315. public class Body
  316. {
  317. public Body(BinaryReader reader)
  318. {
  319. this.height = reader.ReadInt32();
  320. this.weight = reader.ReadInt32();
  321. this.bust = reader.ReadInt32();
  322. this.waist = reader.ReadInt32();
  323. this.hip = reader.ReadInt32();
  324. this.cup = reader.ReadString();
  325. }
  326. public int height;
  327. public int weight;
  328. public int bust;
  329. public int waist;
  330. public int hip;
  331. public string cup;
  332. }
  333. }
  334. }