ProfileCtrl.cs 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using Edit;
  5. using I2.Loc;
  6. using MaidStatus;
  7. using MaidStatus.CsvData;
  8. using UnityEngine;
  9. using wf;
  10. using Yotogis;
  11. public class ProfileCtrl : MonoBehaviour
  12. {
  13. private bool m_enabledInput
  14. {
  15. get
  16. {
  17. return BaseMgr<ProfileMgr>.Instance.m_enabledInput;
  18. }
  19. }
  20. private bool m_enabledPersonalityInput
  21. {
  22. get
  23. {
  24. return BaseMgr<ProfileMgr>.Instance.m_enabledPersonalityInput;
  25. }
  26. }
  27. private int MAX_NAME_LENGTH
  28. {
  29. get
  30. {
  31. return (!Product.isEnglish) ? 8 : 11;
  32. }
  33. }
  34. public void Init(GameObject goProfilePanel, Status status)
  35. {
  36. this.m_goProfilePanel = goProfilePanel;
  37. this.m_maidStatus = status;
  38. string f_strObjName = "CharacterInfo/Name/FirstName";
  39. string f_strObjName2 = "CharacterInfo/Name/LastName";
  40. if (Product.isEnglish)
  41. {
  42. UTY.GetChildObject(base.gameObject, "CharacterInfo/Name", false).SetActive(false);
  43. UTY.GetChildObject(base.gameObject, "CharacterInfo/EnZone", false).SetActive(true);
  44. f_strObjName = "CharacterInfo/EnZone/NameZone/Name/FirstName";
  45. f_strObjName2 = "CharacterInfo/EnZone/NameZone/Name/LastName";
  46. }
  47. this.m_lContractType = UTY.GetChildObject(this.m_goProfilePanel, "ContractType/OutputField", false).GetComponent<UILabel>();
  48. GameObject childObject = UTY.GetChildObject(this.m_goProfilePanel, f_strObjName, false);
  49. this.m_inFirstName = childObject.GetComponent<UIInput>();
  50. this.m_clFirstName = childObject.GetComponent<BoxCollider>();
  51. EventDelegate.Add(this.m_inFirstName.onChange, new EventDelegate.Callback(BaseMgr<ProfileMgr>.Instance.OnChangeFirstName));
  52. GameObject childObject2 = UTY.GetChildObject(this.m_goProfilePanel, f_strObjName2, false);
  53. this.m_inLastName = childObject2.GetComponent<UIInput>();
  54. this.m_clLastName = childObject2.GetComponent<BoxCollider>();
  55. EventDelegate.Add(this.m_inLastName.onChange, new EventDelegate.Callback(BaseMgr<ProfileMgr>.Instance.OnChangeLastName));
  56. this.m_buFirstName = UTY.GetChildObject(childObject, "Random", false).GetComponent<UIButton>();
  57. EventDelegate.Add(this.m_buFirstName.onClick, delegate()
  58. {
  59. this.m_inFirstName.RemoveFocus();
  60. this.m_inFirstName.value = MaidRandomName.GetFirstName();
  61. });
  62. this.m_buLastName = UTY.GetChildObject(childObject2, "Random", false).GetComponent<UIButton>();
  63. EventDelegate.Add(this.m_buLastName.onClick, delegate()
  64. {
  65. this.m_inLastName.RemoveFocus();
  66. this.m_inLastName.value = MaidRandomName.GetLastName();
  67. });
  68. GameObject childObject3 = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/EnZone/NickNameAndAge/Name/NickName", false);
  69. this.m_inNickName = childObject3.GetComponent<UIInput>();
  70. this.m_clNickName = childObject3.GetComponent<BoxCollider>();
  71. GameObject childObject4 = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/EnZone/NickNameAndAge/Age/Age", false);
  72. this.m_inAgeInput = childObject4.GetComponent<UIInput>();
  73. this.m_clAgeInput = childObject4.GetComponent<BoxCollider>();
  74. this.m_lMaidClassName = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/MaidClass/Type", false).GetComponent<UILabel>();
  75. this.m_lMaidClassLevel = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/MaidClass/Level", false).GetComponent<UILabel>();
  76. this.m_lMaidClassExp = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/MaidClass/Exp", false).GetComponent<UILabel>();
  77. this.m_lMaidClassRequiredExp = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/MaidClass/RequiredExp", false).GetComponent<UILabel>();
  78. this.m_lYotogiClassName = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/YotogiClass/Type", false).GetComponent<UILabel>();
  79. this.m_lYotogiClassLevel = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/YotogiClass/Level", false).GetComponent<UILabel>();
  80. this.m_lYotogiClassExp = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/YotogiClass/Exp", false).GetComponent<UILabel>();
  81. this.m_lYotogiClassRequiredExp = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/YotogiClass/RequiredExp", false).GetComponent<UILabel>();
  82. this.m_lRelation = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Relation", false).GetComponent<UILabel>();
  83. this.m_lConditionText = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/ConditionText", false).GetComponent<UILabel>();
  84. this.m_lYotogiPlayCount = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/OthersPlayCount", false).GetComponent<UILabel>();
  85. this.m_lOthersPlayCount = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/YotogiPlayCount", false).GetComponent<UILabel>();
  86. this.m_lHp = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Hp", false).GetComponent<UILabel>();
  87. this.m_lLikability = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Likability", false).GetComponent<UILabel>();
  88. this.m_lMind = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Mind", false).GetComponent<UILabel>();
  89. this.m_lReception = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Reception", false).GetComponent<UILabel>();
  90. this.m_lCare = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Care", false).GetComponent<UILabel>();
  91. this.m_lStudyRate = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StudyRate", false).GetComponent<UILabel>();
  92. this.m_lTeachRate = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/TeachRate", false).GetComponent<UILabel>();
  93. GameObject childObject5 = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/Personal/PopupList", false);
  94. this.m_pPersonal = childObject5.GetComponent<UIPopupList>();
  95. this.m_lPersonal = UTY.GetChildObject(childObject5, "LabelParent/Label", false).GetComponent<UILabel>();
  96. bool flag = GameMain.Instance.CharacterMgr.status.GetFlag("オープニング終了") == 1;
  97. List<Personal.Data> allDatas = Personal.GetAllDatas(true);
  98. List<Personal.Data> list = new List<Personal.Data>();
  99. foreach (Personal.Data data in allDatas)
  100. {
  101. string a = data.uniqueName.ToLower();
  102. if (data.oldPersonal)
  103. {
  104. if (a == "pure" || a == "cool" || a == "pride")
  105. {
  106. if (GameMain.Instance.CharacterMgr.status.isAvailableTransfer)
  107. {
  108. list.Add(data);
  109. }
  110. }
  111. else if (flag)
  112. {
  113. if (data.single)
  114. {
  115. list.Add(data);
  116. }
  117. else if (!string.IsNullOrEmpty(GameMain.Instance.CMSystem.CM3D2Path) && data.compatible)
  118. {
  119. list.Add(data);
  120. }
  121. }
  122. }
  123. else
  124. {
  125. list.Add(data);
  126. }
  127. }
  128. this.m_pPersonal.items.Clear();
  129. if (Product.supportMultiLanguage)
  130. {
  131. this.m_pPersonal.isLocalized = true;
  132. ProfileCtrl.m_dicPersonal = new Dictionary<string, Personal.Data>();
  133. foreach (Personal.Data data2 in list)
  134. {
  135. string termName = data2.termName;
  136. this.m_pPersonal.items.Add(termName);
  137. ProfileCtrl.m_dicPersonal.Add(termName, data2);
  138. }
  139. }
  140. else
  141. {
  142. ProfileCtrl.m_dicPersonal = new Dictionary<string, Personal.Data>();
  143. foreach (Personal.Data data3 in list)
  144. {
  145. string drawName = data3.drawName;
  146. this.m_pPersonal.items.Add(drawName);
  147. ProfileCtrl.m_dicPersonal.Add(drawName, data3);
  148. }
  149. }
  150. EventDelegate.Add(this.m_pPersonal.onChange, delegate()
  151. {
  152. });
  153. this.m_clPersonal = childObject5.GetComponent<BoxCollider>();
  154. this.m_goPersonalSelectorIcon = UTY.GetChildObject(childObject5, "Symbol", false);
  155. GameObject childObject6 = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/SexualExperience/PopupList", false);
  156. this.m_pSexualExperience = childObject6.GetComponent<UIPopupList>();
  157. ProfileCtrl.m_dicSexualExperience = new Dictionary<string, Seikeiken>();
  158. for (int i = 0; i < Enum.GetValues(typeof(Seikeiken)).Length; i++)
  159. {
  160. Seikeiken seikeiken = (Seikeiken)i;
  161. ProfileCtrl.m_dicSexualExperience.Add(EnumConvert.GetString(seikeiken), seikeiken);
  162. }
  163. this.m_clSexualExperience = childObject6.GetComponent<BoxCollider>();
  164. this.m_goSexualExperienceSelectorIcon = UTY.GetChildObject(childObject6, "Symbol", false);
  165. this.m_lHeight = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Body/Height", false).GetComponent<UILabel>();
  166. this.m_lWeight = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Body/Weight", false).GetComponent<UILabel>();
  167. this.m_lBust = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Body/Bust/Bust", false).GetComponent<UILabel>();
  168. this.m_lCup = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Body/Bust/Cup", false).GetComponent<UILabel>();
  169. this.m_lWaist = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Body/Waist", false).GetComponent<UILabel>();
  170. this.m_lHip = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/Body/Hip", false).GetComponent<UILabel>();
  171. this.m_lCooking = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Cooking/Box", false).GetComponent<UILabel>();
  172. this.m_lDance = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Dance/Box", false).GetComponent<UILabel>();
  173. this.m_lVocal = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Vocal/Box", false).GetComponent<UILabel>();
  174. this.m_lLovely = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Lovely/Box", false).GetComponent<UILabel>();
  175. this.m_lElegance = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Elegance/Box", false).GetComponent<UILabel>();
  176. this.m_lCharm = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Charm/Box", false).GetComponent<UILabel>();
  177. this.m_lInran = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Inran/Box", false).GetComponent<UILabel>();
  178. this.m_lMValue = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/MValue/Box", false).GetComponent<UILabel>();
  179. this.m_lHentai = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Hentai/Box", false).GetComponent<UILabel>();
  180. this.m_lHousi = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/Housi/Box", false).GetComponent<UILabel>();
  181. this.m_lMaidPoint = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/MaidPoint", false).GetComponent<UILabel>();
  182. this.m_goMaidPointTitleAndFrame = UTY.GetChildObject(this.m_goProfilePanel, "CharacterInfo/ProfileBase/StatusPoints/MaidPoint/MaidPointTitleAndFrame", false);
  183. this.initMaidPointUIPosX = this.m_goMaidPointTitleAndFrame.transform.parent.localPosition.x;
  184. this.m_inFreeComment = UTY.GetChildObject(this.m_goProfilePanel, "Comment/FreeCommentWindow/FreeComment", false).GetComponent<UIInput>();
  185. EventDelegate.Add(this.m_inFreeComment.onChange, new EventDelegate.Callback(BaseMgr<ProfileMgr>.Instance.OnChangeFreeComment));
  186. this.m_lProfileComment = UTY.GetChildObject(this.m_goProfilePanel, "Comment/ProfileCommentWindow/ProfileComment", false).GetComponent<UILabel>();
  187. if (Product.supportMultiLanguage)
  188. {
  189. UILabel componentInChildren = this.m_inFreeComment.GetComponentInChildren<UILabel>();
  190. if (componentInChildren != null)
  191. {
  192. componentInChildren.spacingX = 0;
  193. }
  194. this.m_lProfileComment.spacingX = 0;
  195. }
  196. this.m_goProfileComment = UTY.GetChildObject(this.m_goProfilePanel, "Comment/ProfileCommentWindow/ProfileComment", false);
  197. this.m_goFreeComment = UTY.GetChildObject(this.m_goProfilePanel, "Comment/FreeCommentWindow/FreeComment", false);
  198. GameObject childObject7 = UTY.GetChildObject(this.m_goProfilePanel, "Comment/ProfileCommentWindow/ProfileTab", false);
  199. this.m_bProfileTab = childObject7.GetComponent<UIButton>();
  200. this.m_goProfileTabSelector = UTY.GetChildObject(childObject7, "SelectCursor", false);
  201. GameObject childObject8 = UTY.GetChildObject(this.m_goProfilePanel, "Comment/FreeCommentWindow/FreeTab", false);
  202. this.m_bFreeTab = childObject8.GetComponent<UIButton>();
  203. this.m_goFreeTabSelector = UTY.GetChildObject(childObject8, "SelectCursor", false);
  204. this.activeColor = new Color(this.m_bProfileTab.defaultColor.r, this.m_bProfileTab.defaultColor.g, this.m_bProfileTab.defaultColor.b, 1f);
  205. this.inActiveColor = this.m_bProfileTab.defaultColor;
  206. this.m_goMaidSkillParent = UTY.GetChildObject(this.m_goProfilePanel, "SubWindows/MaidSkillViewer/Contents/MaidSkillUnitParent", false);
  207. this.m_goMaidSkillViewer = UTY.GetChildObject(this.m_goProfilePanel, "SubWindows/MaidSkillViewer", false);
  208. this.m_maidSkillScrollView = UTY.GetChildObject(this.m_goMaidSkillViewer, "Contents", false).GetComponent<UIScrollView>();
  209. this.m_goCharacterParent = UTY.GetChildObject(this.m_goProfilePanel, "SubWindows/CharacterViewer/Contents/CharacterUnitParent", false);
  210. this.m_goCharacterViewer = UTY.GetChildObject(this.m_goProfilePanel, "SubWindows/CharacterViewer", false);
  211. this.m_characterScrollView = UTY.GetChildObject(this.m_goCharacterViewer, "Contents", false).GetComponent<UIScrollView>();
  212. this.m_goPropensityParent = UTY.GetChildObject(this.m_goProfilePanel, "SubWindows/PropensityViewer/Contents/CharacterUnitParent", false);
  213. this.m_goPropensityViewer = UTY.GetChildObject(this.m_goProfilePanel, "SubWindows/PropensityViewer", false);
  214. this.m_propensityScrollView = UTY.GetChildObject(this.m_goPropensityViewer, "Contents", false).GetComponent<UIScrollView>();
  215. this.m_goYotogiSkillParent = UTY.GetChildObject(this.m_goProfilePanel, "SubWindows/YotogiSkillViewer/Contents/YotogiSkillUnitParent", false);
  216. this.m_goYotogiSkillViewer = UTY.GetChildObject(this.m_goProfilePanel, "SubWindows/YotogiSkillViewer", false);
  217. this.m_yotogiSkillScrollView = UTY.GetChildObject(this.m_goYotogiSkillViewer, "Contents", false).GetComponent<UIScrollView>();
  218. this.m_dicSpriteName = new Dictionary<ProfileCtrl.LevelOfAchievement, string>
  219. {
  220. {
  221. ProfileCtrl.LevelOfAchievement.level_1,
  222. "cm3d2_edit_profile_yotogiskill_sign_batu"
  223. },
  224. {
  225. ProfileCtrl.LevelOfAchievement.level_2,
  226. "cm3d2_edit_profile_yotogiskill_sign_sankaku"
  227. },
  228. {
  229. ProfileCtrl.LevelOfAchievement.level_3,
  230. "cm3d2_edit_profile_yotogiskill_sign_maru"
  231. },
  232. {
  233. ProfileCtrl.LevelOfAchievement.level_4,
  234. "cm3d2_edit_profile_yotogiskill_sign_nijumaru"
  235. }
  236. };
  237. this.m_dicUpperBtn = new Dictionary<ProfileMgr.UpperButtonType, ProfileCtrl.UpperButton>();
  238. IEnumerator enumerator4 = Enum.GetValues(typeof(ProfileMgr.UpperButtonType)).GetEnumerator();
  239. try
  240. {
  241. while (enumerator4.MoveNext())
  242. {
  243. object obj = enumerator4.Current;
  244. ProfileMgr.UpperButtonType upperButtonType = (ProfileMgr.UpperButtonType)obj;
  245. if (upperButtonType != ProfileMgr.UpperButtonType.None)
  246. {
  247. GameObject childObject9 = UTY.GetChildObject(this.m_goProfilePanel, "UpperButton/" + upperButtonType.ToString(), false);
  248. UIButton component = childObject9.GetComponent<UIButton>();
  249. GameObject childObject10 = UTY.GetChildObject(childObject9, "SelectCursor", false);
  250. childObject10.SetActive(false);
  251. ProfileCtrl.UpperButton upperButton = new ProfileCtrl.UpperButton();
  252. upperButton.m_btnButton = component;
  253. upperButton.m_name = upperButtonType;
  254. upperButton.m_goSelectCursor = childObject10;
  255. this.m_dicUpperBtn.Add(upperButton.m_name, upperButton);
  256. }
  257. }
  258. }
  259. finally
  260. {
  261. IDisposable disposable;
  262. if ((disposable = (enumerator4 as IDisposable)) != null)
  263. {
  264. disposable.Dispose();
  265. }
  266. }
  267. this.m_dicSubViewer = new Dictionary<ProfileMgr.UpperButtonType, GameObject>
  268. {
  269. {
  270. ProfileMgr.UpperButtonType.MaidSkill,
  271. this.m_goMaidSkillViewer
  272. },
  273. {
  274. ProfileMgr.UpperButtonType.YotogiSkill,
  275. this.m_goYotogiSkillViewer
  276. },
  277. {
  278. ProfileMgr.UpperButtonType.Character,
  279. this.m_goCharacterViewer
  280. },
  281. {
  282. ProfileMgr.UpperButtonType.Propensity,
  283. this.m_goPropensityViewer
  284. }
  285. };
  286. this.initCommentWindow();
  287. this.LoadMaidParamData();
  288. this.SetEnableInput(this.m_enabledInput, this.m_enabledPersonalityInput);
  289. this.m_bInited = true;
  290. if (Product.isPublic)
  291. {
  292. UIWFPositionStore component2 = UTY.GetChildObject(base.gameObject, "Layout_public", false).GetComponent<UIWFPositionStore>();
  293. if (component2 != null)
  294. {
  295. component2.Apply();
  296. }
  297. UTY.GetChildObject(base.gameObject, "UpperButton/Character", false).GetComponent<UISprite>().width = 392;
  298. BoxCollider component3 = UTY.GetChildObject(base.gameObject, "UpperButton/Character", false).GetComponent<BoxCollider>();
  299. component3.size = new Vector3(392f, component3.size.y, 0f);
  300. }
  301. if (Product.isEnglish)
  302. {
  303. UIWFPositionStore component4 = UTY.GetChildObject(base.gameObject, "Layout_en", false).GetComponent<UIWFPositionStore>();
  304. if (component4 != null)
  305. {
  306. component4.Apply();
  307. }
  308. if (Product.isPublic)
  309. {
  310. UTY.GetChildObject(base.gameObject, "UpperButton", false).transform.localPosition = new Vector3(0f, -69f, 0f);
  311. UTY.GetChildObject(base.gameObject, "Comment", false).transform.localPosition = new Vector3(UTY.GetChildObject(base.gameObject, "Comment", false).transform.localPosition.x, -42f, 0f);
  312. }
  313. else
  314. {
  315. UTY.GetChildObject(base.gameObject, "Comment", false).transform.localPosition = new Vector3(UTY.GetChildObject(base.gameObject, "Comment", false).transform.localPosition.x, -124f, 0f);
  316. }
  317. }
  318. }
  319. private void SetEnableInput(bool enabledInput, bool enabledPersonalityInput)
  320. {
  321. this.m_inFirstName.enabled = enabledInput;
  322. this.m_inLastName.enabled = enabledInput;
  323. this.m_clFirstName.enabled = enabledInput;
  324. this.m_clLastName.enabled = enabledInput;
  325. this.m_buFirstName.gameObject.SetActive(enabledInput);
  326. this.m_buLastName.gameObject.SetActive(enabledInput);
  327. Behaviour inAgeInput = this.m_inAgeInput;
  328. this.m_clAgeInput.enabled = enabledInput;
  329. inAgeInput.enabled = enabledInput;
  330. this.m_pPersonal.enabled = enabledPersonalityInput;
  331. this.m_clPersonal.enabled = enabledPersonalityInput;
  332. this.m_goPersonalSelectorIcon.SetActive(enabledPersonalityInput);
  333. this.m_pSexualExperience.enabled = enabledInput;
  334. this.m_clSexualExperience.enabled = enabledInput;
  335. this.m_goSexualExperienceSelectorIcon.SetActive(enabledInput);
  336. if (enabledInput)
  337. {
  338. this.m_lMaidPoint.alpha = 1f;
  339. this.m_goMaidPointTitleAndFrame.SetActive(true);
  340. }
  341. else
  342. {
  343. this.m_lMaidPoint.alpha = 0f;
  344. this.m_goMaidPointTitleAndFrame.SetActive(false);
  345. }
  346. }
  347. public void SetActiveViewerAndButton(ProfileMgr.UpperButtonType btn)
  348. {
  349. this.SetActiveViewer(btn);
  350. this.SetActiveButton(btn);
  351. }
  352. public void SetActiveViewer(ProfileMgr.UpperButtonType btn)
  353. {
  354. Vector3 localPosition = this.m_goMaidPointTitleAndFrame.transform.parent.localPosition;
  355. this.m_goMaidPointTitleAndFrame.transform.parent.localPosition = new Vector3(this.initMaidPointUIPosX, localPosition.y, localPosition.z);
  356. foreach (ProfileMgr.UpperButtonType upperButtonType in this.m_dicSubViewer.Keys)
  357. {
  358. if (btn == upperButtonType)
  359. {
  360. GameObject gameObject = this.m_dicSubViewer[upperButtonType];
  361. gameObject.SetActive(true);
  362. localPosition = this.m_goMaidPointTitleAndFrame.transform.parent.localPosition;
  363. this.m_goMaidPointTitleAndFrame.transform.parent.localPosition = new Vector3(-270f, localPosition.y, localPosition.z);
  364. }
  365. else
  366. {
  367. GameObject gameObject2 = this.m_dicSubViewer[upperButtonType];
  368. gameObject2.SetActive(false);
  369. }
  370. }
  371. }
  372. private void SetActiveButton(ProfileMgr.UpperButtonType btn)
  373. {
  374. foreach (ProfileMgr.UpperButtonType upperButtonType in this.m_dicUpperBtn.Keys)
  375. {
  376. ProfileCtrl.UpperButton upperButton;
  377. if (this.m_dicUpperBtn.TryGetValue(upperButtonType, out upperButton))
  378. {
  379. if (btn == upperButtonType)
  380. {
  381. upperButton.m_btnButton.defaultColor = this.activeColor;
  382. upperButton.m_goSelectCursor.SetActive(true);
  383. }
  384. else
  385. {
  386. upperButton.m_btnButton.defaultColor = this.inActiveColor;
  387. upperButton.m_goSelectCursor.SetActive(false);
  388. }
  389. }
  390. }
  391. ProfileMgr.currentActiveBtn = btn;
  392. }
  393. private void initCommentWindow()
  394. {
  395. this.m_goProfileComment.SetActive(true);
  396. this.m_goFreeComment.SetActive(false);
  397. this.m_goProfileTabSelector.SetActive(true);
  398. this.m_goFreeTabSelector.SetActive(false);
  399. this.m_bProfileTab.defaultColor = this.activeColor;
  400. this.m_bFreeTab.defaultColor = this.inActiveColor;
  401. }
  402. public void LoadMaidParamData()
  403. {
  404. this.UpdateProfileData(false);
  405. this.m_lContractType.GetComponent<Localize>().SetTerm(this.GetContractType(this.m_maidStatus.contract));
  406. this.m_inLastName.value = this.m_maidStatus.lastName;
  407. this.m_inFirstName.value = this.m_maidStatus.firstName;
  408. this.m_inNickName.value = this.m_maidStatus.nickName;
  409. this.m_inAgeInput.value = this.m_maidStatus.age.ToString();
  410. ClassData<JobClass.Data> selectedJobClass = this.m_maidStatus.selectedJobClass;
  411. if (selectedJobClass != null)
  412. {
  413. this.m_lMaidClassName.text = selectedJobClass.data.drawName;
  414. Utility.SetLocalizeTerm(this.m_lMaidClassName, selectedJobClass.data.termName, false);
  415. this.m_lMaidClassLevel.text = selectedJobClass.level.ToString();
  416. this.m_lMaidClassExp.text = selectedJobClass.cur_exp.ToString();
  417. this.m_lMaidClassRequiredExp.text = selectedJobClass.next_exp.ToString();
  418. }
  419. ClassData<YotogiClass.Data> selectedYotogiClass = this.m_maidStatus.selectedYotogiClass;
  420. if (selectedYotogiClass != null)
  421. {
  422. this.m_lYotogiClassName.text = selectedYotogiClass.data.drawName;
  423. this.m_lYotogiClassLevel.text = selectedYotogiClass.level.ToString();
  424. this.m_lYotogiClassExp.text = selectedYotogiClass.cur_exp.ToString();
  425. this.m_lYotogiClassRequiredExp.text = selectedYotogiClass.next_exp.ToString();
  426. }
  427. this.m_lHeight.text = this.m_maidStatus.body.height.ToString();
  428. this.m_lWeight.text = this.m_maidStatus.body.weight.ToString();
  429. this.m_lBust.text = this.m_maidStatus.body.bust.ToString();
  430. this.m_lWaist.text = this.m_maidStatus.body.waist.ToString();
  431. this.m_lHip.text = this.m_maidStatus.body.hip.ToString();
  432. this.m_lCup.text = this.m_maidStatus.body.cup;
  433. this.m_lRelation.GetComponent<Localize>().SetTerm(this.GetCondition(this.m_maidStatus.relation, this.m_maidStatus.additionalRelation));
  434. this.m_lConditionText.GetComponent<UILabel>().text = this.m_maidStatus.conditionText;
  435. this.m_lConditionText.GetComponent<Localize>().SetTerm(this.m_maidStatus.conditionTermText);
  436. this.m_lYotogiPlayCount.text = this.m_maidStatus.playCountYotogi.ToString();
  437. this.m_lOthersPlayCount.text = this.m_maidStatus.playCountNightWork.ToString();
  438. this.m_lHp.text = this.m_maidStatus.maxHp.ToString();
  439. this.m_lLikability.text = this.m_maidStatus.likability.ToString();
  440. this.m_lMind.text = this.m_maidStatus.maxMind.ToString();
  441. this.m_lReception.text = this.m_maidStatus.reception.ToString();
  442. this.m_lCare.text = this.m_maidStatus.care.ToString();
  443. this.m_lStudyRate.text = this.ToPercent(this.m_maidStatus.studyRate).ToString();
  444. this.m_lTeachRate.text = this.ToPercent(this.m_maidStatus.teachRate).ToString();
  445. this.m_lCooking.text = this.m_maidStatus.cooking.ToString();
  446. this.m_lDance.text = this.m_maidStatus.dance.ToString();
  447. this.m_lVocal.text = this.m_maidStatus.vocal.ToString();
  448. this.m_lLovely.text = this.m_maidStatus.lovely.ToString();
  449. this.m_lElegance.text = this.m_maidStatus.elegance.ToString();
  450. this.m_lCharm.text = this.m_maidStatus.charm.ToString();
  451. this.m_lInran.text = this.m_maidStatus.inyoku.ToString();
  452. this.m_lMValue.text = this.m_maidStatus.mvalue.ToString();
  453. this.m_lHentai.text = this.m_maidStatus.hentai.ToString();
  454. this.m_lHousi.text = this.m_maidStatus.housi.ToString();
  455. this.m_lMaidPoint.text = SceneEdit.Instance.maidPoint.ToString();
  456. foreach (KeyValuePair<string, Personal.Data> keyValuePair in ProfileCtrl.m_dicPersonal)
  457. {
  458. if (this.m_maidStatus.personal.uniqueName == keyValuePair.Value.uniqueName)
  459. {
  460. this.m_pPersonal.value = keyValuePair.Key;
  461. break;
  462. }
  463. }
  464. this.m_pSexualExperience.value = this.GetSelectOptionNameFromSexualExpe(this.m_maidStatus.seikeiken);
  465. this.m_lProfileComment.text = this.m_maidStatus.profileComment;
  466. this.m_inFreeComment.value = this.m_maidStatus.freeComment;
  467. }
  468. public void SetLastName(string inputText)
  469. {
  470. this.m_maidStatus.lastName = this.AdjustStrLengthIfOver(inputText, this.MAX_NAME_LENGTH);
  471. }
  472. public void SetFirstName(string inputText)
  473. {
  474. this.m_maidStatus.firstName = this.AdjustStrLengthIfOver(inputText, this.MAX_NAME_LENGTH);
  475. }
  476. public void SetNickName(string inputText)
  477. {
  478. this.m_maidStatus.nickName = this.AdjustStrLengthIfOver(inputText, this.MAX_NAME_LENGTH);
  479. }
  480. public string SetAge(string inputText)
  481. {
  482. int num = Status.minAge;
  483. if (!int.TryParse(inputText, out num))
  484. {
  485. num = Status.minAge;
  486. }
  487. num = wf.Math.RoundMinMax(num, Status.minAge, Status.maxAge);
  488. this.m_maidStatus.age = num;
  489. return this.m_maidStatus.age.ToString();
  490. }
  491. public void SubmitAge()
  492. {
  493. if (this.m_inAgeInput.isSelected)
  494. {
  495. this.m_inAgeInput.RemoveFocus();
  496. }
  497. this.m_inAgeInput.value = this.m_maidStatus.age.ToString();
  498. }
  499. public void SetFreeCommnet(string inputText)
  500. {
  501. this.m_maidStatus.freeComment = this.AdjustStrLengthIfOver(inputText, 304);
  502. }
  503. public void SetPersonal(string selectValue)
  504. {
  505. Personal.Data personal;
  506. if (ProfileCtrl.m_dicPersonal.TryGetValue(selectValue, out personal))
  507. {
  508. this.m_maidStatus.SetPersonal(personal);
  509. Debug.Log(string.Concat(new object[]
  510. {
  511. "保存された性格:",
  512. this.m_maidStatus.personal,
  513. " = ",
  514. selectValue
  515. }));
  516. }
  517. }
  518. public void SetSexualExperience(string selectValue)
  519. {
  520. Seikeiken[] array = new Seikeiken[]
  521. {
  522. Seikeiken.No_No,
  523. Seikeiken.Yes_No,
  524. Seikeiken.No_Yes,
  525. Seikeiken.Yes_Yes
  526. };
  527. foreach (Seikeiken seikeiken in array)
  528. {
  529. if (EnumConvert.GetTerm(seikeiken) == selectValue)
  530. {
  531. Seikeiken initSeikeiken = Seikeiken.No_No;
  532. if (ProfileCtrl.m_dicSexualExperience.TryGetValue(EnumConvert.GetString(seikeiken), out initSeikeiken))
  533. {
  534. this.m_maidStatus.seikeiken = (this.m_maidStatus.initSeikeiken = initSeikeiken);
  535. }
  536. break;
  537. }
  538. }
  539. }
  540. private string GetSelectOptionNameFromSexualExpe(Seikeiken sexualExperience)
  541. {
  542. foreach (KeyValuePair<string, Seikeiken> keyValuePair in ProfileCtrl.m_dicSexualExperience)
  543. {
  544. if (keyValuePair.Value == sexualExperience)
  545. {
  546. return EnumConvert.GetTerm(keyValuePair.Value);
  547. }
  548. }
  549. return null;
  550. }
  551. private string GetContractType(Contract contractType)
  552. {
  553. return EnumConvert.GetTerm(contractType);
  554. }
  555. private string GetCondition(Relation relation, AdditionalRelation addRelation)
  556. {
  557. return EnumConvert.GetTerm(relation, addRelation);
  558. }
  559. private string AdjustStrLengthIfOver(string str, int length)
  560. {
  561. if (str.Length > length)
  562. {
  563. str = str.Substring(length);
  564. Debug.LogError(string.Format("入力された文字数が最大文字数を超えています。入力文字={0}, 最大文字数={1}", str, length));
  565. }
  566. return str;
  567. }
  568. private int AdjustIntIfOverRange(int value, int minNumber, int maxNumber)
  569. {
  570. if (value < minNumber)
  571. {
  572. value = minNumber;
  573. Debug.LogError(string.Format("入力された値が許容される最小値より小さいです。入力値={0}, 許容される値の範囲[{1}-{2}]", value, minNumber, maxNumber));
  574. }
  575. else if (value > maxNumber)
  576. {
  577. value = maxNumber;
  578. Debug.LogError(string.Format("入力された値が許容される最大値より大きいです。入力値={0}, 許容される値の範囲[{1}-{2}]", value, minNumber, maxNumber));
  579. }
  580. return value;
  581. }
  582. private void CheckValueRange(int value, int minNumber, int maxNumber)
  583. {
  584. if (value < minNumber || value > maxNumber)
  585. {
  586. Debug.LogError(string.Format("値が不適切です。値={0}, 許容される値の範囲[{1}-{2}]", value, minNumber, maxNumber));
  587. }
  588. }
  589. private bool CheckValueLength(string value, int length)
  590. {
  591. if (value.Length <= length)
  592. {
  593. return true;
  594. }
  595. Debug.LogError(string.Format("値の桁数が不適切です。値={0}, 許容される値の最大桁数={1}", value, length));
  596. return false;
  597. }
  598. public void ChangeCommentTab(string clickTab)
  599. {
  600. if (clickTab == ProfileMgr.CommentTab.ProfileTab.ToString())
  601. {
  602. this.m_bProfileTab.defaultColor = this.activeColor;
  603. this.m_bFreeTab.defaultColor = this.inActiveColor;
  604. this.m_goProfileComment.SetActive(true);
  605. this.m_goFreeComment.SetActive(false);
  606. this.m_goProfileTabSelector.SetActive(true);
  607. this.m_goFreeTabSelector.SetActive(false);
  608. }
  609. else if (clickTab == ProfileMgr.CommentTab.FreeTab.ToString())
  610. {
  611. this.m_bProfileTab.defaultColor = this.inActiveColor;
  612. this.m_bFreeTab.defaultColor = this.activeColor;
  613. this.m_goProfileComment.SetActive(false);
  614. this.m_goFreeComment.SetActive(true);
  615. this.m_goProfileTabSelector.SetActive(false);
  616. this.m_goFreeTabSelector.SetActive(true);
  617. }
  618. }
  619. private bool NotExist<K, V>(Dictionary<K, V> dic)
  620. {
  621. return dic == null || dic.Count == 0;
  622. }
  623. public void CreateMaidSkillViewer(Dictionary<string, ProfileCtrl.ProfileLabelUnit> dicProfileLabel)
  624. {
  625. this.m_dicProfileLabel = dicProfileLabel;
  626. this.CreateProfileItemInViewer(ProfileMgr.UpperButtonType.MaidSkill, this.m_goMaidSkillParent);
  627. this.SetActiveViewerAndButton(ProfileMgr.UpperButtonType.MaidSkill);
  628. this.AdjustTargetPosition(this.m_goMaidSkillParent, this.m_maidSkillScrollView);
  629. }
  630. public void CreateCharacterViewer(Dictionary<string, ProfileCtrl.ProfileLabelUnit> dicProfileLabel)
  631. {
  632. this.m_dicProfileLabel = dicProfileLabel;
  633. this.CreateProfileItemInViewer(ProfileMgr.UpperButtonType.Character, this.m_goCharacterParent);
  634. this.SetActiveViewerAndButton(ProfileMgr.UpperButtonType.Character);
  635. this.AdjustTargetPosition(this.m_goCharacterParent, this.m_characterScrollView);
  636. }
  637. public void CreatePropensityViewer(Dictionary<string, ProfileCtrl.ProfileLabelUnit> dicProfileLabel)
  638. {
  639. this.m_dicProfileLabel = dicProfileLabel;
  640. this.CreateProfileItemInViewer(ProfileMgr.UpperButtonType.Propensity, this.m_goPropensityParent);
  641. this.SetActiveViewerAndButton(ProfileMgr.UpperButtonType.Propensity);
  642. this.AdjustTargetPosition(this.m_goPropensityParent, this.m_propensityScrollView);
  643. }
  644. public void CreateYotogiSkill(Dictionary<string, ProfileCtrl.ProfileYotogiSkillUnit> dicYotogiSkill)
  645. {
  646. this.m_dicYotogiSkill = dicYotogiSkill;
  647. this.CreateProfileItemInViewer(ProfileMgr.UpperButtonType.YotogiSkill, this.m_goYotogiSkillParent);
  648. this.SetActiveViewerAndButton(ProfileMgr.UpperButtonType.YotogiSkill);
  649. this.AdjustTargetPosition(this.m_goYotogiSkillParent, this.m_yotogiSkillScrollView);
  650. }
  651. private void CreateProfileItemInViewer(ProfileMgr.UpperButtonType btnType, GameObject goParent)
  652. {
  653. this.ClearExistChildGameObject(goParent);
  654. GameObject gameObject = null;
  655. switch (btnType)
  656. {
  657. case ProfileMgr.UpperButtonType.MaidSkill:
  658. case ProfileMgr.UpperButtonType.Character:
  659. case ProfileMgr.UpperButtonType.Propensity:
  660. {
  661. gameObject = this.GetPrefabs(this.m_goProfileLabelUnitPrefab, "SceneEdit/Profile/Prefab/ProfileLabelUnit");
  662. List<ProfileCtrl.ProfileLabelUnit> list = new List<ProfileCtrl.ProfileLabelUnit>();
  663. foreach (KeyValuePair<string, ProfileCtrl.ProfileLabelUnit> keyValuePair in this.m_dicProfileLabel)
  664. {
  665. list.Add(keyValuePair.Value);
  666. }
  667. list.Sort((ProfileCtrl.ProfileLabelUnit a, ProfileCtrl.ProfileLabelUnit b) => int.Parse(a.m_id) - int.Parse(b.m_id));
  668. for (int i = 0; i < list.Count; i++)
  669. {
  670. GameObject gameObject2 = UnityEngine.Object.Instantiate<GameObject>(gameObject);
  671. this.SetTransformInfo(gameObject2, goParent);
  672. UILabel component = UTY.GetChildObject(gameObject2, "Parameter", false).GetComponent<UILabel>();
  673. component.text = list[i].m_parameter;
  674. Localize localize = component.gameObject.AddComponent<Localize>();
  675. if (btnType == ProfileMgr.UpperButtonType.Character)
  676. {
  677. Utility.SetLocalizeTerm(localize, "MaidStatus/性癖タイプ/" + list[i].m_parameter, false);
  678. }
  679. else if (btnType == ProfileMgr.UpperButtonType.Propensity)
  680. {
  681. Utility.SetLocalizeTerm(localize, "MaidStatus/性癖タイプ/" + list[i].m_parameter, false);
  682. }
  683. }
  684. this.m_goProfileLabelUnitPrefab = gameObject;
  685. break;
  686. }
  687. case ProfileMgr.UpperButtonType.YotogiSkill:
  688. gameObject = this.GetPrefabs(this.m_goYotogiSkillUnitPrefab, "SceneEdit/Profile/Prefab/YotogiSkillUnit");
  689. foreach (KeyValuePair<string, ProfileCtrl.ProfileYotogiSkillUnit> keyValuePair2 in this.m_dicYotogiSkill)
  690. {
  691. GameObject gameObject3 = UnityEngine.Object.Instantiate<GameObject>(gameObject);
  692. this.SetTransformInfo(gameObject3, goParent);
  693. UILabel component2 = UTY.GetChildObject(gameObject3, "Number/Value", false).GetComponent<UILabel>();
  694. component2.text = keyValuePair2.Value.m_number;
  695. UILabel component3 = UTY.GetChildObject(gameObject3, "SkillName/Value", false).GetComponent<UILabel>();
  696. component3.text = keyValuePair2.Value.m_skillName;
  697. UISprite component4 = UTY.GetChildObject(gameObject3, "LevelOfAchievement/Icon", false).GetComponent<UISprite>();
  698. component4.spriteName = this.m_dicSpriteName[keyValuePair2.Value.m_levelOfAchievement];
  699. }
  700. this.m_goYotogiSkillUnitPrefab = gameObject;
  701. break;
  702. }
  703. }
  704. private void SetTransformInfo(GameObject copyPrefabs, GameObject goParent)
  705. {
  706. copyPrefabs.transform.parent = goParent.transform;
  707. copyPrefabs.transform.localScale = Vector3.one;
  708. copyPrefabs.transform.localPosition = Vector3.zero;
  709. copyPrefabs.transform.rotation = Quaternion.identity;
  710. }
  711. private GameObject GetPrefabs(GameObject prefabs, string prefabsPath)
  712. {
  713. if (prefabs == null)
  714. {
  715. prefabs = (Resources.Load(prefabsPath) as GameObject);
  716. if (prefabs == null)
  717. {
  718. Debug.LogError(string.Format("ロードされるプレハブが見つかりませんでした。パス={0}", prefabsPath));
  719. }
  720. }
  721. return prefabs;
  722. }
  723. private void AdjustTargetPosition(GameObject go, UIScrollView scrollView)
  724. {
  725. go.GetComponent<UIGrid>().Reposition();
  726. scrollView.ResetPosition();
  727. }
  728. private void AdjustTargetPositionGridAndTable(GameObject goGrid, GameObject goTable, UIScrollView scrollView)
  729. {
  730. goGrid.GetComponent<UIGrid>().Reposition();
  731. goTable.GetComponent<UITable>().Reposition();
  732. scrollView.ResetPosition();
  733. }
  734. private void ClearExistChildGameObject(GameObject parent)
  735. {
  736. IEnumerator enumerator = parent.transform.GetEnumerator();
  737. try
  738. {
  739. while (enumerator.MoveNext())
  740. {
  741. object obj = enumerator.Current;
  742. Transform transform = (Transform)obj;
  743. UnityEngine.Object.Destroy(transform.gameObject);
  744. }
  745. }
  746. finally
  747. {
  748. IDisposable disposable;
  749. if ((disposable = (enumerator as IDisposable)) != null)
  750. {
  751. disposable.Dispose();
  752. }
  753. }
  754. parent.transform.DetachChildren();
  755. }
  756. private int ToPercent(int number)
  757. {
  758. return (int)System.Math.Floor((double)(number / 10));
  759. }
  760. public void OnDisable()
  761. {
  762. if (!this.m_bInited)
  763. {
  764. return;
  765. }
  766. this.SetFirstName(this.m_inFirstName.value);
  767. this.SetLastName(this.m_inLastName.value);
  768. this.SetNickName(this.m_inNickName.value);
  769. this.SetAge(this.m_inAgeInput.value);
  770. this.SetFreeCommnet(this.m_inFreeComment.value);
  771. }
  772. public void UpdateProfileData(bool updateYotogiSkill)
  773. {
  774. if (this.m_enabledInput)
  775. {
  776. this.m_maidStatus.mainChara = !this.m_enabledPersonalityInput;
  777. foreach (int featureId in this.m_maidStatus.features.GetKeyArray())
  778. {
  779. this.m_maidStatus.RemoveFeature(featureId);
  780. }
  781. List<Feature.Data> allDatas = Feature.GetAllDatas(true);
  782. foreach (Personal.Data.LearnFeature learnFeature in this.m_maidStatus.personal.acquisitionFeatureList)
  783. {
  784. if (learnFeature.isLearnPossible(this.m_maidStatus))
  785. {
  786. this.m_maidStatus.AddFeature(learnFeature.feature);
  787. }
  788. }
  789. AbstractClassData.ClassType classTypeFlags = AbstractClassData.ClassType.Share | AbstractClassData.ClassType.New | AbstractClassData.ClassType.Old;
  790. this.m_maidStatus.yotogiClass.Clear();
  791. foreach (YotogiClass.Data data in this.m_maidStatus.yotogiClass.GetLearnPossibleClassDatas(false, classTypeFlags))
  792. {
  793. if (GameMain.Instance.CharacterMgr.status.IsYotogiClassOpenFlag(data.id))
  794. {
  795. this.m_maidStatus.yotogiClass.Add(data.id, false, true);
  796. }
  797. }
  798. int id = this.m_maidStatus.selectedJobClass.data.id;
  799. HashSet<int> hashSet = new HashSet<int>();
  800. foreach (KeyValuePair<int, ClassData<JobClass.Data>> keyValuePair in this.m_maidStatus.jobClass.GetAllDatas())
  801. {
  802. hashSet.Add(keyValuePair.Key);
  803. }
  804. HashSet<int> hashSet2 = new HashSet<int>();
  805. foreach (JobClass.Data data2 in this.m_maidStatus.jobClass.GetLearnPossibleClassDatas(false, classTypeFlags))
  806. {
  807. if (GameMain.Instance.CharacterMgr.status.IsJobClassOpenFlag(data2.id))
  808. {
  809. hashSet2.Add(data2.id);
  810. }
  811. }
  812. HashSet<int> hashSet3 = new HashSet<int>();
  813. foreach (int item in hashSet)
  814. {
  815. if (!hashSet2.Contains(item))
  816. {
  817. hashSet3.Add(item);
  818. }
  819. }
  820. HashSet<int> hashSet4 = new HashSet<int>();
  821. foreach (int item2 in hashSet2)
  822. {
  823. if (!hashSet.Contains(item2))
  824. {
  825. hashSet4.Add(item2);
  826. }
  827. }
  828. foreach (int id2 in hashSet3)
  829. {
  830. this.m_maidStatus.jobClass.Remove(id2, true);
  831. }
  832. int num = -1;
  833. foreach (int num2 in hashSet4)
  834. {
  835. this.m_maidStatus.jobClass.Add(num2, false, true);
  836. num = ((num >= num2) ? num : num2);
  837. }
  838. if (num != -1)
  839. {
  840. this.m_maidStatus.ChangeJobClass(num);
  841. }
  842. if (updateYotogiSkill)
  843. {
  844. this.m_maidStatus.yotogiSkill.Clear();
  845. List<Skill.Data> learnPossibleSkills = Skill.GetLearnPossibleSkills(this.m_maidStatus);
  846. foreach (Skill.Data data3 in learnPossibleSkills)
  847. {
  848. this.m_maidStatus.yotogiSkill.Add(data3.id);
  849. }
  850. }
  851. this.m_maidStatus.UpdateClassBonusStatus();
  852. this.m_maidStatus.sexPlayNumberOfPeople = MaidProfile.UpdateInitPlayNumber(this.m_maidStatus.maid);
  853. }
  854. this.m_maidStatus.UpdateBodyParam();
  855. this.m_maidStatus.profileComment = MaidProfile.Create(this.m_maidStatus.maid, !this.m_enabledInput);
  856. }
  857. private Status m_maidStatus;
  858. private ProfileCtrl.ProfileAttribute m_profileAttribute;
  859. private GameObject m_goProfilePanel;
  860. private GameObject m_goProfileComment;
  861. private GameObject m_goFreeComment;
  862. private GameObject m_goProfileTabSelector;
  863. private GameObject m_goFreeTabSelector;
  864. private GameObject m_goProfileLabelUnitPrefab;
  865. private GameObject m_goYotogiSkillUnitPrefab;
  866. private GameObject m_goMaidPointTitleAndFrame;
  867. private GameObject m_goMaidSkillParent;
  868. private GameObject m_goCharacterParent;
  869. private GameObject m_goPropensityParent;
  870. private GameObject m_goYotogiSkillParent;
  871. private GameObject m_goErogenousZoneParent;
  872. private GameObject m_goMaidSkillViewer;
  873. private GameObject m_goCharacterViewer;
  874. private GameObject m_goPropensityViewer;
  875. private GameObject m_goYotogiSkillViewer;
  876. private GameObject m_goPersonalSelectorIcon;
  877. private GameObject m_goSexualExperienceSelectorIcon;
  878. private UIScrollView m_maidSkillScrollView;
  879. private UIScrollView m_characterScrollView;
  880. private UIScrollView m_propensityScrollView;
  881. private UIScrollView m_yotogiSkillScrollView;
  882. private UIScrollView m_attributeScrollView;
  883. private UILabel m_lContractType;
  884. private UILabel m_lMaidClassName;
  885. private UILabel m_lMaidClassLevel;
  886. private UILabel m_lMaidClassExp;
  887. private UILabel m_lMaidClassRequiredExp;
  888. private UILabel m_lYotogiClassName;
  889. private UILabel m_lYotogiClassLevel;
  890. private UILabel m_lYotogiClassExp;
  891. private UILabel m_lYotogiClassRequiredExp;
  892. private UILabel m_lHeight;
  893. private UILabel m_lWeight;
  894. private UILabel m_lBust;
  895. private UILabel m_lCup;
  896. private UILabel m_lWaist;
  897. private UILabel m_lHip;
  898. private UILabel m_lRelation;
  899. private UILabel m_lConditionText;
  900. private UILabel m_lYotogiPlayCount;
  901. private UILabel m_lOthersPlayCount;
  902. private UILabel m_lHp;
  903. private UILabel m_lLikability;
  904. private UILabel m_lMind;
  905. private UILabel m_lReception;
  906. private UILabel m_lCare;
  907. private UILabel m_lStudyRate;
  908. private UILabel m_lTeachRate;
  909. private UILabel m_lCooking;
  910. private UILabel m_lDance;
  911. private UILabel m_lVocal;
  912. private UILabel m_lLovely;
  913. private UILabel m_lElegance;
  914. private UILabel m_lCharm;
  915. private UILabel m_lInran;
  916. private UILabel m_lMValue;
  917. private UILabel m_lHentai;
  918. private UILabel m_lHousi;
  919. private UILabel m_lMaidPoint;
  920. private UILabel m_lProfileComment;
  921. private UIInput m_inFreeComment;
  922. private UIInput m_inFirstName;
  923. private UIInput m_inLastName;
  924. private UIInput m_inNickName;
  925. private UIInput m_inAgeInput;
  926. private UIButton m_buFirstName;
  927. private UIButton m_buLastName;
  928. private UIPopupList m_pPersonal;
  929. private UILabel m_lPersonal;
  930. private UIPopupList m_pSexualExperience;
  931. private UIButton m_bProfileTab;
  932. private UIButton m_bFreeTab;
  933. private BoxCollider m_clFirstName;
  934. private BoxCollider m_clLastName;
  935. private BoxCollider m_clNickName;
  936. private BoxCollider m_clAgeInput;
  937. private BoxCollider m_clPersonal;
  938. private BoxCollider m_clSexualExperience;
  939. private static Dictionary<string, Personal.Data> m_dicPersonal;
  940. private static Dictionary<string, Seikeiken> m_dicSexualExperience;
  941. private Dictionary<ProfileMgr.UpperButtonType, GameObject> m_dicSubViewer;
  942. private Dictionary<ProfileMgr.UpperButtonType, ProfileCtrl.UpperButton> m_dicUpperBtn;
  943. private Dictionary<string, ProfileCtrl.ProfileLabelUnit> m_dicProfileLabel;
  944. private Dictionary<string, ProfileCtrl.ProfileYotogiSkillUnit> m_dicYotogiSkill;
  945. private Dictionary<ProfileCtrl.LevelOfAchievement, string> m_dicSpriteName;
  946. private bool m_bInited;
  947. private Color activeColor;
  948. private Color inActiveColor;
  949. private const int MAX_FREE_COMMENT_LENGTH = 304;
  950. private const int MAX_EROGENOUSZONE_UNIT = 7;
  951. private const int MAX_ATTRIBUTE_UNIT = 10;
  952. private const int DENOMINATOR = 10;
  953. private const string MAID_SKILL_UNIT_PARENT_PATH = "SubWindows/MaidSkillViewer/Contents/MaidSkillUnitParent";
  954. private const string CHARACTER_UNIT_PARENT_PATH = "SubWindows/CharacterViewer/Contents/CharacterUnitParent";
  955. private const string PROPENSITY_UNIT_PARENT_PATH = "SubWindows/PropensityViewer/Contents/CharacterUnitParent";
  956. private const string YOTOGI_SKILL_UNIT_PARENT_PATH = "SubWindows/YotogiSkillViewer/Contents/YotogiSkillUnitParent";
  957. private const string ATTRIBUTE_UNIT_PARENT_PATH = "SubWindows/AttributeViewer/Contents/Attribute/AttributeUnitParent";
  958. private const string EROGENOUS_ZONE_UNIT_PARENT_PATH = "SubWindows/AttributeViewer/Contents/ErogenousZone/ErogenousZoneParent";
  959. private const string PROFILE_LABEL_UNIT_PREFAB_PATH = "SceneEdit/Profile/Prefab/ProfileLabelUnit";
  960. private const string PROFILE_YOTOGI_SKILL_UNIT_PREFAB_PATH = "SceneEdit/Profile/Prefab/YotogiSkillUnit";
  961. private const string PROFILE_ATTRIBUTE_UNIT_PREFAB_PATH = "SceneEdit/Profile/Prefab/AttributeUnit";
  962. private const string PROFILE_EROGENOUS_ZONE_UNIT_PREFAB_PATH = "SceneEdit/Profile/Prefab/ErogenousZoneUnit";
  963. private float initMaidPointUIPosX;
  964. public enum LevelOfAchievement
  965. {
  966. level_1,
  967. level_2,
  968. level_3,
  969. level_4
  970. }
  971. private class UpperButton
  972. {
  973. public ProfileMgr.UpperButtonType m_name;
  974. public GameObject m_goSelectCursor;
  975. public UIButton m_btnButton;
  976. }
  977. public class ProfileLabelUnit
  978. {
  979. public string m_id;
  980. public string m_parameter;
  981. }
  982. public class ProfileYotogiSkillUnit
  983. {
  984. public string m_id;
  985. public string m_number;
  986. public string m_skillName;
  987. public ProfileCtrl.LevelOfAchievement m_levelOfAchievement;
  988. }
  989. public class ProfileAttribute
  990. {
  991. public ProfileAttribute()
  992. {
  993. this.m_listAttributeUnitName = new List<string>();
  994. }
  995. public List<string> m_listAttributeUnitName;
  996. }
  997. public class ErogenousZoneUnit
  998. {
  999. public string m_category;
  1000. public int m_PercentNumber;
  1001. }
  1002. }