AnimaInscriptionHandler.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. /*-----------------------------------------------
  2. *本文件由代码生成器自动生成,
  3. *千万不要修改本文件的任何代码,
  4. *修改的的任何代码都会被覆盖掉!
  5. --------------------------------------------------*/
  6. using System.IO;
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Linq;
  10. using System.Text;
  11. using Pomelo.DotNetClient;
  12. namespace pomelo.area
  13. {
  14. public class AnimaInscriptionHandler
  15. {
  16. private PomeloClient _socket;
  17. public AnimaInfoResponse lastAnimaInfoResponse { get { return _socket.GetLastResponse<AnimaInfoResponse>(); } }
  18. public AnimaUpgradeResponse lastAnimaUpgradeResponse { get { return _socket.GetLastResponse<AnimaUpgradeResponse>(); } }
  19. public AnimaLuckyResponse lastAnimaLuckyResponse { get { return _socket.GetLastResponse<AnimaLuckyResponse>(); } }
  20. public AnimaInscriptionInfoResponse lastAnimaInscriptionInfoResponse { get { return _socket.GetLastResponse<AnimaInscriptionInfoResponse>(); } }
  21. public AnimaInscriptionUpgradeResponse lastAnimaInscriptionUpgradeResponse { get { return _socket.GetLastResponse<AnimaInscriptionUpgradeResponse>(); } }
  22. public AnimaInscriptionEquipResponse lastAnimaInscriptionEquipResponse { get { return _socket.GetLastResponse<AnimaInscriptionEquipResponse>(); } }
  23. public AnimaInscriptionDownResponse lastAnimaInscriptionDownResponse { get { return _socket.GetLastResponse<AnimaInscriptionDownResponse>(); } }
  24. public AnimaInscriptionUpgradeOneKeyResponse lastAnimaInscriptionUpgradeOneKeyResponse { get { return _socket.GetLastResponse<AnimaInscriptionUpgradeOneKeyResponse>(); } }
  25. public AnimaSevenStarResponse lastAnimaSevenStarResponse { get { return _socket.GetLastResponse<AnimaSevenStarResponse>(); } }
  26. public AnimaLingZhuInfoResponse lastAnimaLingZhuInfoResponse { get { return _socket.GetLastResponse<AnimaLingZhuInfoResponse>(); } }
  27. public AnimaLingZhuUpgradeResponse lastAnimaLingZhuUpgradeResponse { get { return _socket.GetLastResponse<AnimaLingZhuUpgradeResponse>(); } }
  28. public AnimaGongFaInfoResponse lastAnimaGongFaInfoResponse { get { return _socket.GetLastResponse<AnimaGongFaInfoResponse>(); } }
  29. public AnimaGongFaStudyResponse lastAnimaGongFaStudyResponse { get { return _socket.GetLastResponse<AnimaGongFaStudyResponse>(); } }
  30. public AnimaGongFaUpgradeResponse lastAnimaGongFaUpgradeResponse { get { return _socket.GetLastResponse<AnimaGongFaUpgradeResponse>(); } }
  31. static AnimaInscriptionHandler()
  32. {
  33. EventTypes.RegistRequestType("area.animaInscriptionHandler.animaInfoRequest", typeof(AnimaInfoRequest), typeof(AnimaInfoResponse));
  34. EventTypes.RegistRequestType("area.animaInscriptionHandler.animaUpgradeRequest", typeof(AnimaUpgradeRequest), typeof(AnimaUpgradeResponse));
  35. EventTypes.RegistRequestType("area.animaInscriptionHandler.animaLuckyRequest", typeof(AnimaLuckyRequest), typeof(AnimaLuckyResponse));
  36. EventTypes.RegistRequestType("area.animaInscriptionHandler.animaInscriptionInfoRequest", typeof(AnimaInscriptionInfoRequest), typeof(AnimaInscriptionInfoResponse));
  37. EventTypes.RegistRequestType("area.animaInscriptionHandler.animaInscriptionUpgradeRequest", typeof(AnimaInscriptionUpgradeRequest), typeof(AnimaInscriptionUpgradeResponse));
  38. EventTypes.RegistRequestType("area.animaInscriptionHandler.animaInscriptionEquipRequest", typeof(AnimaInscriptionEquipRequest), typeof(AnimaInscriptionEquipResponse));
  39. EventTypes.RegistRequestType("area.animaInscriptionHandler.animaInscriptionDownRequest", typeof(AnimaInscriptionDownRequest), typeof(AnimaInscriptionDownResponse));
  40. EventTypes.RegistRequestType("area.animaInscriptionHandler.animaInscriptionUpgradeOneKeyRequest", typeof(AnimaInscriptionUpgradeOneKeyRequest), typeof(AnimaInscriptionUpgradeOneKeyResponse));
  41. EventTypes.RegistRequestType("area.animaInscriptionHandler.animaSevenStarRequest", typeof(AnimaSevenStarRequest), typeof(AnimaSevenStarResponse));
  42. EventTypes.RegistRequestType("area.animaInscriptionHandler.animaLingZhuInfoRequest", typeof(AnimaLingZhuInfoRequest), typeof(AnimaLingZhuInfoResponse));
  43. EventTypes.RegistRequestType("area.animaInscriptionHandler.animaLingZhuUpgradeRequest", typeof(AnimaLingZhuUpgradeRequest), typeof(AnimaLingZhuUpgradeResponse));
  44. EventTypes.RegistRequestType("area.animaInscriptionHandler.animaGongFaInfoRequest", typeof(AnimaGongFaInfoRequest), typeof(AnimaGongFaInfoResponse));
  45. EventTypes.RegistRequestType("area.animaInscriptionHandler.animaGongFaStudyRequest", typeof(AnimaGongFaStudyRequest), typeof(AnimaGongFaStudyResponse));
  46. EventTypes.RegistRequestType("area.animaInscriptionHandler.animaGongFaUpgradeRequest", typeof(AnimaGongFaUpgradeRequest), typeof(AnimaGongFaUpgradeResponse));
  47. }
  48. public AnimaInscriptionHandler(PomeloClient socket)
  49. {
  50. this._socket = socket;
  51. }
  52. public void animaInfoRequest(Action<PomeloException,AnimaInfoResponse> cb,object option = null)
  53. {
  54. var request = new AnimaInfoRequest();
  55. _socket.request<AnimaInfoResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  56. var rsp = msg as AnimaInfoResponse;
  57. s2c_code = rsp.s2c_code;
  58. s2c_msg = rsp.s2c_msg;
  59. return s2c_code == 200;
  60. }, cb, option);
  61. }
  62. public void animaUpgradeRequest(Action<PomeloException,AnimaUpgradeResponse> cb,object option = null)
  63. {
  64. var request = new AnimaUpgradeRequest();
  65. _socket.request<AnimaUpgradeResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  66. var rsp = msg as AnimaUpgradeResponse;
  67. s2c_code = rsp.s2c_code;
  68. s2c_msg = rsp.s2c_msg;
  69. return s2c_code == 200;
  70. }, cb, option);
  71. }
  72. public void animaLuckyRequest(Action<PomeloException,AnimaLuckyResponse> cb,object option = null)
  73. {
  74. var request = new AnimaLuckyRequest();
  75. _socket.request<AnimaLuckyResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  76. var rsp = msg as AnimaLuckyResponse;
  77. s2c_code = rsp.s2c_code;
  78. s2c_msg = rsp.s2c_msg;
  79. return s2c_code == 200;
  80. }, cb, option);
  81. }
  82. public void animaInscriptionInfoRequest(Action<PomeloException,AnimaInscriptionInfoResponse> cb,object option = null)
  83. {
  84. var request = new AnimaInscriptionInfoRequest();
  85. _socket.request<AnimaInscriptionInfoResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  86. var rsp = msg as AnimaInscriptionInfoResponse;
  87. s2c_code = rsp.s2c_code;
  88. s2c_msg = rsp.s2c_msg;
  89. return s2c_code == 200;
  90. }, cb, option);
  91. }
  92. public void animaInscriptionUpgradeRequest(string code,List<pomelo.area.AnimaUpgradeReqInfo> destroyedInfo,Action<PomeloException,AnimaInscriptionUpgradeResponse> cb,object option = null)
  93. {
  94. var request = new AnimaInscriptionUpgradeRequest();
  95. request.code= code;
  96. request.destroyedInfo.AddRange(destroyedInfo);
  97. _socket.request<AnimaInscriptionUpgradeResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  98. var rsp = msg as AnimaInscriptionUpgradeResponse;
  99. s2c_code = rsp.s2c_code;
  100. s2c_msg = rsp.s2c_msg;
  101. return s2c_code == 200;
  102. }, cb, option);
  103. }
  104. public void animaInscriptionEquipRequest(int equipIndex,int girdIndex,Action<PomeloException,AnimaInscriptionEquipResponse> cb,object option = null)
  105. {
  106. var request = new AnimaInscriptionEquipRequest();
  107. request.equipIndex= equipIndex;
  108. request.girdIndex= girdIndex;
  109. _socket.request<AnimaInscriptionEquipResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  110. var rsp = msg as AnimaInscriptionEquipResponse;
  111. s2c_code = rsp.s2c_code;
  112. s2c_msg = rsp.s2c_msg;
  113. return s2c_code == 200;
  114. }, cb, option);
  115. }
  116. public void animaInscriptionDownRequest(int equipIndex,Action<PomeloException,AnimaInscriptionDownResponse> cb,object option = null)
  117. {
  118. var request = new AnimaInscriptionDownRequest();
  119. request.equipIndex= equipIndex;
  120. _socket.request<AnimaInscriptionDownResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  121. var rsp = msg as AnimaInscriptionDownResponse;
  122. s2c_code = rsp.s2c_code;
  123. s2c_msg = rsp.s2c_msg;
  124. return s2c_code == 200;
  125. }, cb, option);
  126. }
  127. public void animaInscriptionUpgradeOneKeyRequest(string code,Action<PomeloException,AnimaInscriptionUpgradeOneKeyResponse> cb,object option = null)
  128. {
  129. var request = new AnimaInscriptionUpgradeOneKeyRequest();
  130. request.code= code;
  131. _socket.request<AnimaInscriptionUpgradeOneKeyResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  132. var rsp = msg as AnimaInscriptionUpgradeOneKeyResponse;
  133. s2c_code = rsp.s2c_code;
  134. s2c_msg = rsp.s2c_msg;
  135. return s2c_code == 200;
  136. }, cb, option);
  137. }
  138. public void animaSevenStarRequest(Action<PomeloException,AnimaSevenStarResponse> cb,object option = null)
  139. {
  140. var request = new AnimaSevenStarRequest();
  141. _socket.request<AnimaSevenStarResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  142. var rsp = msg as AnimaSevenStarResponse;
  143. s2c_code = rsp.s2c_code;
  144. s2c_msg = rsp.s2c_msg;
  145. return s2c_code == 200;
  146. }, cb, option);
  147. }
  148. public void animaLingZhuInfoRequest(Action<PomeloException,AnimaLingZhuInfoResponse> cb,object option = null)
  149. {
  150. var request = new AnimaLingZhuInfoRequest();
  151. _socket.request<AnimaLingZhuInfoResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  152. var rsp = msg as AnimaLingZhuInfoResponse;
  153. s2c_code = rsp.s2c_code;
  154. s2c_msg = rsp.s2c_msg;
  155. return s2c_code == 200;
  156. }, cb, option);
  157. }
  158. public void animaLingZhuUpgradeRequest(int zhu_index,Action<PomeloException,AnimaLingZhuUpgradeResponse> cb,object option = null)
  159. {
  160. var request = new AnimaLingZhuUpgradeRequest();
  161. request.zhu_index= zhu_index;
  162. _socket.request<AnimaLingZhuUpgradeResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  163. var rsp = msg as AnimaLingZhuUpgradeResponse;
  164. s2c_code = rsp.s2c_code;
  165. s2c_msg = rsp.s2c_msg;
  166. return s2c_code == 200;
  167. }, cb, option);
  168. }
  169. public void animaGongFaInfoRequest(int index,Action<PomeloException,AnimaGongFaInfoResponse> cb,object option = null)
  170. {
  171. var request = new AnimaGongFaInfoRequest();
  172. request.index= index;
  173. _socket.request<AnimaGongFaInfoResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  174. var rsp = msg as AnimaGongFaInfoResponse;
  175. s2c_code = rsp.s2c_code;
  176. s2c_msg = rsp.s2c_msg;
  177. return s2c_code == 200;
  178. }, cb, option);
  179. }
  180. public void animaGongFaStudyRequest(int gong_index,int bag_pos,Action<PomeloException,AnimaGongFaStudyResponse> cb,object option = null)
  181. {
  182. var request = new AnimaGongFaStudyRequest();
  183. request.gong_index= gong_index;
  184. request.bag_pos= bag_pos;
  185. _socket.request<AnimaGongFaStudyResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  186. var rsp = msg as AnimaGongFaStudyResponse;
  187. s2c_code = rsp.s2c_code;
  188. s2c_msg = rsp.s2c_msg;
  189. return s2c_code == 200;
  190. }, cb, option);
  191. }
  192. public void animaGongFaUpgradeRequest(string gpid,Action<PomeloException,AnimaGongFaUpgradeResponse> cb,object option = null)
  193. {
  194. var request = new AnimaGongFaUpgradeRequest();
  195. request.gpid= gpid;
  196. _socket.request<AnimaGongFaUpgradeResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  197. var rsp = msg as AnimaGongFaUpgradeResponse;
  198. s2c_code = rsp.s2c_code;
  199. s2c_msg = rsp.s2c_msg;
  200. return s2c_code == 200;
  201. }, cb, option);
  202. }
  203. }
  204. }