ScriptManager.cs 98 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Runtime.CompilerServices;
  5. using System.Text;
  6. using Kasizuki;
  7. using MaidStatus;
  8. using MaidStatus.CsvData;
  9. using MaidStatus.Old;
  10. using PlayerStatus;
  11. using Schedule;
  12. using UnityEngine;
  13. using wf;
  14. public class ScriptManager : IDisposable
  15. {
  16. public static string ReplaceCharaName(string text)
  17. {
  18. if (string.IsNullOrEmpty(text))
  19. {
  20. return text;
  21. }
  22. string[] array = new string[]
  23. {
  24. "[HF]",
  25. "[HF1]",
  26. "[HF2]",
  27. "[HF3]",
  28. "[HF4]"
  29. };
  30. string[] array2 = new string[]
  31. {
  32. "[HL]",
  33. "[HL1]",
  34. "[HL2]",
  35. "[HL3]",
  36. "[HL4]"
  37. };
  38. string[] array3 = new string[]
  39. {
  40. "[HLF]",
  41. "[HLF1]",
  42. "[HLF2]",
  43. "[HLF3]",
  44. "[HLF4]"
  45. };
  46. for (int i = 0; i < array.Length; i++)
  47. {
  48. for (int j = 0; j < 2; j++)
  49. {
  50. string text2 = (j != 0) ? "[HF]" : "[hf]";
  51. string text3 = (j != 0) ? array[i].ToUpper() : array[i].ToLower();
  52. if (0 <= text.IndexOf(text3))
  53. {
  54. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(i);
  55. if (maid != null)
  56. {
  57. if (text3 != text2)
  58. {
  59. text = text.Replace(text3, text2);
  60. }
  61. text = text.Replace(text2, (!maid.status.isFirstNameCall) ? maid.status.lastName : maid.status.firstName);
  62. }
  63. }
  64. text2 = ((j != 0) ? "[HL]" : "[hl]");
  65. text3 = ((j != 0) ? array2[i].ToUpper() : array2[i].ToLower());
  66. if (0 <= text.IndexOf(text3))
  67. {
  68. Maid maid2 = GameMain.Instance.CharacterMgr.GetMaid(i);
  69. if (maid2 != null)
  70. {
  71. if (text3 != text2)
  72. {
  73. text = text.Replace(text3, text2);
  74. }
  75. text = text.Replace(text2, maid2.status.lastName);
  76. }
  77. }
  78. text2 = ((j != 0) ? "[HLF]" : "[hlf]");
  79. text3 = ((j != 0) ? array3[i].ToUpper() : array3[i].ToLower());
  80. if (0 <= text.IndexOf(text3))
  81. {
  82. Maid maid3 = GameMain.Instance.CharacterMgr.GetMaid(i);
  83. if (maid3 != null)
  84. {
  85. if (text3 != text2)
  86. {
  87. text = text.Replace(text3, text2);
  88. }
  89. text = text.Replace(text2, maid3.status.fullNameJpStyle);
  90. }
  91. }
  92. }
  93. }
  94. if (0 <= text.IndexOf("[SF]"))
  95. {
  96. text = text.Replace("[SF]", GameMain.Instance.CharacterMgr.status.playerName);
  97. }
  98. if (0 <= text.IndexOf("[sf]"))
  99. {
  100. text = text.Replace("[sf]", GameMain.Instance.CharacterMgr.status.playerName);
  101. }
  102. return text;
  103. }
  104. public static string ReplaceCharaName(Maid maid, string text)
  105. {
  106. if (text == null)
  107. {
  108. return string.Empty;
  109. }
  110. if (maid == null)
  111. {
  112. maid = GameMain.Instance.CharacterMgr.GetMaid(0);
  113. }
  114. if (maid == null)
  115. {
  116. return text;
  117. }
  118. if (0 <= text.IndexOf("[HF]"))
  119. {
  120. if (maid.status.isFirstNameCall)
  121. {
  122. text = text.Replace("[HF]", maid.status.firstName);
  123. }
  124. else
  125. {
  126. text = text.Replace("[HF]", maid.status.lastName);
  127. }
  128. }
  129. if (0 <= text.IndexOf("[HL]"))
  130. {
  131. text = text.Replace("[HL]", maid.status.lastName);
  132. }
  133. if (0 <= text.IndexOf("[SF]"))
  134. {
  135. text = text.Replace("[SF]", GameMain.Instance.CharacterMgr.status.playerName);
  136. }
  137. return text;
  138. }
  139. public static string ReplacePersonal(Maid maid, string text)
  140. {
  141. return ScriptManager.ReplacePersonal(new Maid[]
  142. {
  143. maid
  144. }, text);
  145. }
  146. public static string ReplacePersonal(Maid[] maid_array, string text)
  147. {
  148. if (string.IsNullOrEmpty(text))
  149. {
  150. return string.Empty;
  151. }
  152. Maid maid = null;
  153. string oldValue = string.Empty;
  154. if (0 <= text.IndexOf("?4"))
  155. {
  156. maid = maid_array[4];
  157. oldValue = "?4";
  158. }
  159. else if (0 <= text.IndexOf("?3"))
  160. {
  161. maid = maid_array[3];
  162. oldValue = "?3";
  163. }
  164. else if (0 <= text.IndexOf("?2"))
  165. {
  166. maid = maid_array[2];
  167. oldValue = "?2";
  168. }
  169. else if (0 <= text.IndexOf("?1"))
  170. {
  171. maid = maid_array[1];
  172. oldValue = "?1";
  173. }
  174. else if (0 <= text.IndexOf("?0"))
  175. {
  176. maid = maid_array[0];
  177. oldValue = "?0";
  178. }
  179. else if (0 <= text.IndexOf("?"))
  180. {
  181. maid = maid_array[0];
  182. oldValue = "?";
  183. }
  184. if (maid == null)
  185. {
  186. return text;
  187. }
  188. if (maid.status.subCharaData == null)
  189. {
  190. text = text.Replace(oldValue, maid.status.personal.replaceText);
  191. }
  192. else
  193. {
  194. text = text.Replace(oldValue, maid.status.subCharaData.replaceText);
  195. }
  196. return text;
  197. }
  198. public void Initialize()
  199. {
  200. this.is_motion_blend = true;
  201. GameObject gameObject = GameObject.Find("SystemUI Root/Manager_SystemUI/MessageWindowMgr");
  202. NDebug.Assert(gameObject != null, "MessageWindowMgrが見つかりません");
  203. this.message_mgr_ = gameObject.GetComponent<MessageWindowMgr>();
  204. NDebug.Assert(this.message_mgr_ != null, "コンポーネント:MessageWindowMgrが見つかりません");
  205. this.tjs_ = TJSScript.Create(this.file_system);
  206. this.tjs_.AddFunction("GetMaidMPN", new TJSScript.FunctionCallBack(this.TJSFuncGetMaidMPN));
  207. this.tjs_.AddFunction("GetMenuFileNameFromMaidMPN", new TJSScript.FunctionCallBack(this.TJSFuncGetMenuFileNameFromMaidMPN));
  208. this.tjs_.AddFunction("SetMaidFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetMaidFlag));
  209. this.tjs_.AddFunction("SetManFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetManFlag));
  210. this.tjs_.AddFunction("SetTmpFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetTmpFlag));
  211. this.tjs_.AddFunction("GetMaidFlag", new TJSScript.FunctionCallBack(this.TJSFuncGetMaidFlag));
  212. this.tjs_.AddFunction("GetManFlag", new TJSScript.FunctionCallBack(this.TJSFuncGetManFlag));
  213. this.tjs_.AddFunction("GetTmpFlag", new TJSScript.FunctionCallBack(this.TJSFuncGetTmpFlag));
  214. this.tjs_.AddFunction("SetSystemFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetSystemFlag));
  215. this.tjs_.AddFunction("GetSystemFlag", new TJSScript.FunctionCallBack(this.TJSFuncGetSystemFlag));
  216. this.tjs_.AddFunction("GetMaidStatus", new TJSScript.FunctionCallBack(this.TJSFuncGetMaidStatus));
  217. this.tjs_.AddFunction("SetMainCharaFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetMainCharaFlag));
  218. this.tjs_.AddFunction("IsSeikantai", new TJSScript.FunctionCallBack(this.OldTJSFuncConIsSeikantai));
  219. this.tjs_.AddFunction("CreateNewMaid", new TJSScript.FunctionCallBack(this.TJSFuncCreateNewMaid));
  220. this.tjs_.AddFunction("PresetLoad", new TJSScript.FunctionCallBack(this.TJSFuncPresetLoad));
  221. this.tjs_.AddFunction("PresetLoadNPC", new TJSScript.FunctionCallBack(this.TJSFuncPresetLoadNPC));
  222. this.tjs_.AddFunction("AddMaidStatus", new TJSScript.FunctionCallBack(this.TJSFuncAddMaidStatus));
  223. this.tjs_.AddFunction("IsMaidFeature", new TJSScript.FunctionCallBack(this.TJSFuncIsMaidFeature));
  224. this.tjs_.AddFunction("IsMaidPropensity", new TJSScript.FunctionCallBack(this.TJSFuncIsMaidPropensity));
  225. this.tjs_.AddFunction("GetYotogiSkillLevel", new TJSScript.FunctionCallBack(this.TJSFuncGetYotogiSkillLevel));
  226. this.tjs_.AddFunction("IsYotogiSkill", new TJSScript.FunctionCallBack(this.TJSFuncIsYotogiSkill));
  227. this.tjs_.AddFunction("GetStockMaidCount", new TJSScript.FunctionCallBack(this.TJSFuncGetStockMaidCount));
  228. this.tjs_.AddFunction("SetSalonGrade", new TJSScript.FunctionCallBack(this.TJSFuncSetSalonGrade));
  229. this.tjs_.AddFunction("GetSalonGrade", new TJSScript.FunctionCallBack(this.TJSFuncGetSalonGrade));
  230. this.tjs_.AddFunction("GetClubEvaluation", new TJSScript.FunctionCallBack(this.TJSFuncGetClubEvaluation));
  231. this.tjs_.AddFunction("SetClubGauge", new TJSScript.FunctionCallBack(this.TJSFuncSetClubGauge));
  232. this.tjs_.AddFunction("GetClubGauge", new TJSScript.FunctionCallBack(this.TJSFuncGetClubGauge));
  233. this.tjs_.AddFunction("GetBGName", new TJSScript.FunctionCallBack(this.TJSFuncGetBGName));
  234. this.tjs_.AddFunction("IsItemParam", new TJSScript.FunctionCallBack(this.TJSFuncIsItemParam));
  235. this.tjs_.AddFunction("IsItemSlot", new TJSScript.FunctionCallBack(this.TJSFuncIsItemSlot));
  236. this.tjs_.AddFunction("IsMaidClass", new TJSScript.FunctionCallBack(this.OldTJSFuncIsMaidClass));
  237. this.tjs_.AddFunction("GetMaidClassLevel", new TJSScript.FunctionCallBack(this.OldTJSFuncGetMaidClassLevel));
  238. this.tjs_.AddFunction("IsJobMaid", new TJSScript.FunctionCallBack(this.TJSFuncIsJobMaid));
  239. this.tjs_.AddFunction("GetJobMaidLevel", new TJSScript.FunctionCallBack(this.TJSFuncGetJobMaidLevel));
  240. this.tjs_.AddFunction("IsYotogiClass", new TJSScript.FunctionCallBack(this.TJSFuncIsYotogiClass));
  241. this.tjs_.AddFunction("GetYotogiClassLevel", new TJSScript.FunctionCallBack(this.TJSFuncGetYotogiClassLevel));
  242. this.tjs_.AddFunction("GetNoonScuccessLevel", new TJSScript.FunctionCallBack(this.TJSFuncGetNoonScuccessLevel));
  243. this.tjs_.AddFunction("IsMaid", new TJSScript.FunctionCallBack(this.TJSFuncIsMaid));
  244. this.tjs_.AddFunction("IsOldPersonal", new TJSScript.FunctionCallBack(this.TJSFuncIsOldPersonal));
  245. this.tjs_.AddFunction("GetSalonLoan", new TJSScript.FunctionCallBack(this.TJSFuncConGetSalonLoan));
  246. this.tjs_.AddFunction("GetPhase", new TJSScript.FunctionCallBack(this.TJSFuncConGetPhase));
  247. this.tjs_.AddFunction("GetDay", new TJSScript.FunctionCallBack(this.TJSFuncGetDay));
  248. this.tjs_.AddFunction("CreateStockMaidLoopData", new TJSScript.FunctionCallBack(this.TJSFuncCreateStockMaidLoopData));
  249. this.tjs_.AddFunction("CreateCompetitiveShowLoopData", new TJSScript.FunctionCallBack(this.TJSFuncCreateCompetitiveShowLoopData));
  250. this.tjs_.AddFunction("GetCompetitiveShowLoopCount", new TJSScript.FunctionCallBack(this.TJSFuncGetCompetitiveShowLoopCount));
  251. this.tjs_.AddFunction("SetActiveSlotFromStockMaidLoopData", new TJSScript.FunctionCallBack(this.TJSFuncSetActiveSlotFromStockMaidLoopData));
  252. this.tjs_.AddFunction("SetMaidCondition", new TJSScript.FunctionCallBack(this.TJSFuncSetMaidCondition));
  253. this.tjs_.AddFunction("SetSeikeikenFront", new TJSScript.FunctionCallBack(this.TJSFuncSetSeikeikenFront));
  254. this.tjs_.AddFunction("SetSeikeikenBack", new TJSScript.FunctionCallBack(this.TJSFuncSetSeikeikenBack));
  255. this.tjs_.AddFunction("SetInitSeikeiken", new TJSScript.FunctionCallBack(this.TJSFuncSetInitSeikeiken));
  256. this.tjs_.AddFunction("SetNewItem", new TJSScript.FunctionCallBack(this.TJSFuncSetNewItem));
  257. this.tjs_.AddFunction("IsGameInShopItemPurchased", new TJSScript.FunctionCallBack(this.TJSFuncIsGameInShopItemPurchased));
  258. this.tjs_.AddFunction("SetContractType", new TJSScript.FunctionCallBack(this.TJSFuncSetContractType));
  259. this.tjs_.AddFunction("SetFeature", new TJSScript.FunctionCallBack(this.TJSFuncSetFeature));
  260. this.tjs_.AddFunction("SetPropensity", new TJSScript.FunctionCallBack(this.TJSFuncSetPropensity));
  261. this.tjs_.AddFunction("SetSexualParam", new TJSScript.FunctionCallBack(this.TJSFuncComSetSexualParam));
  262. this.tjs_.AddFunction("SetNewTrophy", new TJSScript.FunctionCallBack(this.TJSFuncSetNewTrophy));
  263. this.tjs_.AddFunction("CheckTrophyContractType", new TJSScript.FunctionCallBack(this.TJSFuncCheckTrophyContractType));
  264. this.tjs_.AddFunction("SetYotogiSelectStageName", new TJSScript.FunctionCallBack(this.TJSFuncSetYotogiSelectStageName));
  265. this.tjs_.AddFunction("GetYotogiSelectStageName", new TJSScript.FunctionCallBack(this.TJSFuncGetYotogiSelectStageName));
  266. this.tjs_.AddFunction("ClearCallStack", new TJSScript.FunctionCallBack(this.TJSFuncClearCallStack));
  267. this.tjs_.AddFunction("IsCommunicationChara", new TJSScript.FunctionCallBack(this.OldTJSFuncIsCommunicationChara));
  268. this.tjs_.AddFunction("SetCommunicationChara", new TJSScript.FunctionCallBack(this.TJSFuncSetCommunicationChara));
  269. this.tjs_.AddFunction("SetRandomCommuChara", new TJSScript.FunctionCallBack(this.TJSFuncSetRandomCommuChara));
  270. this.tjs_.AddFunction("CreateYotogiCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateYotogiCharaList));
  271. this.tjs_.AddFunction("CreateNewYotogiCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateNewYotogiCharaList));
  272. this.tjs_.AddFunction("CreateNewYotogiHaremPairCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateNewYotogiHaremPairCharaList));
  273. this.tjs_.AddFunction("CreateVipCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateVipCharaList));
  274. this.tjs_.AddFunction("CreateFacilityCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateFacilityCharaList));
  275. this.tjs_.AddFunction("CreateLifeModeCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateLifeModeCharaList));
  276. this.tjs_.AddFunction("IsReceptionChara", new TJSScript.FunctionCallBack(this.TJSFuncIsReceptionChara));
  277. this.tjs_.AddFunction("SetRandomReceptionChara", new TJSScript.FunctionCallBack(this.TJSFuncSetRandomReceptionChara));
  278. this.tjs_.AddFunction("IsSelectChara", new TJSScript.FunctionCallBack(this.TJSFuncIsSelectChara));
  279. this.tjs_.AddFunction("GetDateYear", new TJSScript.FunctionCallBack(this.TJSFuncGetDateYear));
  280. this.tjs_.AddFunction("GetDateMonth", new TJSScript.FunctionCallBack(this.TJSFuncGetDateMonth));
  281. this.tjs_.AddFunction("GetDateDay", new TJSScript.FunctionCallBack(this.TJSFuncGetDateDay));
  282. this.tjs_.AddFunction("UpdateMaidRanking", new TJSScript.FunctionCallBack(this.TJSFuncUpdateMaidRanking));
  283. this.tjs_.AddFunction("ResetMaidRanking", new TJSScript.FunctionCallBack(this.TJSFuncResetMaidRanking));
  284. this.tjs_.AddFunction("SetMaidRanking1st", new TJSScript.FunctionCallBack(this.TJSFuncSetMaidRanking1st));
  285. this.tjs_.AddFunction("IsAvailableRanking", new TJSScript.FunctionCallBack(this.TJSFuncIsAvailableRanking));
  286. this.tjs_.AddFunction("IsMVPEvent", new TJSScript.FunctionCallBack(this.TJSFuncIsMVPEvent));
  287. this.tjs_.AddFunction("IsYotogiSubCharaSelect", new TJSScript.FunctionCallBack(this.TJSFuncIsYotogiSubCharaSelect));
  288. this.tjs_.AddFunction("GetYotogiSkillSpecialType", new TJSScript.FunctionCallBack(this.TJSFuncGetYotogiSkillSpecialType));
  289. this.tjs_.AddFunction("IsSelectedYotogiSkill", new TJSScript.FunctionCallBack(this.TJSFuncIsSelectedYotogiSkill));
  290. this.tjs_.AddFunction("IsExistentFile", new TJSScript.FunctionCallBack(this.TJSFuncIsExistentFile));
  291. this.tjs_.AddFunction("IsExistentFileLegacy", new TJSScript.FunctionCallBack(this.TJSFuncIsExistentFileLegacy));
  292. this.tjs_.AddFunction("CheckClearVIP", new TJSScript.FunctionCallBack(this.TJSFuncCheckClearVIP));
  293. this.tjs_.AddFunction("IsCBLVersion", new TJSScript.FunctionCallBack(this.TJSFuncIsCBLVersion));
  294. this.tjs_.AddFunction("GetRentalNPCName", new TJSScript.FunctionCallBack(this.OldTJSFuncGetRentalNPCName));
  295. this.tjs_.AddFunction("IsMarriage", new TJSScript.FunctionCallBack(this.OldTJSFuncIsMarriage));
  296. this.tjs_.AddFunction("IsNewWifeFlag", new TJSScript.FunctionCallBack(this.OldTJSFuncIsNewWifeFlag));
  297. this.tjs_.AddFunction("IsPluginPack", new TJSScript.FunctionCallBack(this.TJSFuncIsPluginPack));
  298. this.tjs_.AddFunction("AddShopLineup", new TJSScript.FunctionCallBack(this.TJSFuncAddShopLineup));
  299. this.tjs_.AddFunction("SetEventItemFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetEventItemFlag));
  300. this.tjs_.AddFunction("IsEventItemFlag", new TJSScript.FunctionCallBack(this.TJSFuncIsEventItemFlag));
  301. this.tjs_.AddFunction("GetVRMode", new TJSScript.FunctionCallBack(this.TJSFuncGetVRMode));
  302. this.tjs_.AddFunction("IsVRMode", new TJSScript.FunctionCallBack(this.TJSFuncIsVRMode));
  303. this.tjs_.AddFunction("SetDanceData", new TJSScript.FunctionCallBack(this.TJSFuncSetDanceData));
  304. this.tjs_.AddFunction("GetEventAdded", new TJSScript.FunctionCallBack(this.TJSFuncGetEventAdded));
  305. this.tjs_.AddFunction("GetLockNTRPlayFlag", new TJSScript.FunctionCallBack(this.TJSFuncGetLockNTRPlayFlag));
  306. this.tjs_.AddFunction("GetLockUserDraftMaid", new TJSScript.FunctionCallBack(this.TJSFuncGetLockUserDraftMaid));
  307. this.tjs_.AddFunction("IsComPlayer", new TJSScript.FunctionCallBack(this.TJSFuncIsComPlayer));
  308. this.tjs_.AddFunction("SetPlayerMoney", new TJSScript.FunctionCallBack(this.TJSFuncSetPlayerMoney));
  309. this.tjs_.AddFunction("GetPlayerMoney", new TJSScript.FunctionCallBack(this.TJSFuncGetPlayerMoney));
  310. this.tjs_.AddFunction("SetMaidLeader", new TJSScript.FunctionCallBack(this.TJSFuncSetMaidLeader));
  311. this.tjs_.AddFunction("SetMaidCostumeFacility", new TJSScript.FunctionCallBack(this.TJSFuncSetMaidCostumeFacility));
  312. this.tjs_.AddFunction("ResetMaidCostumeFacility", new TJSScript.FunctionCallBack(this.TJSFuncResetMaidCostumeFacility));
  313. this.tjs_.AddFunction("CallTitleBar", new TJSScript.FunctionCallBack(this.TJSFuncCallTitleBar));
  314. this.tjs_.AddFunction("SetCompatibilityMode", new TJSScript.FunctionCallBack(this.TJSFuncSetCompatibilityMode));
  315. this.tjs.AddFunction("IsBuildingFacility", new TJSScript.FunctionCallBack(this.TJSFuncIsBuildingFacility));
  316. this.tjs.AddFunction("IsBuildingFacilityUpward", new TJSScript.FunctionCallBack(this.TJSFuncIsBuildingFacilityUpward));
  317. this.tjs.AddFunction("CheckDanceType", new TJSScript.FunctionCallBack(this.TJSCheckDanceType));
  318. this.tjs.AddFunction("SetMusicRelease", new TJSScript.FunctionCallBack(this.TJSSetMusicRelease));
  319. this.tjs.AddFunction("GetChallengeRank", new TJSScript.FunctionCallBack(this.TJSGetChallengeRank));
  320. this.tjs.AddFunction("SetVsSetting", new TJSScript.FunctionCallBack(this.TJSSetVsSetting));
  321. this.tjs.AddFunction("NeedDanceResult", new TJSScript.FunctionCallBack(this.TJSNeedDanceResult));
  322. this.tjs.AddFunction("BjDayFirst", new TJSScript.FunctionCallBack(this.TJSBjDayFirst));
  323. this.tjs.AddFunction("CasinoShopBuy", new TJSScript.FunctionCallBack(this.TJSCasinoShopBuy));
  324. this.tjs.AddFunction("SetEventEndFlag", new TJSScript.FunctionCallBack(this.TJSSetEventEndFlag));
  325. this.tjs_.AddFunction("IsKasizukiGuest", new TJSScript.FunctionCallBack(this.TJSFuncIsKasizukiGuest));
  326. this.tjs_.AddFunction("GetKasizukiSelectRoomName", new TJSScript.FunctionCallBack(this.TJSFuncGetKasizukiSelectRoomName));
  327. this.tjs_.AddFunction("GetKasizukiMaidLikability", new TJSScript.FunctionCallBack(this.TJSFuncGetKasizukiMaidLikability));
  328. this.tjs_.AddFunction("GetKasizukiMaidLikabilityName", new TJSScript.FunctionCallBack(this.TJSFuncGetKasizukiMaidLikabilityName));
  329. this.tjs_.AddFunction("GetKasizukiMaidWorkCount", new TJSScript.FunctionCallBack(this.TJSFuncGetKasizukiMaidWorkCount));
  330. this.tjs_.AddFunction("GetKasizukiMaidWorkCountName", new TJSScript.FunctionCallBack(this.TJSFuncGetKasizukiMaidWorkCountName));
  331. this.tjs_.AddFunction("GetKasizukiSystemFlag", new TJSScript.FunctionCallBack(this.TJSFuncGetKasizukiSystemFlag));
  332. this.tjs_.AddFunction("SetKasizukiSystemFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetKasizukiSystemFlag));
  333. this.tjs_.AddFunction("AddKasizukiSystemFlag", new TJSScript.FunctionCallBack(this.TJSFuncAddKasizukiSystemFlag));
  334. this.tjs_.AddFunction("SetKasizukiPassFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetKasizukiPassFlag));
  335. this.tjs_.AddFunction("GetKasizukiMaidFlag", new TJSScript.FunctionCallBack(this.TJSFuncGetKasizukiMaidFlag));
  336. this.tjs_.AddFunction("SetKasizukiMaidFlag", new TJSScript.FunctionCallBack(this.TJSFuncSetKasizukiMaidFlag));
  337. this.tjs_.AddFunction("IsKasizukiCorrectSenarioFlag", new TJSScript.FunctionCallBack(this.TJSFuncIsKasizukiCorrectSenarioFlag));
  338. this.tjs_.AddFunction("IsVRKaraokeMode", new TJSScript.FunctionCallBack(this.TJSFuncIsVRKaraokeMode));
  339. this.tjs_.AddFunction("GetRemainingDanceTime", new TJSScript.FunctionCallBack(this.TJSFuncGetRemainingDanceTime));
  340. this.tjs.AddFunction("GetYotogiCommandClickCount", new TJSScript.FunctionCallBack(this.TJSFuncGetYotogiCommandClickCount));
  341. this.tjs.AddFunction("SetYotogiStage", new TJSScript.FunctionCallBack(this.TJSFuncSetYotogiStage));
  342. this.tjs_.AddFunction("GetGameMode", new TJSScript.FunctionCallBack(this.TJSFuncGetGameMode));
  343. this.tjs_.AddFunction("IsLifeMode", new TJSScript.FunctionCallBack(this.TJSFuncIsLifeMode));
  344. MotionKagManager motionKagManager = new MotionKagManager(this.tjs_, this);
  345. motionKagManager.Initialize();
  346. motionKagManager.SetSloatNo(0);
  347. this.kag_mot_dic_.Add(0, motionKagManager);
  348. this.adv_kag_ = new ADVKagManager(this.tjs_, this, this.message_mgr_);
  349. this.adv_kag_.Initialize();
  350. this.adv_kag_.kag.SetOnReturnFunction(new KagScript.OnReturnCallBack(this.OnReturnEvent));
  351. this.adv_kag_.kag.SetOnRReturnFunction(new KagScript.OnScenarioLoadCallBack(this.OnRReturnEvent));
  352. this.yotogi_kag_ = new YotogiKagManager(this.tjs_, this);
  353. this.yotogi_kag_.Initialize();
  354. this.tmp_kag_ = new BaseKagManager(this.tjs_, this);
  355. this.tmp_kag_.Initialize();
  356. using (AFileBase afileBase = this.file_system.FileOpen("startup.tjs"))
  357. {
  358. this.tjs_.ExecScript(afileBase);
  359. }
  360. }
  361. ~ScriptManager()
  362. {
  363. this.Dispose(false);
  364. }
  365. public void ClearCallStack()
  366. {
  367. foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
  368. {
  369. keyValuePair.Value.kag.ClearCallStack();
  370. }
  371. this.adv_kag_.kag.ClearCallStack();
  372. this.yotogi_kag_.kag.ClearCallStack();
  373. this.tmp_kag_.kag.ClearCallStack();
  374. }
  375. public void Update()
  376. {
  377. foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
  378. {
  379. keyValuePair.Value.Update();
  380. }
  381. this.adv_kag_.Update();
  382. this.yotogi_kag_.Update();
  383. this.tmp_kag_.Update();
  384. }
  385. public void ExecScript(string exec_str, ref TJSVariant result)
  386. {
  387. this.tjs_.ExecScript(exec_str, ref result);
  388. }
  389. public void ExecScript(string exec_str)
  390. {
  391. this.tjs_.ExecScript(exec_str);
  392. }
  393. public void ExecScriptFile(string file_name, ref TJSVariant result)
  394. {
  395. using (AFileBase afileBase = this.file_system.FileOpen(file_name))
  396. {
  397. NDebug.Assert(afileBase.IsValid(), "not found file.\n" + file_name);
  398. this.tjs_.ExecScript(afileBase, ref result);
  399. }
  400. }
  401. public void ExecScriptFile(string file_name)
  402. {
  403. using (AFileBase afileBase = this.file_system.FileOpen(file_name))
  404. {
  405. NDebug.Assert(afileBase.IsValid(), "not found file.\n" + file_name);
  406. this.tjs_.ExecScript(afileBase);
  407. }
  408. }
  409. public void EvalScript(string eval_str, TJSVariant result)
  410. {
  411. this.tjs_.EvalScript(eval_str, result);
  412. }
  413. public void EvalScript(string eval_str)
  414. {
  415. this.tjs_.EvalScript(eval_str);
  416. }
  417. public void EvalScriptFile(string file_name, TJSVariant result)
  418. {
  419. using (AFileBase afileBase = this.file_system.FileOpen(file_name))
  420. {
  421. NDebug.Assert(afileBase.IsValid(), "not found file.\n" + file_name);
  422. this.tjs_.EvalScript(afileBase, result);
  423. }
  424. }
  425. public void EvalScriptFile(string file_name)
  426. {
  427. using (AFileBase afileBase = this.file_system.FileOpen(file_name))
  428. {
  429. NDebug.Assert(afileBase.IsValid(), "not found file.\n" + file_name);
  430. this.tjs_.EvalScript(afileBase);
  431. }
  432. }
  433. public void LoadAdvScenarioScript(string file_name, string label_name = "")
  434. {
  435. this.adv_kag_.enabled = true;
  436. this.adv_kag_.LoadScriptFile(file_name, label_name);
  437. }
  438. public void LoadYotogiScript(string file_name, string label_name = "")
  439. {
  440. this.yotogi_kag_.enabled = true;
  441. this.yotogi_kag_.LoadScriptFile(file_name, string.Empty);
  442. this.yotogi_kag_.Exec();
  443. }
  444. public void LoadTempScript(string file_name, string label_name = "")
  445. {
  446. this.tmp_kag_.enabled = true;
  447. this.tmp_kag_.LoadScriptFile(file_name, label_name);
  448. }
  449. public void LoadMotionScript(int sloat, bool is_next, string file_name, string label_name = "", string maid_guid = "", string man_guid = "", bool face_fix = false, bool valid_pos = true)
  450. {
  451. if (!string.IsNullOrEmpty(maid_guid))
  452. {
  453. Maid x = null;
  454. for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
  455. {
  456. Maid maid3 = GameMain.Instance.CharacterMgr.GetMaid(i);
  457. if (maid3 != null && maid3.status.guid == maid_guid)
  458. {
  459. x = maid3;
  460. break;
  461. }
  462. }
  463. if (x == null)
  464. {
  465. return;
  466. }
  467. }
  468. if (!string.IsNullOrEmpty(man_guid))
  469. {
  470. Maid x2 = null;
  471. for (int j = 0; j < GameMain.Instance.CharacterMgr.GetManCount(); j++)
  472. {
  473. Maid man = GameMain.Instance.CharacterMgr.GetMan(j);
  474. if (man != null && man.status.guid == man_guid)
  475. {
  476. x2 = man;
  477. break;
  478. }
  479. }
  480. if (x2 == null)
  481. {
  482. return;
  483. }
  484. }
  485. this.is_motion_all_prop_seq = false;
  486. this.motion_all_prop_seq_maid = null;
  487. MotionKagManager motionKagManager2;
  488. if (!this.kag_mot_dic_.ContainsKey(sloat))
  489. {
  490. MotionKagManager motionKagManager = new MotionKagManager(this.tjs_, this);
  491. motionKagManager.Initialize();
  492. motionKagManager.SetSloatNo(sloat);
  493. motionKagManager.kag.SetFileSystem(this.file_system);
  494. this.kag_mot_dic_.Add(sloat, motionKagManager);
  495. motionKagManager2 = motionKagManager;
  496. }
  497. else
  498. {
  499. motionKagManager2 = this.kag_mot_dic_[sloat];
  500. }
  501. Maid mainMaid = motionKagManager2.SetMainMaid(maid_guid);
  502. Maid maid2 = motionKagManager2.SetMainMan(man_guid);
  503. if (mainMaid == null && maid2 != null)
  504. {
  505. mainMaid = maid2;
  506. }
  507. motionKagManager2.valid_pos = valid_pos;
  508. motionKagManager2.enabled = true;
  509. motionKagManager2.ExecForcWaitEvent();
  510. motionKagManager2.LoadScriptFile(file_name, label_name);
  511. motionKagManager2.SetNextMotion(is_next);
  512. motionKagManager2.SetFaceFix(face_fix);
  513. Vector3 b = Vector3.zero;
  514. if (mainMaid != null)
  515. {
  516. b = mainMaid.transform.position;
  517. }
  518. motionKagManager2.Exec();
  519. if (mainMaid != null && motionKagManager2.maidOffsetSetList.Find((Maid maid) => maid == mainMaid) != null)
  520. {
  521. Vector3 b2 = mainMaid.transform.position - b;
  522. Quaternion rotation = mainMaid.transform.rotation;
  523. for (int k = 0; k < motionKagManager2.maidOffsetSetList.Count; k++)
  524. {
  525. motionKagManager2.maidOffsetSetList[k].transform.rotation = rotation;
  526. motionKagManager2.maidOffsetSetList[k].transform.position -= b2;
  527. }
  528. }
  529. }
  530. public void StopMotionScript()
  531. {
  532. this.ClearForcExecWaitEvent();
  533. foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
  534. {
  535. keyValuePair.Value.ClearMotion();
  536. keyValuePair.Value.enabled = false;
  537. }
  538. }
  539. public void ClearForcExecWaitEvent()
  540. {
  541. foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
  542. {
  543. keyValuePair.Value.ClearForcExecWaitEvent();
  544. }
  545. }
  546. private void TJSFuncGetMaidMPN(TJSVariantRef[] param, TJSVariantRef result)
  547. {
  548. NDebug.Assert(2 == param.Length, "GetMaidMPN args count error.");
  549. if (result == null)
  550. {
  551. return;
  552. }
  553. TJSVariantRef.Type[] array = new TJSVariantRef.Type[]
  554. {
  555. TJSVariantRef.Type.tvtInteger,
  556. TJSVariantRef.Type.tvtString
  557. };
  558. for (int i = 0; i < param.Length; i++)
  559. {
  560. NDebug.Assert(param[i].type == array[i], "TJSFuncGetMaidProp args[" + i + "] type error.");
  561. }
  562. int nMaidNo = param[0].AsInteger();
  563. string text = param[1].AsString();
  564. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  565. MPN mpn = (MPN)Enum.Parse(typeof(MPN), text);
  566. MaidProp prop = maid.GetProp(mpn);
  567. NDebug.Assert(prop != null, "[" + text + "] 指定MPNが不正です。");
  568. if (prop.type == 3)
  569. {
  570. result.SetString(prop.name);
  571. }
  572. else
  573. {
  574. result.SetInteger(prop.value);
  575. }
  576. }
  577. private void TJSFuncGetMenuFileNameFromMaidMPN(TJSVariantRef[] param, TJSVariantRef result)
  578. {
  579. NDebug.Assert(2 == param.Length, "GetMenuFileNameFromMaidMPN args count error.");
  580. if (result == null)
  581. {
  582. return;
  583. }
  584. TJSVariantRef.Type[] array = new TJSVariantRef.Type[]
  585. {
  586. TJSVariantRef.Type.tvtInteger,
  587. TJSVariantRef.Type.tvtString
  588. };
  589. for (int i = 0; i < param.Length; i++)
  590. {
  591. NDebug.Assert(param[i].type == array[i], "TJSFuncGetMaidProp args[" + i + "] type error.");
  592. }
  593. int nMaidNo = param[0].AsInteger();
  594. string text = param[1].AsString();
  595. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  596. MPN mpn = (MPN)Enum.Parse(typeof(MPN), text);
  597. MaidProp prop = maid.GetProp(mpn);
  598. NDebug.Assert(prop != null, "[" + text + "] 指定MPNが不正です。");
  599. if (prop.type == 3)
  600. {
  601. result.SetString(prop.strFileName.ToLower());
  602. }
  603. else
  604. {
  605. result.SetString(string.Empty);
  606. }
  607. }
  608. private void TJSFuncSetMaidFlag(TJSVariantRef[] param, TJSVariantRef result)
  609. {
  610. NDebug.Assert(param.Length == 2 || 3 == param.Length, "SetMaidFlag args count error.");
  611. int nMaidNo = 0;
  612. string flagName = string.Empty;
  613. int num;
  614. if (param.Length == 3)
  615. {
  616. nMaidNo = param[0].AsInteger();
  617. flagName = param[1].AsString();
  618. num = param[2].AsInteger();
  619. }
  620. else
  621. {
  622. flagName = param[0].AsString();
  623. num = param[1].AsInteger();
  624. }
  625. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  626. if (this.compatibilityMode || this.tjsLegacyMode)
  627. {
  628. maid.status.OldStatus.SetFlag(flagName, num);
  629. }
  630. else
  631. {
  632. maid.status.SetFlag(flagName, num);
  633. }
  634. if (result != null)
  635. {
  636. result.SetInteger(num);
  637. }
  638. }
  639. private void TJSFuncSetManFlag(TJSVariantRef[] param, TJSVariantRef result)
  640. {
  641. NDebug.Assert(param.Length == 2 || 3 == param.Length, "SetManFlag args count error.");
  642. string flagName = string.Empty;
  643. int value;
  644. if (param.Length == 3)
  645. {
  646. int num = param[0].AsInteger();
  647. flagName = param[1].AsString();
  648. value = param[2].AsInteger();
  649. }
  650. else
  651. {
  652. flagName = param[0].AsString();
  653. value = param[1].AsInteger();
  654. }
  655. if (!this.compatibilityMode)
  656. {
  657. GameMain.Instance.CharacterMgr.status.SetFlag(flagName, value);
  658. }
  659. }
  660. private void TJSFuncSetTmpFlag(TJSVariantRef[] param, TJSVariantRef result)
  661. {
  662. NDebug.Assert(2 == param.Length, "SetTmpFlag args count error.");
  663. string flag_name = string.Empty;
  664. flag_name = param[0].AsString();
  665. int num = param[1].AsInteger();
  666. GameMain.Instance.CMSystem.SetTmpGenericFlag(flag_name, num);
  667. if (result != null)
  668. {
  669. result.SetInteger(num);
  670. }
  671. }
  672. private void TJSFuncGetMaidFlag(TJSVariantRef[] param, TJSVariantRef result)
  673. {
  674. NDebug.Assert(param.Length == 1 || param.Length == 2 || 3 == param.Length, "GetMaidFlag args count error.");
  675. if (result == null)
  676. {
  677. return;
  678. }
  679. int nMaidNo = 0;
  680. string flagName = string.Empty;
  681. bool flag = false;
  682. if (param.Length == 3)
  683. {
  684. nMaidNo = param[0].AsInteger();
  685. flagName = param[1].AsString();
  686. if (param[2].AsBool())
  687. {
  688. flag = true;
  689. }
  690. }
  691. else if (param.Length == 2)
  692. {
  693. nMaidNo = param[0].AsInteger();
  694. flagName = param[1].AsString();
  695. }
  696. else
  697. {
  698. flagName = param[0].AsString();
  699. }
  700. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  701. if ((this.compatibilityMode || this.tjsLegacyMode) && !flag)
  702. {
  703. result.SetInteger(maid.status.OldStatus.GetFlag(flagName));
  704. }
  705. else
  706. {
  707. result.SetInteger(maid.status.GetFlag(flagName));
  708. }
  709. }
  710. private void TJSFuncGetManFlag(TJSVariantRef[] param, TJSVariantRef result)
  711. {
  712. NDebug.Assert(param.Length == 1 || 2 == param.Length, "GetManFlag args count error.");
  713. if (result == null)
  714. {
  715. return;
  716. }
  717. string flagName = string.Empty;
  718. if (param.Length == 2)
  719. {
  720. int num = param[0].AsInteger();
  721. flagName = param[1].AsString();
  722. }
  723. else
  724. {
  725. flagName = param[0].AsString();
  726. }
  727. result.SetInteger(GameMain.Instance.CharacterMgr.status.GetFlag(flagName));
  728. }
  729. private void TJSFuncGetTmpFlag(TJSVariantRef[] param, TJSVariantRef result)
  730. {
  731. NDebug.Assert(1 == param.Length, "GetTmpFlag args count error.");
  732. if (result == null)
  733. {
  734. return;
  735. }
  736. string flag_name = param[0].AsString();
  737. result.SetInteger(GameMain.Instance.CMSystem.GetTmpGenericFlag(flag_name));
  738. }
  739. private void TJSFuncSetSystemFlag(TJSVariantRef[] param, TJSVariantRef result)
  740. {
  741. NDebug.Assert(2 == param.Length, "SetSystemFlag args count error.");
  742. string f_strKey = string.Empty;
  743. f_strKey = param[0].AsString();
  744. int integer = param[1].AsInteger();
  745. GameMain.Instance.CMSystem.SetSystemVers(f_strKey, integer.ToString());
  746. if (result != null)
  747. {
  748. result.SetInteger(integer);
  749. }
  750. }
  751. private void TJSFuncGetSystemFlag(TJSVariantRef[] param, TJSVariantRef result)
  752. {
  753. NDebug.Assert(1 == param.Length, "GetSystemFlag args count error.");
  754. if (result == null)
  755. {
  756. return;
  757. }
  758. string f_strKey = param[0].AsString();
  759. string text = GameMain.Instance.CMSystem.GetSystemVers(f_strKey);
  760. if (string.IsNullOrEmpty(text))
  761. {
  762. text = "0";
  763. }
  764. result.SetInteger(int.Parse(text));
  765. }
  766. private void TJSFuncGetMaidStatus(TJSVariantRef[] tjs_param, TJSVariantRef result)
  767. {
  768. NDebug.Assert(2 == tjs_param.Length, "GetMaidStatus args count error.");
  769. if (result == null)
  770. {
  771. return;
  772. }
  773. int nMaidNo = tjs_param[0].AsInteger();
  774. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  775. MaidStatus.Status status = maid.status;
  776. string a = tjs_param[1].AsString();
  777. bool flag = this.compatibilityMode || this.tjsLegacyMode;
  778. if (flag && a == "状態")
  779. {
  780. a = "旧関係";
  781. }
  782. if (a == "性経験")
  783. {
  784. result.SetString(EnumConvert.GetString(status.seikeiken));
  785. }
  786. else if (a == "初期性経験")
  787. {
  788. result.SetString(EnumConvert.GetString(status.initSeikeiken));
  789. }
  790. else if (a == "性格")
  791. {
  792. result.SetString(status.personal.drawName);
  793. }
  794. else if (a == "契約タイプ")
  795. {
  796. result.SetString(EnumConvert.GetString(status.contract));
  797. }
  798. else if (a == "ヒロインタイプ")
  799. {
  800. result.SetString(EnumConvert.GetString(status.heroineType));
  801. }
  802. else if (a == "サブメイドユニークネーム")
  803. {
  804. if (status.subCharaData != null)
  805. {
  806. result.SetString(status.subCharaData.uniqueName);
  807. }
  808. else
  809. {
  810. result.SetString(string.Empty);
  811. }
  812. }
  813. else if (a == "ジョブメイド")
  814. {
  815. result.SetString(status.selectedJobClass.data.uniqueName);
  816. }
  817. else if (a == "夜伽クラス")
  818. {
  819. if (status.selectedJobClass.data.classType == AbstractClassData.ClassType.New)
  820. {
  821. result.SetString("Debut");
  822. }
  823. else
  824. {
  825. result.SetString(status.selectedYotogiClass.data.drawName);
  826. }
  827. }
  828. else if (a == "関係")
  829. {
  830. result.SetString(EnumConvert.GetString(status.relation));
  831. }
  832. else if (a == "旧関係")
  833. {
  834. if (status.OldStatus != null)
  835. {
  836. result.SetString(EnumConvert.GetString(status.OldStatus.relation));
  837. }
  838. else
  839. {
  840. result.SetString(EnumConvert.GetString(status.relation));
  841. }
  842. }
  843. else if (a == "カップ")
  844. {
  845. result.SetString(status.body.cup);
  846. }
  847. else if (a == "苗字")
  848. {
  849. result.SetString(status.lastName);
  850. }
  851. else if (a == "名前")
  852. {
  853. result.SetString(status.firstName);
  854. }
  855. else if (a == "身長")
  856. {
  857. result.SetInteger(status.body.height);
  858. }
  859. else if (a == "夜伽プレイ回数")
  860. {
  861. result.SetInteger(status.playCountYotogi);
  862. }
  863. else if (a == "接客プレイ回数")
  864. {
  865. result.SetInteger(status.playCountNightWork);
  866. }
  867. else if (a == "興奮値")
  868. {
  869. result.SetInteger(status.currentExcite);
  870. }
  871. else if (a == "好感度")
  872. {
  873. result.SetInteger(status.likability);
  874. if (flag && 300 <= status.likability)
  875. {
  876. result.SetInteger(299);
  877. }
  878. }
  879. else if (a == "習得率")
  880. {
  881. result.SetInteger(status.studyRate);
  882. }
  883. else if (a == "接待")
  884. {
  885. result.SetInteger(status.reception);
  886. }
  887. else if (a == "お世話")
  888. {
  889. result.SetInteger(status.care);
  890. }
  891. else if (a == "可憐")
  892. {
  893. result.SetInteger(status.lovely);
  894. }
  895. else if (a == "淫欲")
  896. {
  897. result.SetInteger(status.inyoku);
  898. }
  899. else if (a == "気品")
  900. {
  901. result.SetInteger(status.elegance);
  902. }
  903. else if (a == "M性")
  904. {
  905. result.SetInteger(status.mvalue);
  906. }
  907. else if (a == "魅惑")
  908. {
  909. result.SetInteger(status.charm);
  910. }
  911. else if (a == "変態")
  912. {
  913. result.SetInteger(status.hentai);
  914. }
  915. else if (a == "奉仕")
  916. {
  917. result.SetInteger(status.housi);
  918. }
  919. else if (a == "料理")
  920. {
  921. result.SetInteger(status.cooking);
  922. }
  923. else if (a == "ボーカル")
  924. {
  925. result.SetInteger(status.vocal);
  926. }
  927. else if (a == "ダンス")
  928. {
  929. result.SetInteger(status.dance);
  930. }
  931. else if (a == "アピール")
  932. {
  933. result.SetInteger(status.appealPoint);
  934. }
  935. else if (a == "指導")
  936. {
  937. result.SetInteger(status.teachRate);
  938. }
  939. else if (a == "経験人数")
  940. {
  941. result.SetInteger(status.sexPlayNumberOfPeople);
  942. }
  943. else if (a == "昼仕事ID")
  944. {
  945. result.SetInteger(status.noonWorkId);
  946. }
  947. else if (a == "夜仕事ID")
  948. {
  949. result.SetInteger(status.nightWorkId);
  950. }
  951. else if (a == "昼仕事レベル")
  952. {
  953. if (!status.workDatas.ContainsKey(status.noonWorkId))
  954. {
  955. result.SetInteger(1);
  956. }
  957. else
  958. {
  959. result.SetInteger(status.workDatas.Get(status.noonWorkId).level);
  960. }
  961. }
  962. else if (a == "夜仕事レベル")
  963. {
  964. if (!status.workDatas.ContainsKey(status.nightWorkId))
  965. {
  966. result.SetInteger(1);
  967. }
  968. else
  969. {
  970. result.SetInteger(status.workDatas.Get(status.nightWorkId).level);
  971. }
  972. }
  973. else if (a == "夜伽クラスレベル")
  974. {
  975. result.SetInteger(status.selectedYotogiClass.level);
  976. }
  977. else if (a == "ジョブメイドレベル")
  978. {
  979. result.SetInteger(status.selectedJobClass.level);
  980. }
  981. else if (flag)
  982. {
  983. if (a == "レンタルメイド")
  984. {
  985. result.SetInteger(0);
  986. }
  987. else if (a == "雇用中")
  988. {
  989. result.SetInteger(1);
  990. }
  991. else if (a == "特殊状態")
  992. {
  993. result.SetString(EnumConvert.GetString(status.OldStatus.condition));
  994. }
  995. else if (a == "欲求不満")
  996. {
  997. result.SetInteger(status.OldStatus.frustration);
  998. }
  999. else if (a == "淫乱ギャップ値")
  1000. {
  1001. result.SetInteger(status.inranGap);
  1002. }
  1003. else if (a == "M性ギャップ値")
  1004. {
  1005. result.SetInteger(status.mValueGap);
  1006. }
  1007. else if (a == "変態ギャップ値")
  1008. {
  1009. result.SetInteger(status.hentaiGap);
  1010. }
  1011. else if (a == "メイドクラス")
  1012. {
  1013. if (status.selectedJobClass.data.classType == AbstractClassData.ClassType.Old)
  1014. {
  1015. result.SetString(status.selectedJobClass.data.drawName);
  1016. }
  1017. else
  1018. {
  1019. result.SetString("ノービスメイド");
  1020. }
  1021. }
  1022. }
  1023. }
  1024. private void TJSFuncSetMainCharaFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1025. {
  1026. NDebug.Assert(2 == tjs_param.Length, "SetMainCharaFlag args count error.");
  1027. int nMaidNo = tjs_param[0].AsInteger();
  1028. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  1029. if (maid == null)
  1030. {
  1031. Debug.LogError("SetMainCharaFlag error\nメイド[" + nMaidNo.ToString() + "]にはメイドはいません");
  1032. }
  1033. else
  1034. {
  1035. maid.status.mainChara = tjs_param[1].AsBool();
  1036. }
  1037. }
  1038. private void OldTJSFuncConIsSeikantai(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1039. {
  1040. NDebug.Assert(this.compatibilityMode || this.tjsLegacyMode, "互換モードではないの、互換モード用関数@IsSeikantaiがよばれました");
  1041. NDebug.Assert(2 == tjs_param.Length, "IsSeikantai args count error.");
  1042. if (result == null)
  1043. {
  1044. return;
  1045. }
  1046. int nMaidNo = tjs_param[0].AsInteger();
  1047. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  1048. MaidStatus.Old.Status oldStatus = maid.status.OldStatus;
  1049. string text = tjs_param[1].AsString();
  1050. int num = 1000;
  1051. if (text == "口")
  1052. {
  1053. result.SetBool(num <= oldStatus.sexual.mouth);
  1054. }
  1055. else if (text == "喉")
  1056. {
  1057. result.SetBool(num <= oldStatus.sexual.throat);
  1058. }
  1059. else if (text == "乳首")
  1060. {
  1061. result.SetBool(num <= oldStatus.sexual.nipple);
  1062. }
  1063. else if (text == "前穴")
  1064. {
  1065. result.SetBool(num <= oldStatus.sexual.front);
  1066. }
  1067. else if (text == "後穴")
  1068. {
  1069. result.SetBool(num <= oldStatus.sexual.back);
  1070. }
  1071. else if (text == "クリ")
  1072. {
  1073. result.SetBool(num <= oldStatus.sexual.curi);
  1074. }
  1075. else
  1076. {
  1077. NDebug.Assert("IsSeikantai error.\n" + text, false);
  1078. }
  1079. }
  1080. private void TJSFuncCreateNewMaid(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1081. {
  1082. NDebug.Assert(1 == tjs_param.Length, "CreateNewMaid args count error.");
  1083. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  1084. Maid maid = null;
  1085. string text = tjs_param[0].AsString();
  1086. if (!MaidStatus.Personal.Contains(text))
  1087. {
  1088. NDebug.Assert(SubMaid.Contains(text), "CreateNewMaidの指定名が間違っています[" + text + "]");
  1089. SubMaid.Data data = SubMaid.GetData(text);
  1090. GameMain.Instance.ScriptMgr.StopMotionScript();
  1091. bool flag = false;
  1092. for (int i = 0; i < GameMain.Instance.CharacterMgr.GetStockMaidCount(); i++)
  1093. {
  1094. Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaid(i);
  1095. if (stockMaid != null && stockMaid.status.heroineType == HeroineType.Sub && stockMaid.status.subCharaData.id == data.id)
  1096. {
  1097. flag = true;
  1098. break;
  1099. }
  1100. }
  1101. if (!flag)
  1102. {
  1103. maid = characterMgr.AddStockMaid();
  1104. data.ApplyStatus(maid.status, characterMgr.status.lockUserDraftMaid);
  1105. data.ApplyPreset(maid, characterMgr.status.lockUserDraftMaid);
  1106. }
  1107. }
  1108. else
  1109. {
  1110. NDebug.Assert(MaidStatus.Personal.IsEnabled(text), "CreateNewMaidで指定された対象名[" + text + "]は有効状態ではありません");
  1111. MaidStatus.Personal.Data data2 = MaidStatus.Personal.GetData(text);
  1112. GameMain.Instance.ScriptMgr.StopMotionScript();
  1113. maid = characterMgr.AddStockMaid();
  1114. maid.status.SetPersonal(data2);
  1115. }
  1116. if (maid != null)
  1117. {
  1118. characterMgr.SetActiveMaid(maid, 0);
  1119. maid.Visible = true;
  1120. maid.AllProcPropSeqStart();
  1121. }
  1122. }
  1123. private void TJSFuncPresetLoad(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1124. {
  1125. NDebug.Assert(2 == tjs_param.Length, "PresetLoad args count error.");
  1126. int nMaidNo = tjs_param[0].AsInteger();
  1127. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  1128. if (maid == null)
  1129. {
  1130. NDebug.Assert("PresetLoad\nmaid null.", false);
  1131. return;
  1132. }
  1133. byte[] array = null;
  1134. string text = tjs_param[1].AsString();
  1135. if (text == "pre_maid_secretary")
  1136. {
  1137. CharacterMgr.Preset f_prest = GameMain.Instance.CharacterMgr.PresetLoadFromResources(text);
  1138. GameMain.Instance.CharacterMgr.PresetSet(maid, f_prest);
  1139. }
  1140. else
  1141. {
  1142. if (this.file_system.IsExistentFile(text + ".preset"))
  1143. {
  1144. using (AFileBase afileBase = GameUty.FileOpen(text + ".preset", null))
  1145. {
  1146. if (afileBase != null && afileBase.IsValid())
  1147. {
  1148. array = afileBase.ReadAll();
  1149. }
  1150. }
  1151. }
  1152. if (array == null)
  1153. {
  1154. NDebug.Assert("PresetLoad\n[" + text + "] file not fund.", false);
  1155. return;
  1156. }
  1157. using (BinaryReader binaryReader = new BinaryReader(new MemoryStream(array), Encoding.UTF8))
  1158. {
  1159. CharacterMgr.Preset f_prest2 = GameMain.Instance.CharacterMgr.PresetLoad(binaryReader, text);
  1160. GameMain.Instance.CharacterMgr.PresetSet(maid, f_prest2);
  1161. }
  1162. array = null;
  1163. }
  1164. }
  1165. private void TJSFuncPresetLoadNPC(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1166. {
  1167. NDebug.Assert("未実装TJS関数[PresetLoadNPC]が呼ばれました", false);
  1168. }
  1169. private void TJSFuncAddMaidStatus(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1170. {
  1171. NDebug.Assert(3 == tjs_param.Length, "AddMaidStatus args count error.");
  1172. int nMaidNo = tjs_param[0].AsInteger();
  1173. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  1174. MaidStatus.Status status = maid.status;
  1175. string a = tjs_param[1].AsString();
  1176. int num = tjs_param[2].AsInteger();
  1177. Action<int> action = null;
  1178. if (a == "夜伽プレイ回数")
  1179. {
  1180. maid.status.playCountNightWork += num;
  1181. }
  1182. else if (a == "接客プレイ回数")
  1183. {
  1184. maid.status.playCountNightWork += num;
  1185. }
  1186. else if (a == "好感度")
  1187. {
  1188. maid.status.likability += num;
  1189. }
  1190. else if (a == "習得率")
  1191. {
  1192. maid.status.studyRate += num;
  1193. }
  1194. else if (a == "接待")
  1195. {
  1196. maid.status.baseReception += num;
  1197. }
  1198. else if (a == "お世話")
  1199. {
  1200. maid.status.baseCare += num;
  1201. }
  1202. else if (a == "可憐")
  1203. {
  1204. maid.status.baseLovely += num;
  1205. }
  1206. else if (a == "気品")
  1207. {
  1208. maid.status.baseElegance += num;
  1209. }
  1210. else if (a == "魅惑")
  1211. {
  1212. maid.status.baseCharm += num;
  1213. }
  1214. else if (a == "淫欲")
  1215. {
  1216. maid.status.baseInyoku += num;
  1217. }
  1218. else if (a == "M性")
  1219. {
  1220. maid.status.baseMvalue += num;
  1221. }
  1222. else if (a == "変態")
  1223. {
  1224. maid.status.baseHentai += num;
  1225. }
  1226. else if (a == "奉仕")
  1227. {
  1228. maid.status.baseHousi += num;
  1229. }
  1230. else if (a == "指導")
  1231. {
  1232. maid.status.baseTeachRate += num;
  1233. }
  1234. else if (a == "経験人数")
  1235. {
  1236. maid.status.sexPlayNumberOfPeople += num;
  1237. }
  1238. if (action != null)
  1239. {
  1240. action(num);
  1241. }
  1242. }
  1243. private void TJSFuncIsMaidFeature(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1244. {
  1245. NDebug.Assert(2 == tjs_param.Length, "IsMaidFeature args count error.");
  1246. if (result == null)
  1247. {
  1248. return;
  1249. }
  1250. int nMaidNo = tjs_param[0].AsInteger();
  1251. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  1252. MaidStatus.Status status = maid.status;
  1253. string uniqueName = tjs_param[1].AsString();
  1254. Feature.Data data = Feature.GetData(uniqueName);
  1255. result.SetInteger(Convert.ToInt32(status.features.ContainsKey(data.id)));
  1256. }
  1257. private void TJSFuncIsMaidPropensity(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1258. {
  1259. NDebug.Assert(2 == tjs_param.Length, "IsMaidPropensity args count error.");
  1260. if (result == null)
  1261. {
  1262. return;
  1263. }
  1264. int nMaidNo = tjs_param[0].AsInteger();
  1265. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  1266. MaidStatus.Status status = maid.status;
  1267. string uniqueName = tjs_param[1].AsString();
  1268. Propensity.Data data = Propensity.GetData(uniqueName);
  1269. result.SetInteger(Convert.ToInt32(status.propensitys.ContainsKey(data.id)));
  1270. }
  1271. private void TJSFuncGetYotogiSkillLevel(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1272. {
  1273. NDebug.Assert(2 == tjs_param.Length, "GetYotogiSkillLevel args count error.");
  1274. if (result == null)
  1275. {
  1276. return;
  1277. }
  1278. int nMaidNo = tjs_param[0].AsInteger();
  1279. int skillId = tjs_param[1].AsInteger();
  1280. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  1281. MaidStatus.Status status = maid.status;
  1282. result.SetInteger(0);
  1283. if (status.yotogiSkill.Contains(skillId))
  1284. {
  1285. YotogiSkillData yotogiSkillData = status.yotogiSkill.Get(skillId);
  1286. result.SetInteger(yotogiSkillData.level);
  1287. }
  1288. }
  1289. private void TJSFuncIsYotogiSkill(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1290. {
  1291. NDebug.Assert(2 == tjs_param.Length, "IsYotogiSkill args count error.");
  1292. if (result == null)
  1293. {
  1294. return;
  1295. }
  1296. int nMaidNo = tjs_param[0].AsInteger();
  1297. int skillId = tjs_param[1].AsInteger();
  1298. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  1299. result.SetBool(maid.status.yotogiSkill.Contains(skillId));
  1300. }
  1301. private void TJSFuncGetStockMaidCount(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1302. {
  1303. if (result == null)
  1304. {
  1305. return;
  1306. }
  1307. result.SetInteger(GameMain.Instance.CharacterMgr.GetStockMaidCount());
  1308. }
  1309. private void TJSFuncSetSalonGrade(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1310. {
  1311. NDebug.Assert(1 == tjs_param.Length, "SetSalonGrade args count error.");
  1312. GameMain.Instance.CharacterMgr.status.clubGrade = tjs_param[0].AsInteger();
  1313. }
  1314. private void TJSFuncGetSalonGrade(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1315. {
  1316. if (result == null)
  1317. {
  1318. return;
  1319. }
  1320. result.SetInteger(GameMain.Instance.CharacterMgr.status.clubGrade);
  1321. }
  1322. private void TJSFuncGetClubEvaluation(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1323. {
  1324. if (result == null)
  1325. {
  1326. return;
  1327. }
  1328. result.SetInteger(GameMain.Instance.CharacterMgr.status.clubEvaluation);
  1329. }
  1330. private void TJSFuncSetClubGauge(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1331. {
  1332. NDebug.Assert(1 == tjs_param.Length, "SetClubGauge args count error.");
  1333. GameMain.Instance.CharacterMgr.status.clubGauge = tjs_param[0].AsInteger();
  1334. }
  1335. private void TJSFuncGetClubGauge(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1336. {
  1337. if (result == null)
  1338. {
  1339. return;
  1340. }
  1341. result.SetInteger(GameMain.Instance.CharacterMgr.status.clubGauge);
  1342. }
  1343. private void TJSFuncGetBGName(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1344. {
  1345. if (result == null)
  1346. {
  1347. return;
  1348. }
  1349. result.SetString(GameMain.Instance.BgMgr.GetBGName());
  1350. }
  1351. private void TJSFuncIsItemParam(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1352. {
  1353. if (result == null)
  1354. {
  1355. return;
  1356. }
  1357. NDebug.Assert(2 == tjs_param.Length, "IsItemParam args count error.");
  1358. if (result == null)
  1359. {
  1360. return;
  1361. }
  1362. int nMaidNo = tjs_param[0].AsInteger();
  1363. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  1364. string f_strTag = tjs_param[1].AsString();
  1365. result.SetInteger(Convert.ToInt32(!string.IsNullOrEmpty(maid.body0.GetPartsParam(f_strTag))));
  1366. }
  1367. private void TJSFuncIsItemSlot(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1368. {
  1369. if (result == null)
  1370. {
  1371. return;
  1372. }
  1373. NDebug.Assert(2 == tjs_param.Length, "IsItemSlot args count error.");
  1374. if (result == null)
  1375. {
  1376. return;
  1377. }
  1378. int nMaidNo = tjs_param[0].AsInteger();
  1379. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  1380. string text = tjs_param[1].AsString();
  1381. TBody.SlotID f_eSlot = TBody.SlotID.wear;
  1382. try
  1383. {
  1384. f_eSlot = (TBody.SlotID)Enum.Parse(typeof(TBody.SlotID), text);
  1385. }
  1386. catch
  1387. {
  1388. NDebug.Assert("Parse error.[TBody.SlotID]\n" + text, false);
  1389. }
  1390. result.SetBool(maid.body0.GetSlotLoaded(f_eSlot));
  1391. }
  1392. private void OldTJSFuncIsMaidClass(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1393. {
  1394. NDebug.Assert(this.compatibilityMode || this.tjsLegacyMode, "互換モードではないの、互換モード用関数@IsMaidClassがよばれました");
  1395. this.TJSFuncIsJobMaid(tjs_param, result);
  1396. }
  1397. private void TJSFuncIsJobMaid(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1398. {
  1399. if (result == null)
  1400. {
  1401. return;
  1402. }
  1403. NDebug.Assert(tjs_param.Length == 2, "IsJobMaid args count error.");
  1404. NDebug.Assert(tjs_param[0].type == TJSVariantRef.Type.tvtInteger && tjs_param[1].type == TJSVariantRef.Type.tvtString, "error.");
  1405. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(tjs_param[0].AsInteger());
  1406. string uniqueName = tjs_param[1].AsString();
  1407. JobClass.Data data = JobClass.GetData(uniqueName);
  1408. if (maid.status.jobClass.Contains(data.id))
  1409. {
  1410. result.SetInteger(1);
  1411. }
  1412. else
  1413. {
  1414. result.SetInteger(0);
  1415. }
  1416. }
  1417. private void OldTJSFuncGetMaidClassLevel(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1418. {
  1419. NDebug.Assert(this.compatibilityMode || this.tjsLegacyMode, "互換モードではないの、互換モード用関数@GetMaidClassLevelがよばれました");
  1420. this.TJSFuncGetJobMaidLevel(tjs_param, result);
  1421. }
  1422. private void TJSFuncGetJobMaidLevel(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1423. {
  1424. if (result == null)
  1425. {
  1426. return;
  1427. }
  1428. NDebug.Assert(tjs_param.Length == 2, "GetJobMaidLevel args count error.");
  1429. NDebug.Assert(tjs_param[0].type == TJSVariantRef.Type.tvtInteger && tjs_param[1].type == TJSVariantRef.Type.tvtString, "error.");
  1430. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(tjs_param[0].AsInteger());
  1431. string uniqueName = tjs_param[1].AsString();
  1432. JobClass.Data data = JobClass.GetData(uniqueName);
  1433. if (maid.status.jobClass.Contains(data.id))
  1434. {
  1435. result.SetInteger(maid.status.jobClass.Get(data.id).level);
  1436. }
  1437. else
  1438. {
  1439. result.SetInteger(0);
  1440. }
  1441. }
  1442. private void TJSFuncIsYotogiClass(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1443. {
  1444. if (result == null)
  1445. {
  1446. return;
  1447. }
  1448. NDebug.Assert(tjs_param.Length == 2, "IsYotogiClass args count error.");
  1449. NDebug.Assert(tjs_param[0].type == TJSVariantRef.Type.tvtInteger && tjs_param[1].type == TJSVariantRef.Type.tvtString, "error.");
  1450. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(tjs_param[0].AsInteger());
  1451. string uniqueName = tjs_param[1].AsString();
  1452. YotogiClass.Data data = YotogiClass.GetData(uniqueName);
  1453. if (maid.status.yotogiClass.Contains(data.id))
  1454. {
  1455. result.SetInteger(1);
  1456. }
  1457. else
  1458. {
  1459. result.SetInteger(0);
  1460. }
  1461. }
  1462. private void TJSFuncGetYotogiClassLevel(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1463. {
  1464. if (result == null)
  1465. {
  1466. return;
  1467. }
  1468. NDebug.Assert(tjs_param.Length == 2, "GetYotogiClassLevel args count error.");
  1469. NDebug.Assert(tjs_param[0].type == TJSVariantRef.Type.tvtInteger && tjs_param[1].type == TJSVariantRef.Type.tvtString, "error.");
  1470. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(tjs_param[0].AsInteger());
  1471. string uniqueName = tjs_param[1].AsString();
  1472. YotogiClass.Data data = YotogiClass.GetData(uniqueName);
  1473. if (maid.status.yotogiClass.Contains(data.id))
  1474. {
  1475. result.SetInteger(maid.status.yotogiClass.Get(data.id).level);
  1476. }
  1477. else
  1478. {
  1479. result.SetInteger(0);
  1480. }
  1481. }
  1482. private void TJSFuncGetNoonScuccessLevel(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1483. {
  1484. if (result == null)
  1485. {
  1486. return;
  1487. }
  1488. NDebug.Assert(tjs_param.Length == 1, "TJSFuncGetNoonScuccessLevel args count error.");
  1489. NDebug.Assert(tjs_param[0].type == TJSVariantRef.Type.tvtInteger, "error.");
  1490. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  1491. Maid maid = characterMgr.GetMaid(tjs_param[0].AsInteger());
  1492. ScheduleData[] scheduleSlot = characterMgr.status.scheduleSlot;
  1493. int integer = -1;
  1494. for (int i = 0; i < scheduleSlot.Length; i++)
  1495. {
  1496. if (scheduleSlot[i] != null)
  1497. {
  1498. if (scheduleSlot[i].maid_guid == maid.status.guid)
  1499. {
  1500. integer = (int)scheduleSlot[i].noon_success_level;
  1501. break;
  1502. }
  1503. }
  1504. }
  1505. result.SetInteger(integer);
  1506. }
  1507. private void TJSFuncIsMaid(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1508. {
  1509. if (result == null)
  1510. {
  1511. return;
  1512. }
  1513. NDebug.Assert(tjs_param.Length == 1, "IsMaid args count error.");
  1514. NDebug.Assert(tjs_param[0].type == TJSVariantRef.Type.tvtInteger, "error.");
  1515. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  1516. Maid maid = characterMgr.GetMaid(tjs_param[0].AsInteger());
  1517. result.SetBool(maid != null);
  1518. }
  1519. private void TJSFuncIsOldPersonal(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1520. {
  1521. if (result == null)
  1522. {
  1523. return;
  1524. }
  1525. NDebug.Assert(tjs_param.Length == 1, "IsOldPersonal args count error.");
  1526. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  1527. Maid maid = characterMgr.GetMaid(tjs_param[0].AsInteger());
  1528. if (maid == null)
  1529. {
  1530. result.SetBool(false);
  1531. }
  1532. else
  1533. {
  1534. result.SetBool(maid.status.personal.oldPersonal);
  1535. }
  1536. }
  1537. public void TJSFuncConGetSalonLoan(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1538. {
  1539. if (result == null)
  1540. {
  1541. return;
  1542. }
  1543. result.SetInteger(0);
  1544. }
  1545. public void TJSFuncConGetPhase(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1546. {
  1547. if (result == null)
  1548. {
  1549. return;
  1550. }
  1551. result.SetInteger(2);
  1552. }
  1553. public void TJSFuncGetDay(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1554. {
  1555. if (result == null)
  1556. {
  1557. return;
  1558. }
  1559. PlayerStatus.Status status = GameMain.Instance.CharacterMgr.status;
  1560. result.SetInteger(status.days);
  1561. }
  1562. public void TJSFuncCreateStockMaidLoopData(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1563. {
  1564. this.stock_maid_loop_list.Clear();
  1565. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  1566. for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
  1567. {
  1568. this.stock_maid_loop_list.Add(characterMgr.GetStockMaid(i));
  1569. }
  1570. List<Maid> list = this.stock_maid_loop_list;
  1571. if (ScriptManager.<>f__mg$cache0 == null)
  1572. {
  1573. ScriptManager.<>f__mg$cache0 = new Comparison<Maid>(CharacterSelectManager.SortMaidStandard);
  1574. }
  1575. list.Sort(ScriptManager.<>f__mg$cache0);
  1576. if (result != null)
  1577. {
  1578. result.SetInteger(this.stock_maid_loop_list.Count);
  1579. }
  1580. }
  1581. public void TJSFuncCreateCompetitiveShowLoopData(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1582. {
  1583. this.stock_maid_loop_list.Clear();
  1584. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  1585. if (CompetitiveShowMgr.is_effect_ones)
  1586. {
  1587. for (int i = 0; i < CompetitiveShowMgr.check_maid_list.Count; i++)
  1588. {
  1589. this.stock_maid_loop_list.Add(CompetitiveShowMgr.check_maid_list[i]);
  1590. }
  1591. }
  1592. else if (0 < CompetitiveShowMgr.check_maid_list.Count)
  1593. {
  1594. this.stock_maid_loop_list.Add(CompetitiveShowMgr.check_maid_list[0]);
  1595. CompetitiveShowMgr.check_maid_list.RemoveAt(0);
  1596. }
  1597. if (result != null)
  1598. {
  1599. result.SetInteger(this.stock_maid_loop_list.Count);
  1600. }
  1601. }
  1602. public void TJSFuncGetCompetitiveShowLoopCount(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1603. {
  1604. if (result != null)
  1605. {
  1606. result.SetInteger(CompetitiveShowMgr.check_maid_list.Count);
  1607. }
  1608. }
  1609. public void TJSFuncSetActiveSlotFromStockMaidLoopData(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1610. {
  1611. GameMain.Instance.ScriptMgr.StopMotionScript();
  1612. NDebug.Assert(tjs_param.Length == 1, "SetActiveSlotFromStockMaidLoopData args count error.");
  1613. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  1614. Maid maid = this.stock_maid_loop_list[tjs_param[0].AsInteger()];
  1615. maid.Visible = false;
  1616. characterMgr.SetActiveMaid(maid, 0);
  1617. }
  1618. private void TJSFuncClearCallStack(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1619. {
  1620. this.ClearCallStack();
  1621. }
  1622. private void OldTJSFuncIsCommunicationChara(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1623. {
  1624. NDebug.Assert(this.compatibilityMode || this.tjsLegacyMode, "互換モードではないの、互換モード用関数@IsCommunicationCharaeがよばれました");
  1625. if (result == null)
  1626. {
  1627. return;
  1628. }
  1629. result.SetBool(false);
  1630. result.SetBool(0 < ScheduleAPI.CanCommunicationMaids(GameMain.Instance.CharacterMgr.status.isDaytime).Count);
  1631. }
  1632. private void TJSFuncSetCommunicationChara(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1633. {
  1634. bool isDaytime = GameMain.Instance.CharacterMgr.status.isDaytime;
  1635. Maid communicationMaid = ScheduleAPI.GetCommunicationMaid(isDaytime);
  1636. if (communicationMaid == null)
  1637. {
  1638. if (result != null)
  1639. {
  1640. result.SetBool(false);
  1641. }
  1642. return;
  1643. }
  1644. GameMain.Instance.CharacterMgr.SetActiveMaid(communicationMaid, 0);
  1645. communicationMaid.Visible = true;
  1646. ScheduleCSVData.ScheduleBase schedule = ScheduleAPI.GetSchedule(communicationMaid, isDaytime);
  1647. if (schedule.type == ScheduleTaskCtrl.TaskType.Training)
  1648. {
  1649. ScheduleCSVData.Training training = (ScheduleCSVData.Training)schedule;
  1650. if (training.trainingType == ScheduleCSVData.TrainingType.Trainee)
  1651. {
  1652. Maid maid;
  1653. if (isDaytime)
  1654. {
  1655. maid = ScheduleAPI.GetNoonTrainerMaid();
  1656. }
  1657. else
  1658. {
  1659. maid = ScheduleAPI.GetNightTrainerMaid();
  1660. }
  1661. if (maid != null)
  1662. {
  1663. GameMain.Instance.CharacterMgr.SetActiveMaid(maid, 1);
  1664. maid.Visible = true;
  1665. }
  1666. }
  1667. if (training.trainingType == ScheduleCSVData.TrainingType.Trainer)
  1668. {
  1669. Maid maid2;
  1670. if (isDaytime)
  1671. {
  1672. maid2 = ScheduleAPI.GetNoonTraineeMaid();
  1673. }
  1674. else
  1675. {
  1676. maid2 = ScheduleAPI.GetNightTraineeMaid();
  1677. }
  1678. if (maid2 != null)
  1679. {
  1680. GameMain.Instance.CharacterMgr.SetActiveMaid(maid2, 1);
  1681. maid2.Visible = true;
  1682. }
  1683. }
  1684. }
  1685. if (result != null)
  1686. {
  1687. result.SetBool(true);
  1688. }
  1689. }
  1690. private void TJSFuncSetRandomCommuChara(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1691. {
  1692. GameMain.Instance.ScriptMgr.StopMotionScript();
  1693. Maid[] array = ScheduleAPI.CanCommunicationMaids(GameMain.Instance.CharacterMgr.status.isDaytime).ToArray();
  1694. if (array.Length == 0)
  1695. {
  1696. GameMain.Instance.CharacterMgr.DeactivateMaid(0);
  1697. return;
  1698. }
  1699. Maid maid = array[UnityEngine.Random.Range(0, array.Length)];
  1700. NDebug.Assert(maid != null, "SetRandomCommuChara()\n選択されたメイドが空です");
  1701. GameMain.Instance.CharacterMgr.SetActiveMaid(maid, 0);
  1702. maid.Visible = true;
  1703. }
  1704. private void TJSFuncCreateYotogiCharaList(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1705. {
  1706. SceneCharacterSelect.CreateYotogiCharaList();
  1707. }
  1708. private void TJSFuncCreateNewYotogiCharaList(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1709. {
  1710. SceneCharacterSelect.CreateNewYotogiCharaList();
  1711. }
  1712. private void TJSFuncCreateNewYotogiHaremPairCharaList(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1713. {
  1714. SceneCharacterSelect.CreateNewYotogiHaremPairCharaList();
  1715. }
  1716. private void TJSFuncCreateVipCharaList(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1717. {
  1718. SceneCharacterSelect.CreateVipCharaList();
  1719. }
  1720. private void TJSFuncCreateFacilityCharaList(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1721. {
  1722. SceneCharacterSelect.CreateFacilityCharaList();
  1723. }
  1724. private void TJSFuncCreateLifeModeCharaList(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1725. {
  1726. SceneCharacterSelect.CreateLifeModeCharaList();
  1727. }
  1728. private void TJSFuncIsReceptionChara(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1729. {
  1730. if (result == null)
  1731. {
  1732. return;
  1733. }
  1734. result.SetBool(0 < ScheduleAPI.GetEntertainMaids().Count);
  1735. }
  1736. private void TJSFuncSetRandomReceptionChara(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1737. {
  1738. GameMain.Instance.ScriptMgr.StopMotionScript();
  1739. Maid[] array = ScheduleAPI.GetEntertainMaids().ToArray();
  1740. NDebug.Assert(0 < array.Length, "SetRandomReceptionChara()\nメイドリストが空です");
  1741. Maid maid = array[UnityEngine.Random.Range(0, array.Length)];
  1742. NDebug.Assert(maid != null, "SetRandomReceptionChara()\n選択されたメイドが空です");
  1743. GameMain.Instance.CharacterMgr.SetActiveMaid(maid, 0);
  1744. maid.Visible = true;
  1745. }
  1746. private void TJSFuncIsSelectChara(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1747. {
  1748. if (result == null)
  1749. {
  1750. return;
  1751. }
  1752. result.SetBool(SceneCharacterSelect.IsSelectChara());
  1753. }
  1754. private void TJSFuncGetDateYear(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1755. {
  1756. if (result == null)
  1757. {
  1758. return;
  1759. }
  1760. result.SetInteger(DateTime.Now.Year);
  1761. }
  1762. private void TJSFuncGetDateMonth(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1763. {
  1764. if (result == null)
  1765. {
  1766. return;
  1767. }
  1768. result.SetInteger(DateTime.Now.Month);
  1769. }
  1770. private void TJSFuncGetDateDay(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1771. {
  1772. if (result == null)
  1773. {
  1774. return;
  1775. }
  1776. result.SetInteger(DateTime.Now.Day);
  1777. }
  1778. private void TJSFuncUpdateMaidRanking(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1779. {
  1780. Maid.UpdateMaidRanking();
  1781. }
  1782. private void TJSFuncResetMaidRanking(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1783. {
  1784. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  1785. for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
  1786. {
  1787. Maid stockMaid = characterMgr.GetStockMaid(i);
  1788. if (stockMaid != null)
  1789. {
  1790. stockMaid.status.popularRank = 0;
  1791. stockMaid.status.evaluation = 0;
  1792. stockMaid.status.sales = 0L;
  1793. }
  1794. }
  1795. characterMgr.status.SetFlag("__ランキング日数", 0);
  1796. }
  1797. private void TJSFuncSetMaidRanking1st(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1798. {
  1799. GameMain.Instance.ScriptMgr.StopMotionScript();
  1800. Maid maid = null;
  1801. for (int i = 0; i < GameMain.Instance.CharacterMgr.GetStockMaidCount(); i++)
  1802. {
  1803. maid = GameMain.Instance.CharacterMgr.GetStockMaid(i);
  1804. if (!(maid == null))
  1805. {
  1806. if (maid.status.popularRank == 1)
  1807. {
  1808. break;
  1809. }
  1810. }
  1811. }
  1812. if (maid == null)
  1813. {
  1814. maid = GameMain.Instance.CharacterMgr.GetStockMaid(0);
  1815. }
  1816. GameMain.Instance.CharacterMgr.SetActiveMaid(maid, 0);
  1817. maid.Visible = true;
  1818. }
  1819. private void TJSFuncIsAvailableRanking(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1820. {
  1821. if (result == null)
  1822. {
  1823. return;
  1824. }
  1825. result.SetBool(GameMain.Instance.CharacterMgr.status.isAvailableRanking);
  1826. }
  1827. private void TJSFuncIsYotogiSubCharaSelect(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1828. {
  1829. if (result == null)
  1830. {
  1831. return;
  1832. }
  1833. result.SetBool(false);
  1834. GameObject gameObject = GameObject.Find("UI Root/YotogiManager");
  1835. if (gameObject == null)
  1836. {
  1837. return;
  1838. }
  1839. if (this.compatibilityMode || this.tjsLegacyMode)
  1840. {
  1841. YotogiOldManager component = gameObject.GetComponent<YotogiOldManager>();
  1842. if (component == null)
  1843. {
  1844. return;
  1845. }
  1846. result.SetBool(component.IsCallShouldSubCharaSelect());
  1847. }
  1848. else
  1849. {
  1850. YotogiManager component2 = gameObject.GetComponent<YotogiManager>();
  1851. if (component2 == null)
  1852. {
  1853. return;
  1854. }
  1855. result.SetBool(component2.IsCallShouldSubCharaSelect());
  1856. }
  1857. }
  1858. private void TJSFuncGetYotogiSkillSpecialType(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1859. {
  1860. GameObject gameObject = GameObject.Find("UI Root/YotogiManager");
  1861. if (result == null || gameObject == null)
  1862. {
  1863. return;
  1864. }
  1865. YotogiManager component = gameObject.GetComponent<YotogiManager>();
  1866. if (component == null || component.play_skill_array == null || component.play_skill_array.Length == 0)
  1867. {
  1868. return;
  1869. }
  1870. result.SetString(component.play_skill_array[0].skill_pair.base_data.specialConditionType.ToString());
  1871. }
  1872. private void TJSFuncIsSelectedYotogiSkill(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1873. {
  1874. NDebug.Assert(tjs_param.Length == 1, "IsSelectedYotogiSkill args count error.");
  1875. GameObject gameObject = GameObject.Find("UI Root/YotogiManager");
  1876. if (result == null || gameObject == null)
  1877. {
  1878. return;
  1879. }
  1880. YotogiManager component = gameObject.GetComponent<YotogiManager>();
  1881. if (component == null || component.play_skill_array == null || component.play_skill_array.Length == 0)
  1882. {
  1883. return;
  1884. }
  1885. result.SetBool(false);
  1886. int num = tjs_param[0].AsInteger();
  1887. foreach (YotogiManager.PlayingSkillData playingSkillData in component.play_skill_array)
  1888. {
  1889. if (playingSkillData != null && playingSkillData.skill_pair != null && playingSkillData.skill_pair.skill_data != null)
  1890. {
  1891. if (playingSkillData.skill_pair.skill_data.data.id == num)
  1892. {
  1893. result.SetBool(true);
  1894. break;
  1895. }
  1896. }
  1897. }
  1898. }
  1899. private void TJSFuncIsExistentFile(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1900. {
  1901. if (result == null)
  1902. {
  1903. return;
  1904. }
  1905. if (this.compatibilityMode)
  1906. {
  1907. result.SetBool(false);
  1908. }
  1909. else
  1910. {
  1911. NDebug.Assert(1 == tjs_param.Length, "TJSFuncIsExistentFile args count error.");
  1912. result.SetBool(this.file_system.IsExistentFile(tjs_param[0].AsString()));
  1913. }
  1914. }
  1915. private void TJSFuncIsExistentFileLegacy(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1916. {
  1917. if (result == null)
  1918. {
  1919. return;
  1920. }
  1921. NDebug.Assert(1 == tjs_param.Length, "IsExistentFileLegacy args count error.");
  1922. result.SetBool(GameUty.FileSystemOld.IsExistentFile(tjs_param[0].AsString()));
  1923. }
  1924. private void TJSFuncCheckClearVIP(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1925. {
  1926. if (result == null)
  1927. {
  1928. return;
  1929. }
  1930. NDebug.Assert(1 == tjs_param.Length, "CheckClearVIP args count error.");
  1931. int key = tjs_param[0].AsInteger();
  1932. ReadOnlyDictionary<int, NightWorkState> night_works_state_dic = GameMain.Instance.CharacterMgr.status.night_works_state_dic;
  1933. bool @bool = false;
  1934. if (night_works_state_dic.ContainsKey(key) && night_works_state_dic[key].finish)
  1935. {
  1936. @bool = true;
  1937. }
  1938. result.SetBool(@bool);
  1939. }
  1940. private void TJSFuncIsCBLVersion(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1941. {
  1942. if (result == null)
  1943. {
  1944. return;
  1945. }
  1946. result.SetBool(false);
  1947. }
  1948. private void OldTJSFuncGetRentalNPCName(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1949. {
  1950. NDebug.Assert(this.compatibilityMode || this.tjsLegacyMode, "互換モードではないの、互換モード用関数@GetRentalNPCNameがよばれました");
  1951. if (result == null)
  1952. {
  1953. return;
  1954. }
  1955. result.SetString(string.Empty);
  1956. }
  1957. private void OldTJSFuncIsMarriage(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1958. {
  1959. NDebug.Assert(this.compatibilityMode || this.tjsLegacyMode, "互換モードではないの、互換モード用関数@IsMarriageがよばれました");
  1960. if (result == null)
  1961. {
  1962. return;
  1963. }
  1964. NDebug.Assert(1 == tjs_param.Length, "TJSFuncIsMarriage args count error.");
  1965. int nMaidNo = tjs_param[0].AsInteger();
  1966. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  1967. if (maid != null && maid.status.OldStatus != null)
  1968. {
  1969. result.SetBool(maid.status.OldStatus.isMarriage);
  1970. }
  1971. else
  1972. {
  1973. result.SetBool(false);
  1974. }
  1975. }
  1976. private void OldTJSFuncIsNewWifeFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1977. {
  1978. NDebug.Assert(this.compatibilityMode || this.tjsLegacyMode, "互換モードではないの、互換モード用関数@IsNewWifeFlagがよばれました");
  1979. if (result == null)
  1980. {
  1981. return;
  1982. }
  1983. NDebug.Assert(1 == tjs_param.Length, "TJSFuncIsMarriage args count error.");
  1984. int nMaidNo = tjs_param[0].AsInteger();
  1985. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  1986. if (maid != null && maid.status.OldStatus != null)
  1987. {
  1988. result.SetBool(maid.status.OldStatus.isNewWife);
  1989. }
  1990. else
  1991. {
  1992. result.SetBool(false);
  1993. }
  1994. }
  1995. private void TJSFuncIsMVPEvent(TJSVariantRef[] tjs_param, TJSVariantRef result)
  1996. {
  1997. if (result == null)
  1998. {
  1999. return;
  2000. }
  2001. PlayerStatus.Status status = GameMain.Instance.CharacterMgr.status;
  2002. if (!status.isAvailableRanking)
  2003. {
  2004. result.SetBool(false);
  2005. }
  2006. else if (status.GetFlag("__ランキング日数") % 7 == 0)
  2007. {
  2008. bool @bool = false;
  2009. for (int i = 0; i < GameMain.Instance.CharacterMgr.GetStockMaidCount(); i++)
  2010. {
  2011. Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaid(i);
  2012. if (!(stockMaid == null))
  2013. {
  2014. if (stockMaid.status.popularRank == 1)
  2015. {
  2016. @bool = true;
  2017. break;
  2018. }
  2019. }
  2020. }
  2021. result.SetBool(@bool);
  2022. }
  2023. else
  2024. {
  2025. result.SetBool(false);
  2026. }
  2027. }
  2028. private void TJSFuncSetMaidCondition(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2029. {
  2030. NDebug.Assert(2 == tjs_param.Length, "SetMaidCondition args count error.");
  2031. int nMaidNo = tjs_param[0].AsInteger();
  2032. string a = tjs_param[1].AsString();
  2033. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  2034. if (this.compatibilityMode || this.tjsLegacyMode)
  2035. {
  2036. if (a == "緊張")
  2037. {
  2038. maid.status.OldStatus.relation = MaidStatus.Old.Relation.Tonus;
  2039. }
  2040. else if (a == "お近づき")
  2041. {
  2042. maid.status.OldStatus.relation = MaidStatus.Old.Relation.Contact;
  2043. }
  2044. else if (a == "信頼")
  2045. {
  2046. maid.status.OldStatus.relation = MaidStatus.Old.Relation.Trust;
  2047. }
  2048. else if (a == "恋人")
  2049. {
  2050. maid.status.OldStatus.relation = MaidStatus.Old.Relation.Lover;
  2051. }
  2052. else if (a == "愛奴")
  2053. {
  2054. maid.status.OldStatus.relation = MaidStatus.Old.Relation.Slave;
  2055. }
  2056. else if (a == "酔い")
  2057. {
  2058. maid.status.OldStatus.condition = Condition.Drunk;
  2059. }
  2060. else if (a == "お仕置き")
  2061. {
  2062. maid.status.OldStatus.condition = Condition.Osioki;
  2063. }
  2064. else if (a == "酔い解除" || a == "お仕置き解除")
  2065. {
  2066. maid.status.OldStatus.condition = Condition.Null;
  2067. }
  2068. }
  2069. else if (a == "お近づき")
  2070. {
  2071. maid.status.relation = MaidStatus.Relation.Contact;
  2072. }
  2073. else if (a == "信頼")
  2074. {
  2075. maid.status.relation = MaidStatus.Relation.Trust;
  2076. }
  2077. else if (a == "恋人")
  2078. {
  2079. maid.status.relation = MaidStatus.Relation.Lover;
  2080. }
  2081. }
  2082. private void TJSFuncSetSeikeikenFront(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2083. {
  2084. NDebug.Assert(2 == tjs_param.Length, "SetSeikeikenFront args count error.");
  2085. int num = tjs_param[0].AsInteger();
  2086. bool seikeikenFront = tjs_param[1].AsBool();
  2087. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(num);
  2088. Seikeiken seikeiken = maid.status.seikeiken;
  2089. maid.status.SetSeikeikenFront(seikeikenFront);
  2090. if (num == 0 && maid.status.seikeiken != seikeiken)
  2091. {
  2092. if ((this.compatibilityMode || this.tjsLegacyMode) && YotogiOldManager.instans != null)
  2093. {
  2094. YotogiOldManager.instans.OnChangeSeikeiken();
  2095. }
  2096. else if (YotogiManager.instans != null)
  2097. {
  2098. YotogiManager.instans.OnChangeSeikeiken();
  2099. }
  2100. }
  2101. }
  2102. private void TJSFuncSetSeikeikenBack(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2103. {
  2104. NDebug.Assert(2 == tjs_param.Length, "SetSeikeikenBack args count error.");
  2105. int nMaidNo = tjs_param[0].AsInteger();
  2106. bool seikeikenBack = tjs_param[1].AsBool();
  2107. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  2108. maid.status.SetSeikeikenBack(seikeikenBack);
  2109. }
  2110. private void TJSFuncSetInitSeikeiken(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2111. {
  2112. NDebug.Assert(2 == tjs_param.Length, "SetInitSeikeiken args count error.");
  2113. int nMaidNo = tjs_param[0].AsInteger();
  2114. string text = tjs_param[1].AsString();
  2115. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  2116. try
  2117. {
  2118. Seikeiken initSeikeiken = (Seikeiken)Enum.Parse(typeof(Seikeiken), text);
  2119. maid.status.initSeikeiken = initSeikeiken;
  2120. }
  2121. catch (ArgumentException)
  2122. {
  2123. Debug.Log("MaidStatus.Seikeiken\nenum parse error.[" + text + "]");
  2124. }
  2125. }
  2126. private void TJSFuncSetNewItem(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2127. {
  2128. NDebug.Assert(1 == tjs_param.Length, "SetNewItem args count error.");
  2129. if (this.compatibilityMode || this.tjsLegacyMode)
  2130. {
  2131. return;
  2132. }
  2133. string itemName = tjs_param[0].AsString();
  2134. GameMain.Instance.CharacterMgr.status.AddHavePartsItem(itemName);
  2135. }
  2136. private void TJSFuncIsGameInShopItemPurchased(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2137. {
  2138. NDebug.Assert(1 == tjs_param.Length, "IsGameInShopItemPurchased args count error.");
  2139. if (result == null)
  2140. {
  2141. return;
  2142. }
  2143. int num = tjs_param[0].AsInteger();
  2144. PlayerStatus.Status status = GameMain.Instance.CharacterMgr.status;
  2145. if (!status.IsShopLineupItem(num))
  2146. {
  2147. result.SetBool(false);
  2148. }
  2149. result.SetBool(status.shopLineups.Get(num) == ShopItemStatus.Purchased);
  2150. }
  2151. private void TJSFuncSetContractType(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2152. {
  2153. NDebug.Assert(2 == tjs_param.Length, "SetContractType args count error.");
  2154. int nMaidNo = tjs_param[0].AsInteger();
  2155. string text = tjs_param[1].AsString();
  2156. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  2157. if (text == "育成中")
  2158. {
  2159. maid.status.contract = Contract.Trainee;
  2160. }
  2161. else if (text == "フリー")
  2162. {
  2163. maid.status.contract = Contract.Free;
  2164. }
  2165. else if (text == "専属")
  2166. {
  2167. maid.status.contract = Contract.Exclusive;
  2168. }
  2169. else
  2170. {
  2171. NDebug.Assert(text + "は不正です", false);
  2172. }
  2173. }
  2174. private void TJSFuncSetFeature(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2175. {
  2176. NDebug.Assert(3 == tjs_param.Length, "SetFeature args count error.");
  2177. int nMaidNo = tjs_param[0].AsInteger();
  2178. string uniqueName = tjs_param[1].AsString();
  2179. bool flag = tjs_param[2].AsBool();
  2180. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  2181. Feature.Data data = Feature.GetData(uniqueName);
  2182. maid.status.AddFeature(data);
  2183. }
  2184. private void TJSFuncSetPropensity(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2185. {
  2186. NDebug.Assert(3 == tjs_param.Length, "SetPropensity args count error.");
  2187. int nMaidNo = tjs_param[0].AsInteger();
  2188. string uniqueName = tjs_param[1].AsString();
  2189. bool flag = tjs_param[2].AsBool();
  2190. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  2191. Propensity.Data data = Propensity.GetData(uniqueName);
  2192. maid.status.AddPropensity(data);
  2193. }
  2194. private void TJSFuncComSetSexualParam(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2195. {
  2196. }
  2197. private void TJSFuncSetNewTrophy(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2198. {
  2199. if (this.compatibilityMode || this.tjsLegacyMode)
  2200. {
  2201. return;
  2202. }
  2203. NDebug.Assert(1 == tjs_param.Length, "SetNewTrophy args count error.");
  2204. int trophyId = tjs_param[0].AsInteger();
  2205. GameMain.Instance.CharacterMgr.status.AddHaveTrophy(trophyId);
  2206. }
  2207. private void TJSFuncCheckTrophyContractType(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2208. {
  2209. if (this.compatibilityMode || this.tjsLegacyMode)
  2210. {
  2211. return;
  2212. }
  2213. GameMain.Instance.CharacterMgr.status.CheckTrophyContractTypeAndrelation();
  2214. }
  2215. private void TJSFuncSetYotogiSelectStageName(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2216. {
  2217. NDebug.Assert(1 == tjs_param.Length, "SetYotogiSelectStageName args count error.");
  2218. this.debug_yotogi_stage_ = tjs_param[0].AsString();
  2219. }
  2220. private void TJSFuncGetYotogiSelectStageName(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2221. {
  2222. if (result == null)
  2223. {
  2224. return;
  2225. }
  2226. if (this.compatibilityMode || this.tjsLegacyMode)
  2227. {
  2228. result.SetString(YotogiOldStageSelectManager.StageName);
  2229. }
  2230. else
  2231. {
  2232. result.SetString(YotogiStageSelectManager.SelectedStage.uniqueName);
  2233. }
  2234. }
  2235. public void TJSFuncIsPluginPack(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2236. {
  2237. if (result == null)
  2238. {
  2239. return;
  2240. }
  2241. NDebug.Assert(1 == tjs_param.Length, "IsPluginPack args count error.");
  2242. if (this.compatibilityMode)
  2243. {
  2244. result.SetBool(false);
  2245. }
  2246. else
  2247. {
  2248. string text = tjs_param[0].AsString();
  2249. if (!PluginData.Contains(text))
  2250. {
  2251. Debug.LogError("IsPluginPackで指定された[" + text + "]は設定されていないプラグイン名です");
  2252. }
  2253. result.SetBool(PluginData.IsEnabled(text));
  2254. }
  2255. }
  2256. public void TJSFuncAddShopLineup(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2257. {
  2258. NDebug.Assert(1 == tjs_param.Length, "TJSFuncAddShopLineup args count error.");
  2259. PlayerStatus.Status status = GameMain.Instance.CharacterMgr.status;
  2260. int num = tjs_param[0].AsInteger();
  2261. if (!status.shopLineups.ContainsKey(num))
  2262. {
  2263. status.AddShopLineup(num);
  2264. }
  2265. }
  2266. public void TJSFuncSetEventItemFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2267. {
  2268. NDebug.Assert(2 == tjs_param.Length, "SetEventItemFlag args count error.");
  2269. PlayerStatus.Status status = GameMain.Instance.CharacterMgr.status;
  2270. bool flag = tjs_param[1].AsInteger() != 0;
  2271. if (flag)
  2272. {
  2273. status.AddHaveItem(tjs_param[0].AsString());
  2274. }
  2275. else
  2276. {
  2277. status.RemoveHaveItem(tjs_param[0].AsString());
  2278. }
  2279. }
  2280. public void TJSFuncIsEventItemFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2281. {
  2282. if (result == null)
  2283. {
  2284. NDebug.Assert("error IsEventItemFlag", false);
  2285. }
  2286. NDebug.Assert(1 == tjs_param.Length, "IsEventItemFlag args count error.");
  2287. PlayerStatus.Status status = GameMain.Instance.CharacterMgr.status;
  2288. result.SetBool(status.IsHaveItem(tjs_param[0].AsString()));
  2289. }
  2290. public void TJSFuncGetVRMode(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2291. {
  2292. if (result == null)
  2293. {
  2294. NDebug.Assert("error GetVRMode", false);
  2295. }
  2296. result.SetInteger((int)GameMain.Instance.VRDeviceTypeID);
  2297. }
  2298. public void TJSFuncIsVRMode(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2299. {
  2300. if (result == null)
  2301. {
  2302. NDebug.Assert("error IsVRMode", false);
  2303. }
  2304. result.SetInteger((!GameMain.Instance.VRMode) ? 0 : 1);
  2305. }
  2306. public void TJSFuncSetDanceData(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2307. {
  2308. NDebug.Assert(1 == tjs_param.Length, "TJSFuncAddShopLineup args count error.");
  2309. string bgm_file_name = tjs_param[0].AsString();
  2310. DanceMain.SelectDanceData = new DanceData
  2311. {
  2312. bgm_file_name = bgm_file_name,
  2313. preset_name = new List<string>(),
  2314. preset_name =
  2315. {
  2316. string.Empty
  2317. }
  2318. };
  2319. DanceMain.KaraokeMode = true;
  2320. RhythmAction_Mgr.KaraokeRecet();
  2321. GameMain.Instance.CMSystem.SetTmpGenericFlag("ダンスOVRカメラタイプ", 0);
  2322. }
  2323. public void TJSFuncGetEventAdded(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2324. {
  2325. if (result == null)
  2326. {
  2327. NDebug.Assert("error GetEventAdded", false);
  2328. }
  2329. result.SetBool(GameMain.Instance.ScenarioSelectMgr.IsEventAdded());
  2330. }
  2331. public void TJSFuncGetLockNTRPlayFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2332. {
  2333. if (result == null)
  2334. {
  2335. NDebug.Assert("error GetLockNTRPlayFlag", false);
  2336. }
  2337. result.SetBool(GameMain.Instance.CharacterMgr.status.lockNTRPlay);
  2338. }
  2339. public void TJSFuncGetLockUserDraftMaid(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2340. {
  2341. if (result == null)
  2342. {
  2343. NDebug.Assert("error GetLockUserDraftMaid", false);
  2344. }
  2345. result.SetBool(GameMain.Instance.CharacterMgr.status.lockUserDraftMaid);
  2346. }
  2347. public void TJSFuncIsComPlayer(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2348. {
  2349. if (result == null)
  2350. {
  2351. NDebug.Assert("error IsComPlayer", false);
  2352. }
  2353. result.SetBool(!GameMain.Instance.CharacterMgr.status.isOldPlayer);
  2354. }
  2355. public void TJSFuncSetPlayerMoney(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2356. {
  2357. NDebug.Assert(1 == tjs_param.Length, "SetPlayerMoney args count error.");
  2358. int num = tjs_param[0].AsInteger();
  2359. GameMain.Instance.CharacterMgr.status.money = (long)num;
  2360. }
  2361. public void TJSFuncGetPlayerMoney(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2362. {
  2363. if (result == null)
  2364. {
  2365. NDebug.Assert("error GetPlayerMoney", false);
  2366. }
  2367. int integer = (2147483647L >= GameMain.Instance.CharacterMgr.status.money) ? ((int)GameMain.Instance.CharacterMgr.status.money) : int.MaxValue;
  2368. result.SetInteger(integer);
  2369. }
  2370. public void TJSFuncSetMaidLeader(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2371. {
  2372. NDebug.Assert(2 == tjs_param.Length, "SetMaidLeader args count error.");
  2373. int nMaidNo = tjs_param[0].AsInteger();
  2374. bool leader = tjs_param[1].AsBool();
  2375. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(nMaidNo);
  2376. if (maid != null)
  2377. {
  2378. maid.status.leader = leader;
  2379. }
  2380. }
  2381. public void TJSFuncSetMaidCostumeFacility(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2382. {
  2383. NDebug.Assert(1 == tjs_param.Length, "UpdateMaidCostumeFacility args count error.");
  2384. int num = tjs_param[0].AsInteger();
  2385. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(num);
  2386. NDebug.Assert(maid != null, string.Format("UpdateMaidCostumeFacility()\nメイド[{0}]番が見つかりませんでした。", num));
  2387. ScheduleMgr.ScheduleTime scheduleTime = (!GameMain.Instance.CharacterMgr.status.isDaytime) ? ScheduleMgr.ScheduleTime.Night : ScheduleMgr.ScheduleTime.DayTime;
  2388. Facility maidAssignedFacility = GameMain.Instance.FacilityMgr.GetMaidAssignedFacility(maid, scheduleTime);
  2389. if (maidAssignedFacility != null)
  2390. {
  2391. Facility.CostumeType typeCostume = maidAssignedFacility.typeCostume;
  2392. if (typeCostume == Facility.CostumeType.Edit)
  2393. {
  2394. maidAssignedFacility.UpdateMaidCostumeToEditCostume(maid, false);
  2395. }
  2396. else if (typeCostume == Facility.CostumeType.Default)
  2397. {
  2398. maidAssignedFacility.UpdateMaidCostumeToDefaultCostume(maid);
  2399. }
  2400. else if (typeCostume == Facility.CostumeType.Heroine)
  2401. {
  2402. MPN[] facilityCostumeEnableMPN = FacilityDataTable.GetFacilityCostumeEnableMPN();
  2403. for (int i = 0; i < facilityCostumeEnableMPN.Length; i++)
  2404. {
  2405. maid.ResetProp(facilityCostumeEnableMPN[i], false);
  2406. }
  2407. }
  2408. }
  2409. else
  2410. {
  2411. NDebug.Warning(string.Format("UpdateMaidCostumeFacility()\nメイド[{0}]番は、現在施設の仕事を持っていません。", num));
  2412. Debug.LogWarningFormat("UpdateMaidCostumeFacility()\nメイド[{0}]番は、現在施設の仕事を持っていません。", new object[]
  2413. {
  2414. num
  2415. });
  2416. }
  2417. }
  2418. public void TJSFuncResetMaidCostumeFacility(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2419. {
  2420. NDebug.Assert(1 == tjs_param.Length, "UpdateMaidCostumeFacility args count error.");
  2421. int num = tjs_param[0].AsInteger();
  2422. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(num);
  2423. NDebug.Assert(maid != null, string.Format("UpdateMaidCostumeFacility()\nメイド[{0}]番が見つかりませんでした。", num));
  2424. MPN[] facilityCostumeEnableMPN = FacilityDataTable.GetFacilityCostumeEnableMPN();
  2425. for (int i = 0; i < facilityCostumeEnableMPN.Length; i++)
  2426. {
  2427. maid.ResetProp(facilityCostumeEnableMPN[i], false);
  2428. }
  2429. }
  2430. public void TJSFuncCallTitleBar(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2431. {
  2432. NDebug.Assert(1 == tjs_param.Length, "CallTitleBar args count error.");
  2433. GameObject gameObject = GameObject.Find("__SceneADV__");
  2434. if (gameObject == null)
  2435. {
  2436. return;
  2437. }
  2438. SceneADV component = gameObject.GetComponent<SceneADV>();
  2439. component.CallTitleBar(tjs_param[0].AsString());
  2440. }
  2441. public void TJSFuncSetCompatibilityMode(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2442. {
  2443. NDebug.Assert(1 == tjs_param.Length, "SetCompatibilityMode args count error.");
  2444. this.compatibilityMode = tjs_param[0].AsBool();
  2445. Debug.Log("スクリプトモード変更 : 互換モード[" + ((!this.compatibilityMode) ? "×]" : "〇]"));
  2446. KagScript kag = this.adv_kag.kag;
  2447. this.compatibilityCallStackDepth = kag.callStackDepth;
  2448. this.compatibilityRCallStackDepth = kag.r_callStackDepth;
  2449. }
  2450. public void TJSFuncIsBuildingFacility(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2451. {
  2452. NDebug.Assert(result != null, "error IsBuildingFacility");
  2453. NDebug.Assert(1 == tjs_param.Length, "IsBuildingFacility args count error.");
  2454. string text = tjs_param[0].AsString();
  2455. FacilityDataTable.FacilityDefaultData facilityDefaultData = FacilityDataTable.GetFacilityDefaultData(text, false);
  2456. NDebug.Assert(facilityDefaultData != null, string.Format("{0} は存在しない情報です", text));
  2457. if (!facilityDefaultData.isEnableData)
  2458. {
  2459. Debug.Log(text + " は有効ではありません");
  2460. result.SetBool(false);
  2461. }
  2462. else
  2463. {
  2464. result.SetBool(GameMain.Instance.FacilityMgr.IsExistTypeFacility(facilityDefaultData.ID));
  2465. }
  2466. }
  2467. public void TJSFuncIsBuildingFacilityUpward(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2468. {
  2469. NDebug.Assert(result != null, "error IsBuildingFacilityUpward");
  2470. NDebug.Assert(1 == tjs_param.Length, "IsBuildingFacilityUpward args count error.");
  2471. string text = tjs_param[0].AsString();
  2472. FacilityDataTable.FacilityDefaultData facilityDefaultData = FacilityDataTable.GetFacilityDefaultData(text, false);
  2473. NDebug.Assert(facilityDefaultData != null, string.Format("{0} は存在しない情報です", text));
  2474. if (!facilityDefaultData.isEnableData)
  2475. {
  2476. Debug.Log(text + " は有効ではありません");
  2477. result.SetBool(false);
  2478. }
  2479. if (facilityDefaultData.isExistUpwardFacility)
  2480. {
  2481. result.SetBool(GameMain.Instance.FacilityMgr.IsExistTypeFacility(facilityDefaultData.upwardFacility.ID));
  2482. }
  2483. else
  2484. {
  2485. result.SetBool(false);
  2486. }
  2487. }
  2488. public void TJSCheckDanceType(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2489. {
  2490. NDebug.Assert(tjs_param.Length != 0, "CheckDanceType:引数が何も指定されてません");
  2491. bool flag = false;
  2492. foreach (TJSVariantRef tjsvariantRef in tjs_param)
  2493. {
  2494. flag |= (RhythmAction_Mgr.NowDance == (RhythmAction_Mgr.DanceType)Enum.Parse(typeof(RhythmAction_Mgr.DanceType), tjsvariantRef.AsString()));
  2495. }
  2496. result.SetBool(flag);
  2497. }
  2498. public void TJSSetMusicRelease(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2499. {
  2500. NDebug.Assert(tjs_param.Length == 1, "SetMusicRelease:指定できる引数は1つまでです");
  2501. VsDanceDataMgr.Instance.MusicRelese(tjs_param[0].AsInteger());
  2502. }
  2503. public void TJSSetVsSetting(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2504. {
  2505. NDebug.Assert(tjs_param.Length == 1, "SetVsSetting:指定できる引数は1つまでです");
  2506. VsDanceDataMgr.Instance.SelectSetting(tjs_param[0].AsInteger());
  2507. }
  2508. public void TJSNeedDanceResult(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2509. {
  2510. bool flag = true;
  2511. flag &= (RhythmAction_Mgr.NowDance != RhythmAction_Mgr.DanceType.VS_Skip);
  2512. flag &= (RhythmAction_Mgr.NowDance != RhythmAction_Mgr.DanceType.Touch);
  2513. flag &= (RhythmAction_Mgr.NowDance != RhythmAction_Mgr.DanceType.View);
  2514. flag &= (RhythmAction_Mgr.NowDance != RhythmAction_Mgr.DanceType.Encore);
  2515. result.SetBool(flag);
  2516. }
  2517. public void TJSGetChallengeRank(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2518. {
  2519. NDebug.Assert(tjs_param.Length > 0, "GetChallengeRank:引数が指定されてません");
  2520. bool flag = false;
  2521. foreach (TJSVariantRef tjsvariantRef in tjs_param)
  2522. {
  2523. flag |= (tjsvariantRef.AsString() == Result_Display.GetData("Rank"));
  2524. }
  2525. result.SetBool(flag);
  2526. }
  2527. public void TJSBjDayFirst(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2528. {
  2529. int days = GameMain.Instance.CharacterMgr.status.days;
  2530. int flag = GameMain.Instance.CharacterMgr.status.GetFlag("BJ最終プレイ日");
  2531. bool @bool = days != flag;
  2532. foreach (TJSVariantRef tjsvariantRef in tjs_param)
  2533. {
  2534. if (tjsvariantRef.AsString() == "ブラックジャック終了")
  2535. {
  2536. GameMain.Instance.CharacterMgr.status.SetFlag("BJ最終プレイ日", days);
  2537. break;
  2538. }
  2539. }
  2540. result.SetBool(@bool);
  2541. }
  2542. public void TJSCasinoShopBuy(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2543. {
  2544. NDebug.Assert(tjs_param.Length != 0, "CasinoShopBuy:引数が指定されてません");
  2545. bool flag = false;
  2546. foreach (TJSVariantRef tjsvariantRef in tjs_param)
  2547. {
  2548. int num = tjsvariantRef.AsInteger();
  2549. flag = false;
  2550. foreach (CasinoShopItem casinoShopItem in CasinoDataMgr.Instance.GetShopItem())
  2551. {
  2552. if (casinoShopItem.ID == num && casinoShopItem.IsSoldOut)
  2553. {
  2554. flag = true;
  2555. break;
  2556. }
  2557. }
  2558. if (!flag)
  2559. {
  2560. break;
  2561. }
  2562. }
  2563. result.SetBool(flag);
  2564. }
  2565. public void TJSSetEventEndFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2566. {
  2567. NDebug.Assert(tjs_param.Length == 3, "SetEventEndFlag:引数が3つ必要です");
  2568. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(tjs_param[0].AsInteger());
  2569. if (!maid)
  2570. {
  2571. maid = GameMain.Instance.CharacterMgr.GetStockMaid(tjs_param[0].AsInteger());
  2572. if (!maid)
  2573. {
  2574. return;
  2575. }
  2576. }
  2577. if (!GameMain.Instance.ScenarioSelectMgr.ExistScenario(tjs_param[1].AsInteger()))
  2578. {
  2579. Debug.LogErrorFormat("選択シナリオ:{0}は存在しません", new object[]
  2580. {
  2581. tjs_param[1].AsInteger()
  2582. });
  2583. return;
  2584. }
  2585. maid.status.SetEventEndFlag(tjs_param[1].AsInteger(), tjs_param[2].AsBool());
  2586. }
  2587. public void TJSFuncIsKasizukiGuest(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2588. {
  2589. if (result == null)
  2590. {
  2591. NDebug.Assert("error IsKasizukiGuest", false);
  2592. }
  2593. ManDataType nowManType = (ManDataType)GameMain.Instance.KasizukiMgr.GetNowManType();
  2594. result.SetBool(nowManType != ManDataType.主人公);
  2595. }
  2596. public void TJSFuncGetKasizukiSelectRoomName(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2597. {
  2598. if (result == null)
  2599. {
  2600. NDebug.Assert("error GetKasizukiSelectRoomName", false);
  2601. }
  2602. RoomData.Data data = RoomData.GetData(GameMain.Instance.KasizukiMgr.GetSystemData<int>(SystemDataType.選択部屋));
  2603. result.SetString(data.uniqueName);
  2604. }
  2605. public void TJSFuncGetKasizukiMaidLikability(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2606. {
  2607. if (result == null)
  2608. {
  2609. NDebug.Assert("error GetKasizukiMaidLikability", false);
  2610. }
  2611. KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
  2612. ManDataType nowManType = (ManDataType)kasizukiMgr.GetNowManType();
  2613. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);
  2614. int integer = -1;
  2615. if (nowManType == ManDataType.主人公)
  2616. {
  2617. integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F本編, true);
  2618. }
  2619. else if (nowManType == ManDataType.傅き男1)
  2620. {
  2621. integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男1, true);
  2622. }
  2623. else if (nowManType == ManDataType.傅き男2)
  2624. {
  2625. integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男2, true);
  2626. }
  2627. else if (nowManType == ManDataType.傅き男3)
  2628. {
  2629. integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男3, true);
  2630. }
  2631. else if (nowManType == ManDataType.傅き男4)
  2632. {
  2633. integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男4, true);
  2634. }
  2635. else if (nowManType == ManDataType.傅き男5)
  2636. {
  2637. integer = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男5, true);
  2638. }
  2639. result.SetInteger(integer);
  2640. }
  2641. public void TJSFuncGetKasizukiMaidLikabilityName(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2642. {
  2643. if (result == null)
  2644. {
  2645. NDebug.Assert("error GetKasizukiMaidLikabilityName", false);
  2646. }
  2647. KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
  2648. ManDataType nowManType = (ManDataType)kasizukiMgr.GetNowManType();
  2649. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);
  2650. int likability = -1;
  2651. if (nowManType == ManDataType.主人公)
  2652. {
  2653. likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F本編, true);
  2654. }
  2655. else if (nowManType == ManDataType.傅き男1)
  2656. {
  2657. likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男1, true);
  2658. }
  2659. else if (nowManType == ManDataType.傅き男2)
  2660. {
  2661. likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男2, true);
  2662. }
  2663. else if (nowManType == ManDataType.傅き男3)
  2664. {
  2665. likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男3, true);
  2666. }
  2667. else if (nowManType == ManDataType.傅き男4)
  2668. {
  2669. likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男4, true);
  2670. }
  2671. else if (nowManType == ManDataType.傅き男5)
  2672. {
  2673. likability = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男5, true);
  2674. }
  2675. string likabilityName = LikabilityReplace.GetLikabilityName(likability);
  2676. result.SetString(likabilityName);
  2677. }
  2678. public void TJSFuncGetKasizukiMaidWorkCount(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2679. {
  2680. if (result == null)
  2681. {
  2682. NDebug.Assert("error GetKasizukiMaidWorkCount", false);
  2683. }
  2684. KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
  2685. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);
  2686. int maidData = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.仕事回数, true);
  2687. result.SetInteger(maidData);
  2688. }
  2689. public void TJSFuncGetKasizukiMaidWorkCountName(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2690. {
  2691. if (result == null)
  2692. {
  2693. NDebug.Assert("error GetKasizukiMaidWorkCountName", false);
  2694. }
  2695. KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
  2696. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);
  2697. int maidData = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.仕事回数, true);
  2698. string workCountName = WorkCountReplace.GetWorkCountName(maidData);
  2699. result.SetString(workCountName);
  2700. }
  2701. public void TJSFuncGetKasizukiSystemFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2702. {
  2703. KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
  2704. kasizukiMgr.TJSFuncGetKasizukiSystemFlag(tjs_param, result);
  2705. }
  2706. public void TJSFuncSetKasizukiSystemFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2707. {
  2708. KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
  2709. kasizukiMgr.TJSFuncSetKasizukiSystemFlag(tjs_param, result);
  2710. }
  2711. public void TJSFuncAddKasizukiSystemFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2712. {
  2713. KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
  2714. kasizukiMgr.TJSFuncAddKasizukiSystemFlag(tjs_param, result);
  2715. }
  2716. public void TJSFuncSetKasizukiPassFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2717. {
  2718. KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
  2719. kasizukiMgr.TJSFuncSetKasizukiPassFlag(tjs_param, result);
  2720. }
  2721. public void TJSFuncGetKasizukiMaidFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2722. {
  2723. KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
  2724. kasizukiMgr.TJSFuncGetKasizukiMaidFlag(tjs_param, result);
  2725. }
  2726. public void TJSFuncSetKasizukiMaidFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2727. {
  2728. KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
  2729. kasizukiMgr.TJSFuncSetKasizukiMaidFlag(tjs_param, result);
  2730. }
  2731. public void TJSFuncIsKasizukiCorrectSenarioFlag(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2732. {
  2733. KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
  2734. kasizukiMgr.TJSFuncIsKasizukiCorrectSenarioFlag(tjs_param, result);
  2735. }
  2736. public void TJSFuncIsVRKaraokeMode(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2737. {
  2738. if (result == null)
  2739. {
  2740. NDebug.Assert("error IsVRKaraokeMode", false);
  2741. }
  2742. result.SetInteger((!SceneVRCommunication.Instance.KaraokeMode) ? 0 : 1);
  2743. }
  2744. public void TJSFuncGetGameMode(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2745. {
  2746. result.SetString(GameModeManager.nowGameMode.ToString());
  2747. }
  2748. public void TJSFuncIsLifeMode(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2749. {
  2750. result.SetBool(GameModeManager.nowGameMode == GameModeManager.Type.LifeMode);
  2751. }
  2752. public void TJSFuncGetRemainingDanceTime(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2753. {
  2754. if (result == null)
  2755. {
  2756. NDebug.Assert("error GetRemainingDanceTime", false);
  2757. }
  2758. float num;
  2759. if (RhythmAction_Mgr.Instance != null)
  2760. {
  2761. num = RhythmAction_Mgr.Instance.RemainingTime;
  2762. }
  2763. else
  2764. {
  2765. string message = "リズムアクションマネージャのインスタンスが見つかりません。-1を返します。";
  2766. Debug.LogWarning(message);
  2767. num = -0.001f;
  2768. }
  2769. result.SetInteger(Mathf.RoundToInt(num * 1000f));
  2770. }
  2771. public void TJSFuncGetYotogiCommandClickCount(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2772. {
  2773. if (result == null)
  2774. {
  2775. NDebug.Assert("error GetYotogiCommandClickCount", false);
  2776. }
  2777. NDebug.Assert(tjs_param.Length == 2, "GetYotogiCommandClickCount:引数が2つ必要です");
  2778. string text = tjs_param[0].AsString();
  2779. bool flag = tjs_param[1].AsBool();
  2780. result.SetInteger(0);
  2781. if (YotogiManager.instans == null || YotogiManager.instans.play_mgr == null || string.IsNullOrEmpty(text))
  2782. {
  2783. return;
  2784. }
  2785. Dictionary<string, int> dictionary = (!flag) ? YotogiManager.instans.play_mgr.commandClickCountSingle : YotogiManager.instans.play_mgr.commandClickCountTotal;
  2786. int integer = 0;
  2787. dictionary.TryGetValue(text, out integer);
  2788. result.SetInteger(integer);
  2789. }
  2790. public void TJSFuncSetYotogiStage(TJSVariantRef[] tjs_param, TJSVariantRef result)
  2791. {
  2792. NDebug.Assert(1 <= tjs_param.Length && tjs_param.Length <= 2, "SetYotogiStage:引数が1つ,もしくは2つである必要があります");
  2793. YotogiStage.Data data = YotogiStage.GetData(tjs_param[0].AsString());
  2794. bool isDayTime = GameMain.Instance.CharacterMgr.status.isDaytime;
  2795. if (tjs_param.Length == 2)
  2796. {
  2797. isDayTime = tjs_param[1].AsBool();
  2798. }
  2799. YotogiStageSelectManager.SelectStage(data, isDayTime);
  2800. }
  2801. public void OnReturnEvent(string fileName, int line)
  2802. {
  2803. if (this.compatibilityMode)
  2804. {
  2805. KagScript kag = this.adv_kag.kag;
  2806. int num = kag.callStackDepth - 1;
  2807. int r_callStackDepth = kag.r_callStackDepth;
  2808. if (this.compatibilityCallStackDepth == num && this.compatibilityRCallStackDepth == r_callStackDepth)
  2809. {
  2810. this.compatibilityMode = false;
  2811. }
  2812. }
  2813. }
  2814. public void OnRReturnEvent(string fileName, string labelName)
  2815. {
  2816. if (this.compatibilityMode)
  2817. {
  2818. KagScript kag = this.adv_kag.kag;
  2819. int callStackDepth = kag.callStackDepth;
  2820. int num = kag.r_callStackDepth - 1;
  2821. if (this.compatibilityCallStackDepth == callStackDepth && this.compatibilityRCallStackDepth == num)
  2822. {
  2823. this.compatibilityMode = false;
  2824. }
  2825. }
  2826. }
  2827. public void Dispose()
  2828. {
  2829. this.Dispose(true);
  2830. GC.SuppressFinalize(this);
  2831. }
  2832. protected void Dispose(bool is_release_managed_code)
  2833. {
  2834. if (this.is_disposed_)
  2835. {
  2836. return;
  2837. }
  2838. foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
  2839. {
  2840. keyValuePair.Value.Dispose();
  2841. }
  2842. this.kag_mot_dic_.Clear();
  2843. if (this.adv_kag_ != null)
  2844. {
  2845. this.adv_kag_.Dispose();
  2846. }
  2847. if (this.yotogi_kag_ != null)
  2848. {
  2849. this.yotogi_kag_.Dispose();
  2850. }
  2851. if (this.tmp_kag_ != null)
  2852. {
  2853. this.tmp_kag_.Dispose();
  2854. }
  2855. if (this.tjs_ != null)
  2856. {
  2857. this.tjs_.Dispose();
  2858. }
  2859. this.is_disposed_ = true;
  2860. }
  2861. public void Serialize(BinaryWriter binary)
  2862. {
  2863. binary.Write("CM3D2_SCRIPT");
  2864. binary.Write(1210);
  2865. this.adv_kag_.Serialize(binary);
  2866. }
  2867. public void Deserialize(BinaryReader binary)
  2868. {
  2869. this.compatibilityMode = false;
  2870. string a = binary.ReadString();
  2871. NDebug.Assert(a == "CM3D2_SCRIPT", "SCRIPTのヘッダーが不正です。");
  2872. int num = binary.ReadInt32();
  2873. this.adv_kag_.Deserialize(binary);
  2874. this.yotogi_kag_.Dispose();
  2875. this.yotogi_kag_ = new YotogiKagManager(this.tjs_, this);
  2876. this.yotogi_kag_.Initialize();
  2877. foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
  2878. {
  2879. keyValuePair.Value.Dispose();
  2880. }
  2881. this.kag_mot_dic_.Clear();
  2882. MotionKagManager motionKagManager = new MotionKagManager(this.tjs_, this);
  2883. motionKagManager.Initialize();
  2884. motionKagManager.SetSloatNo(0);
  2885. this.kag_mot_dic_.Add(0, motionKagManager);
  2886. this.ExecScript("global.tf = new Dictionary();");
  2887. SubtitleMovieManager.DestroyGlobalInstance();
  2888. }
  2889. public bool compatibilityMode
  2890. {
  2891. get
  2892. {
  2893. return this.compatibilityMode_;
  2894. }
  2895. set
  2896. {
  2897. this.compatibilityMode_ = value;
  2898. if (this.adv_kag_ != null && this.adv_kag_.kag != null)
  2899. {
  2900. this.adv_kag_.kag.SetFileSystem(this.file_system);
  2901. }
  2902. foreach (KeyValuePair<int, MotionKagManager> keyValuePair in this.kag_mot_dic_)
  2903. {
  2904. keyValuePair.Value.kag.SetFileSystem(this.file_system);
  2905. }
  2906. if (this.yotogi_kag_ != null && this.yotogi_kag_.kag != null)
  2907. {
  2908. this.yotogi_kag_.kag.SetFileSystem(this.file_system);
  2909. }
  2910. if (GameMain.Instance.SoundMgr != null)
  2911. {
  2912. GameMain.Instance.SoundMgr.compatibilityMode = value;
  2913. }
  2914. this.StopMotionScript();
  2915. }
  2916. }
  2917. public bool tjsLegacyMode
  2918. {
  2919. get
  2920. {
  2921. return DailyMgr.IsLegacy;
  2922. }
  2923. }
  2924. public bool is_motion_all_prop_seq { get; set; }
  2925. public Maid motion_all_prop_seq_maid { get; set; }
  2926. public bool is_motion_blend { get; set; }
  2927. public TJSScript tjs
  2928. {
  2929. get
  2930. {
  2931. return this.tjs_;
  2932. }
  2933. }
  2934. public ADVKagManager adv_kag
  2935. {
  2936. get
  2937. {
  2938. return this.adv_kag_;
  2939. }
  2940. }
  2941. public YotogiKagManager yotogi_kag
  2942. {
  2943. get
  2944. {
  2945. return this.yotogi_kag_;
  2946. }
  2947. }
  2948. public BaseKagManager tmp_kag
  2949. {
  2950. get
  2951. {
  2952. return this.tmp_kag_;
  2953. }
  2954. }
  2955. public Dictionary<int, MotionKagManager> kag_mot_dic
  2956. {
  2957. get
  2958. {
  2959. return this.kag_mot_dic_;
  2960. }
  2961. }
  2962. public AFileSystemBase file_system
  2963. {
  2964. get
  2965. {
  2966. return (!this.compatibilityMode) ? GameUty.FileSystem : GameUty.FileSystemOld;
  2967. }
  2968. }
  2969. private TJSScript tjs_;
  2970. private Dictionary<int, MotionKagManager> kag_mot_dic_ = new Dictionary<int, MotionKagManager>();
  2971. private ADVKagManager adv_kag_;
  2972. private YotogiKagManager yotogi_kag_;
  2973. private BaseKagManager tmp_kag_;
  2974. private MessageWindowMgr message_mgr_;
  2975. private bool is_disposed_;
  2976. private string debug_yotogi_stage_;
  2977. private bool compatibilityMode_;
  2978. private List<Maid> stock_maid_loop_list = new List<Maid>();
  2979. private int compatibilityCallStackDepth;
  2980. private int compatibilityRCallStackDepth;
  2981. [CompilerGenerated]
  2982. private static Comparison<Maid> <>f__mg$cache0;
  2983. }