CastPreviewHelper.cs 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. using System;
  2. public class CastPreviewHelper
  3. {
  4. public static CastPreviewHelper.PartsRoughType MPNToPartsRoughType(string mpn)
  5. {
  6. return CastPreviewHelper.MPNToPartsRoughType((MPN)Enum.Parse(typeof(MPN), mpn));
  7. }
  8. public static CastPreviewHelper.PartsRoughType MPNToPartsRoughType(MPN mpn)
  9. {
  10. switch (mpn)
  11. {
  12. case MPN.hairf:
  13. case MPN.hairr:
  14. case MPN.hairt:
  15. case MPN.hairs:
  16. case MPN.hairaho:
  17. return CastPreviewHelper.PartsRoughType.髪系;
  18. default:
  19. if (mpn != MPN.set_maidwear && mpn != MPN.set_mywear)
  20. {
  21. return CastPreviewHelper.PartsRoughType.その他単品系;
  22. }
  23. return CastPreviewHelper.PartsRoughType.セット系;
  24. }
  25. }
  26. public static CastPreviewHelper.PartsDetailType MPNToPartsDetailType(string mpn)
  27. {
  28. return CastPreviewHelper.MPNToPartsDetailType((MPN)Enum.Parse(typeof(MPN), mpn));
  29. }
  30. public static CastPreviewHelper.PartsDetailType MPNToPartsDetailType(MPN mpn)
  31. {
  32. switch (mpn)
  33. {
  34. case MPN.head:
  35. return CastPreviewHelper.PartsDetailType.顔;
  36. case MPN.hairf:
  37. return CastPreviewHelper.PartsDetailType.前髪;
  38. case MPN.hairr:
  39. return CastPreviewHelper.PartsDetailType.後髪;
  40. case MPN.hairt:
  41. return CastPreviewHelper.PartsDetailType.エクステ髪;
  42. case MPN.hairs:
  43. return CastPreviewHelper.PartsDetailType.横髪;
  44. case MPN.hairaho:
  45. return CastPreviewHelper.PartsDetailType.アホ毛;
  46. case MPN.skin:
  47. return CastPreviewHelper.PartsDetailType.肌;
  48. case MPN.acctatoo:
  49. return CastPreviewHelper.PartsDetailType.タトゥ\u30FC;
  50. case MPN.accnail:
  51. return CastPreviewHelper.PartsDetailType.ネイル;
  52. case MPN.hokuro:
  53. return CastPreviewHelper.PartsDetailType.ほくろ;
  54. case MPN.mayu:
  55. return CastPreviewHelper.PartsDetailType.眉;
  56. case MPN.lip:
  57. return CastPreviewHelper.PartsDetailType.唇;
  58. case MPN.eye:
  59. case MPN.folder_eye:
  60. case MPN.folder_eyewhite:
  61. return CastPreviewHelper.PartsDetailType.目;
  62. case MPN.eye_hi:
  63. case MPN.eye_hi_r:
  64. return CastPreviewHelper.PartsDetailType.目ハイライト;
  65. case MPN.wear:
  66. return CastPreviewHelper.PartsDetailType.トップス;
  67. case MPN.skirt:
  68. return CastPreviewHelper.PartsDetailType.ボトムス;
  69. case MPN.mizugi:
  70. return CastPreviewHelper.PartsDetailType.水着;
  71. case MPN.stkg:
  72. return CastPreviewHelper.PartsDetailType.靴下;
  73. case MPN.shoes:
  74. return CastPreviewHelper.PartsDetailType.靴;
  75. case MPN.headset:
  76. return CastPreviewHelper.PartsDetailType.ヘッドドレス;
  77. case MPN.glove:
  78. return CastPreviewHelper.PartsDetailType.手袋;
  79. case MPN.acchead:
  80. return CastPreviewHelper.PartsDetailType.アイマスク;
  81. case MPN.accha:
  82. return CastPreviewHelper.PartsDetailType.歯;
  83. case MPN.acchana:
  84. return CastPreviewHelper.PartsDetailType.鼻アクセ;
  85. case MPN.acckamisub:
  86. return CastPreviewHelper.PartsDetailType.リボン;
  87. case MPN.acckami:
  88. return CastPreviewHelper.PartsDetailType.前髪アクセ;
  89. case MPN.accmimi:
  90. return CastPreviewHelper.PartsDetailType.耳アクセ;
  91. case MPN.acckubi:
  92. return CastPreviewHelper.PartsDetailType.ネックレス;
  93. case MPN.acckubiwa:
  94. return CastPreviewHelper.PartsDetailType.チョ\u30FCカ\u30FC;
  95. case MPN.accheso:
  96. return CastPreviewHelper.PartsDetailType.へそアクセ;
  97. case MPN.accude:
  98. return CastPreviewHelper.PartsDetailType.腕アクセ;
  99. case MPN.accashi:
  100. return CastPreviewHelper.PartsDetailType.足首アクセ;
  101. case MPN.accsenaka:
  102. return CastPreviewHelper.PartsDetailType.背中アクセ;
  103. case MPN.accshippo:
  104. return CastPreviewHelper.PartsDetailType.尻尾;
  105. case MPN.megane:
  106. return CastPreviewHelper.PartsDetailType.メガネ;
  107. case MPN.acchat:
  108. return CastPreviewHelper.PartsDetailType.帽子;
  109. case MPN.onepiece:
  110. return CastPreviewHelper.PartsDetailType.ワンピ\u30FCス;
  111. case MPN.set_maidwear:
  112. return CastPreviewHelper.PartsDetailType.メイド服セット;
  113. case MPN.set_mywear:
  114. return CastPreviewHelper.PartsDetailType.私服セット;
  115. }
  116. return CastPreviewHelper.PartsDetailType.なし;
  117. }
  118. public static void SetPartsType(MPN mpn, ref CastPreviewHelper.PartsRoughType rough_type, ref CastPreviewHelper.PartsDetailType detail_type)
  119. {
  120. rough_type = CastPreviewHelper.MPNToPartsRoughType(mpn);
  121. detail_type = CastPreviewHelper.MPNToPartsDetailType(mpn);
  122. }
  123. public static void SetPartsType(string mpn, ref CastPreviewHelper.PartsRoughType rough_type, ref CastPreviewHelper.PartsDetailType detail_type)
  124. {
  125. rough_type = CastPreviewHelper.MPNToPartsRoughType(mpn);
  126. detail_type = CastPreviewHelper.MPNToPartsDetailType(mpn);
  127. }
  128. public enum PartsRoughType
  129. {
  130. セット系,
  131. 髪系,
  132. その他単品系
  133. }
  134. public enum PartsDetailType
  135. {
  136. 顔,
  137. 目,
  138. 目ハイライト,
  139. 眉,
  140. ほくろ,
  141. 唇,
  142. 歯,
  143. 前髪,
  144. 後髪,
  145. 横髪,
  146. エクステ髪,
  147. アホ毛,
  148. 肌,
  149. タトゥ\u30FC,
  150. 帽子,
  151. ヘッドドレス,
  152. トップス,
  153. ボトムス,
  154. ワンピ\u30FCス,
  155. 水着,
  156. 靴下,
  157. 靴,
  158. 前髪アクセ,
  159. メガネ,
  160. アイマスク,
  161. 鼻アクセ,
  162. 耳アクセ,
  163. 手袋,
  164. ネックレス,
  165. リボン,
  166. 腕アクセ,
  167. へそアクセ,
  168. 足首アクセ,
  169. 背中アクセ,
  170. 尻尾,
  171. チョ\u30FCカ\u30FC,
  172. ヘアカラ\u30FC,
  173. 私服セット,
  174. メイド服セット,
  175. ネイル,
  176. なし
  177. }
  178. }