CastPreviewHelper.cs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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. return CastPreviewHelper.PartsDetailType.目;
  60. case MPN.eye_hi:
  61. return CastPreviewHelper.PartsDetailType.目ハイライト;
  62. case MPN.wear:
  63. return CastPreviewHelper.PartsDetailType.トップス;
  64. case MPN.skirt:
  65. return CastPreviewHelper.PartsDetailType.ボトムス;
  66. case MPN.mizugi:
  67. return CastPreviewHelper.PartsDetailType.水着;
  68. case MPN.stkg:
  69. return CastPreviewHelper.PartsDetailType.靴下;
  70. case MPN.shoes:
  71. return CastPreviewHelper.PartsDetailType.靴;
  72. case MPN.headset:
  73. return CastPreviewHelper.PartsDetailType.ヘッドドレス;
  74. case MPN.glove:
  75. return CastPreviewHelper.PartsDetailType.手袋;
  76. case MPN.acchead:
  77. return CastPreviewHelper.PartsDetailType.アイマスク;
  78. case MPN.accha:
  79. return CastPreviewHelper.PartsDetailType.歯;
  80. case MPN.acchana:
  81. return CastPreviewHelper.PartsDetailType.鼻アクセ;
  82. case MPN.acckamisub:
  83. return CastPreviewHelper.PartsDetailType.リボン;
  84. case MPN.acckami:
  85. return CastPreviewHelper.PartsDetailType.前髪アクセ;
  86. case MPN.accmimi:
  87. return CastPreviewHelper.PartsDetailType.耳アクセ;
  88. case MPN.acckubi:
  89. return CastPreviewHelper.PartsDetailType.ネックレス;
  90. case MPN.acckubiwa:
  91. return CastPreviewHelper.PartsDetailType.チョ\u30FCカ\u30FC;
  92. case MPN.accheso:
  93. return CastPreviewHelper.PartsDetailType.へそアクセ;
  94. case MPN.accude:
  95. return CastPreviewHelper.PartsDetailType.腕アクセ;
  96. case MPN.accashi:
  97. return CastPreviewHelper.PartsDetailType.足首アクセ;
  98. case MPN.accsenaka:
  99. return CastPreviewHelper.PartsDetailType.背中アクセ;
  100. case MPN.accshippo:
  101. return CastPreviewHelper.PartsDetailType.尻尾;
  102. case MPN.megane:
  103. return CastPreviewHelper.PartsDetailType.メガネ;
  104. case MPN.acchat:
  105. return CastPreviewHelper.PartsDetailType.帽子;
  106. case MPN.onepiece:
  107. return CastPreviewHelper.PartsDetailType.ワンピ\u30FCス;
  108. case MPN.set_maidwear:
  109. return CastPreviewHelper.PartsDetailType.メイド服セット;
  110. case MPN.set_mywear:
  111. return CastPreviewHelper.PartsDetailType.私服セット;
  112. }
  113. return CastPreviewHelper.PartsDetailType.なし;
  114. }
  115. public static void SetPartsType(MPN mpn, ref CastPreviewHelper.PartsRoughType rough_type, ref CastPreviewHelper.PartsDetailType detail_type)
  116. {
  117. rough_type = CastPreviewHelper.MPNToPartsRoughType(mpn);
  118. detail_type = CastPreviewHelper.MPNToPartsDetailType(mpn);
  119. }
  120. public static void SetPartsType(string mpn, ref CastPreviewHelper.PartsRoughType rough_type, ref CastPreviewHelper.PartsDetailType detail_type)
  121. {
  122. rough_type = CastPreviewHelper.MPNToPartsRoughType(mpn);
  123. detail_type = CastPreviewHelper.MPNToPartsDetailType(mpn);
  124. }
  125. public enum PartsRoughType
  126. {
  127. セット系,
  128. 髪系,
  129. その他単品系
  130. }
  131. public enum PartsDetailType
  132. {
  133. 顔,
  134. 目,
  135. 目ハイライト,
  136. 眉,
  137. ほくろ,
  138. 唇,
  139. 歯,
  140. 前髪,
  141. 後髪,
  142. 横髪,
  143. エクステ髪,
  144. アホ毛,
  145. 肌,
  146. タトゥ\u30FC,
  147. 帽子,
  148. ヘッドドレス,
  149. トップス,
  150. ボトムス,
  151. ワンピ\u30FCス,
  152. 水着,
  153. 靴下,
  154. 靴,
  155. 前髪アクセ,
  156. メガネ,
  157. アイマスク,
  158. 鼻アクセ,
  159. 耳アクセ,
  160. 手袋,
  161. ネックレス,
  162. リボン,
  163. 腕アクセ,
  164. へそアクセ,
  165. 足首アクセ,
  166. 背中アクセ,
  167. 尻尾,
  168. チョ\u30FCカ\u30FC,
  169. ヘアカラ\u30FC,
  170. 私服セット,
  171. メイド服セット,
  172. ネイル,
  173. なし
  174. }
  175. }