GuildFortHandler.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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 GuildFortHandler
  15. {
  16. private PomeloClient _socket;
  17. public GetGuildAreaListResponse lastGetGuildAreaListResponse { get { return _socket.GetLastResponse<GetGuildAreaListResponse>(); } }
  18. public GetGuildAreaDetailResponse lastGetGuildAreaDetailResponse { get { return _socket.GetLastResponse<GetGuildAreaDetailResponse>(); } }
  19. public GetGuildAreaApplyListResponse lastGetGuildAreaApplyListResponse { get { return _socket.GetLastResponse<GetGuildAreaApplyListResponse>(); } }
  20. public ApplyGuildFundResponse lastApplyGuildFundResponse { get { return _socket.GetLastResponse<ApplyGuildFundResponse>(); } }
  21. public ApplyFundResponse lastApplyFundResponse { get { return _socket.GetLastResponse<ApplyFundResponse>(); } }
  22. public ApplyCancelFundResponse lastApplyCancelFundResponse { get { return _socket.GetLastResponse<ApplyCancelFundResponse>(); } }
  23. public ApplyDailyAwardListResponse lastApplyDailyAwardListResponse { get { return _socket.GetLastResponse<ApplyDailyAwardListResponse>(); } }
  24. public ApplyDailyAwardResponse lastApplyDailyAwardResponse { get { return _socket.GetLastResponse<ApplyDailyAwardResponse>(); } }
  25. public ApplyAccessResponse lastApplyAccessResponse { get { return _socket.GetLastResponse<ApplyAccessResponse>(); } }
  26. public ApplyFortGuildInfoResponse lastApplyFortGuildInfoResponse { get { return _socket.GetLastResponse<ApplyFortGuildInfoResponse>(); } }
  27. public ApplyAllReportListResponse lastApplyAllReportListResponse { get { return _socket.GetLastResponse<ApplyAllReportListResponse>(); } }
  28. public ApplyReportDetailResponse lastApplyReportDetailResponse { get { return _socket.GetLastResponse<ApplyReportDetailResponse>(); } }
  29. public ApplyReportStatisticsResponse lastApplyReportStatisticsResponse { get { return _socket.GetLastResponse<ApplyReportStatisticsResponse>(); } }
  30. static GuildFortHandler()
  31. {
  32. EventTypes.RegistPushType("area.guildFortPush.onGuildFortPush", typeof(OnGuildFortPush));
  33. EventTypes.RegistPushType("area.guildFortPush.onGuildResultPush", typeof(OnGuildResultPush));
  34. EventTypes.RegistRequestType("area.guildFortHandler.getGuildAreaListRequest", typeof(GetGuildAreaListRequest), typeof(GetGuildAreaListResponse));
  35. EventTypes.RegistRequestType("area.guildFortHandler.getGuildAreaDetailRequest", typeof(GetGuildAreaDetailRequest), typeof(GetGuildAreaDetailResponse));
  36. EventTypes.RegistRequestType("area.guildFortHandler.getGuildAreaApplyListRequest", typeof(GetGuildAreaApplyListRequest), typeof(GetGuildAreaApplyListResponse));
  37. EventTypes.RegistRequestType("area.guildFortHandler.applyGuildFundRequest", typeof(ApplyGuildFundRequest), typeof(ApplyGuildFundResponse));
  38. EventTypes.RegistRequestType("area.guildFortHandler.applyFundRequest", typeof(ApplyFundRequest), typeof(ApplyFundResponse));
  39. EventTypes.RegistRequestType("area.guildFortHandler.applyCancelFundRequest", typeof(ApplyCancelFundRequest), typeof(ApplyCancelFundResponse));
  40. EventTypes.RegistRequestType("area.guildFortHandler.applyDailyAwardListRequest", typeof(ApplyDailyAwardListRequest), typeof(ApplyDailyAwardListResponse));
  41. EventTypes.RegistRequestType("area.guildFortHandler.applyDailyAwardRequest", typeof(ApplyDailyAwardRequest), typeof(ApplyDailyAwardResponse));
  42. EventTypes.RegistRequestType("area.guildFortHandler.applyAccessRequest", typeof(ApplyAccessRequest), typeof(ApplyAccessResponse));
  43. EventTypes.RegistRequestType("area.guildFortHandler.applyFortGuildInfoRequest", typeof(ApplyFortGuildInfoRequest), typeof(ApplyFortGuildInfoResponse));
  44. EventTypes.RegistRequestType("area.guildFortHandler.applyAllReportListRequest", typeof(ApplyAllReportListRequest), typeof(ApplyAllReportListResponse));
  45. EventTypes.RegistRequestType("area.guildFortHandler.applyReportDetailRequest", typeof(ApplyReportDetailRequest), typeof(ApplyReportDetailResponse));
  46. EventTypes.RegistRequestType("area.guildFortHandler.applyReportStatisticsRequest", typeof(ApplyReportStatisticsRequest), typeof(ApplyReportStatisticsResponse));
  47. }
  48. public GuildFortHandler(PomeloClient socket)
  49. {
  50. this._socket = socket;
  51. }
  52. public void getGuildAreaListRequest(Action<PomeloException,GetGuildAreaListResponse> cb,object option = null)
  53. {
  54. var request = new GetGuildAreaListRequest();
  55. _socket.request<GetGuildAreaListResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  56. var rsp = msg as GetGuildAreaListResponse;
  57. s2c_code = rsp.s2c_code;
  58. s2c_msg = rsp.s2c_msg;
  59. return s2c_code == 200;
  60. }, cb, option);
  61. }
  62. public void getGuildAreaDetailRequest(int areaId,Action<PomeloException,GetGuildAreaDetailResponse> cb,object option = null)
  63. {
  64. var request = new GetGuildAreaDetailRequest();
  65. request.areaId= areaId;
  66. _socket.request<GetGuildAreaDetailResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  67. var rsp = msg as GetGuildAreaDetailResponse;
  68. s2c_code = rsp.s2c_code;
  69. s2c_msg = rsp.s2c_msg;
  70. return s2c_code == 200;
  71. }, cb, option);
  72. }
  73. public void getGuildAreaApplyListRequest(int areaId,Action<PomeloException,GetGuildAreaApplyListResponse> cb,object option = null)
  74. {
  75. var request = new GetGuildAreaApplyListRequest();
  76. request.areaId= areaId;
  77. _socket.request<GetGuildAreaApplyListResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  78. var rsp = msg as GetGuildAreaApplyListResponse;
  79. s2c_code = rsp.s2c_code;
  80. s2c_msg = rsp.s2c_msg;
  81. return s2c_code == 200;
  82. }, cb, option);
  83. }
  84. public void applyGuildFundRequest(Action<PomeloException,ApplyGuildFundResponse> cb,object option = null)
  85. {
  86. var request = new ApplyGuildFundRequest();
  87. _socket.request<ApplyGuildFundResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  88. var rsp = msg as ApplyGuildFundResponse;
  89. s2c_code = rsp.s2c_code;
  90. s2c_msg = rsp.s2c_msg;
  91. return s2c_code == 200;
  92. }, cb, option);
  93. }
  94. public void applyFundRequest(int areaId,int applyFund,Action<PomeloException,ApplyFundResponse> cb,object option = null)
  95. {
  96. var request = new ApplyFundRequest();
  97. request.areaId= areaId;
  98. request.applyFund= applyFund;
  99. _socket.request<ApplyFundResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  100. var rsp = msg as ApplyFundResponse;
  101. s2c_code = rsp.s2c_code;
  102. s2c_msg = rsp.s2c_msg;
  103. return s2c_code == 200;
  104. }, cb, option);
  105. }
  106. public void applyCancelFundRequest(int areaId,Action<PomeloException,ApplyCancelFundResponse> cb,object option = null)
  107. {
  108. var request = new ApplyCancelFundRequest();
  109. request.areaId= areaId;
  110. _socket.request<ApplyCancelFundResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  111. var rsp = msg as ApplyCancelFundResponse;
  112. s2c_code = rsp.s2c_code;
  113. s2c_msg = rsp.s2c_msg;
  114. return s2c_code == 200;
  115. }, cb, option);
  116. }
  117. public void applyDailyAwardListRequest(Action<PomeloException,ApplyDailyAwardListResponse> cb,object option = null)
  118. {
  119. var request = new ApplyDailyAwardListRequest();
  120. _socket.request<ApplyDailyAwardListResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  121. var rsp = msg as ApplyDailyAwardListResponse;
  122. s2c_code = rsp.s2c_code;
  123. s2c_msg = rsp.s2c_msg;
  124. return s2c_code == 200;
  125. }, cb, option);
  126. }
  127. public void applyDailyAwardRequest(int areaId,Action<PomeloException,ApplyDailyAwardResponse> cb,object option = null)
  128. {
  129. var request = new ApplyDailyAwardRequest();
  130. request.areaId= areaId;
  131. _socket.request<ApplyDailyAwardResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  132. var rsp = msg as ApplyDailyAwardResponse;
  133. s2c_code = rsp.s2c_code;
  134. s2c_msg = rsp.s2c_msg;
  135. return s2c_code == 200;
  136. }, cb, option);
  137. }
  138. public void applyAccessRequest(int areaId,Action<PomeloException,ApplyAccessResponse> cb,object option = null)
  139. {
  140. var request = new ApplyAccessRequest();
  141. request.areaId= areaId;
  142. _socket.request<ApplyAccessResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  143. var rsp = msg as ApplyAccessResponse;
  144. s2c_code = rsp.s2c_code;
  145. s2c_msg = rsp.s2c_msg;
  146. return s2c_code == 200;
  147. }, cb, option);
  148. }
  149. public void applyFortGuildInfoRequest(Action<PomeloException,ApplyFortGuildInfoResponse> cb,object option = null)
  150. {
  151. var request = new ApplyFortGuildInfoRequest();
  152. _socket.request<ApplyFortGuildInfoResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  153. var rsp = msg as ApplyFortGuildInfoResponse;
  154. s2c_code = rsp.s2c_code;
  155. s2c_msg = rsp.s2c_msg;
  156. return s2c_code == 200;
  157. }, cb, option);
  158. }
  159. public void applyAllReportListRequest(Action<PomeloException,ApplyAllReportListResponse> cb,object option = null)
  160. {
  161. var request = new ApplyAllReportListRequest();
  162. _socket.request<ApplyAllReportListResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  163. var rsp = msg as ApplyAllReportListResponse;
  164. s2c_code = rsp.s2c_code;
  165. s2c_msg = rsp.s2c_msg;
  166. return s2c_code == 200;
  167. }, cb, option);
  168. }
  169. public void applyReportDetailRequest(string date,int areaId,Action<PomeloException,ApplyReportDetailResponse> cb,object option = null)
  170. {
  171. var request = new ApplyReportDetailRequest();
  172. request.date= date;
  173. request.areaId= areaId;
  174. _socket.request<ApplyReportDetailResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  175. var rsp = msg as ApplyReportDetailResponse;
  176. s2c_code = rsp.s2c_code;
  177. s2c_msg = rsp.s2c_msg;
  178. return s2c_code == 200;
  179. }, cb, option);
  180. }
  181. public void applyReportStatisticsRequest(string date,int areaId,string guildId,Action<PomeloException,ApplyReportStatisticsResponse> cb,object option = null)
  182. {
  183. var request = new ApplyReportStatisticsRequest();
  184. request.date= date;
  185. request.areaId= areaId;
  186. request.guildId= guildId;
  187. _socket.request<ApplyReportStatisticsResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
  188. var rsp = msg as ApplyReportStatisticsResponse;
  189. s2c_code = rsp.s2c_code;
  190. s2c_msg = rsp.s2c_msg;
  191. return s2c_code == 200;
  192. }, cb, option);
  193. }
  194. public void onGuildFortPush(Action<OnGuildFortPush> cb)
  195. {
  196. _socket.listen_once<OnGuildFortPush>(cb);
  197. }
  198. public void onGuildResultPush(Action<OnGuildResultPush> cb)
  199. {
  200. _socket.listen_once<OnGuildResultPush>(cb);
  201. }
  202. }
  203. }