123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270 |
- /*-----------------------------------------------
- *本文件由代码生成器自动生成,
- *千万不要修改本文件的任何代码,
- *修改的的任何代码都会被覆盖掉!
- --------------------------------------------------*/
- using System.IO;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Pomelo.DotNetClient;
- namespace pomelo.zhanyao
- {
- public class ZhanYaoHandler
- {
- private PomeloClient _socket;
- public GetZhanYaoMainDataponse lastGetZhanYaoMainDataponse { get { return _socket.GetLastResponse<GetZhanYaoMainDataponse>(); } }
- public UpgradeYaoQiLevelResponse lastUpgradeYaoQiLevelResponse { get { return _socket.GetLastResponse<UpgradeYaoQiLevelResponse>(); } }
- public GetTodayZhanYaoAwardResponse lastGetTodayZhanYaoAwardResponse { get { return _socket.GetLastResponse<GetTodayZhanYaoAwardResponse>(); } }
- public GetPlayerShareYaoQiResponse lastGetPlayerShareYaoQiResponse { get { return _socket.GetLastResponse<GetPlayerShareYaoQiResponse>(); } }
- public ZhanyaoLotteryResponse lastZhanyaoLotteryResponse { get { return _socket.GetLastResponse<ZhanyaoLotteryResponse>(); } }
- public ReceiveZhanyaoRewardBoxResponse lastReceiveZhanyaoRewardBoxResponse { get { return _socket.GetLastResponse<ReceiveZhanyaoRewardBoxResponse>(); } }
- public SearchDemonResponse lastSearchDemonResponse { get { return _socket.GetLastResponse<SearchDemonResponse>(); } }
- public UpgradeGourdResponse lastUpgradeGourdResponse { get { return _socket.GetLastResponse<UpgradeGourdResponse>(); } }
- public ClearSearchDemonFlagResponse lastClearSearchDemonFlagResponse { get { return _socket.GetLastResponse<ClearSearchDemonFlagResponse>(); } }
- public SoulLampResponse lastSoulLampResponse { get { return _socket.GetLastResponse<SoulLampResponse>(); } }
- public GetStoryAwardResponse lastGetStoryAwardResponse { get { return _socket.GetLastResponse<GetStoryAwardResponse>(); } }
- public MosaicSoulBallResponse lastMosaicSoulBallResponse { get { return _socket.GetLastResponse<MosaicSoulBallResponse>(); } }
- public SwitchSkillResponse lastSwitchSkillResponse { get { return _socket.GetLastResponse<SwitchSkillResponse>(); } }
- public UpgradeYaojueSkillResponse lastUpgradeYaojueSkillResponse { get { return _socket.GetLastResponse<UpgradeYaojueSkillResponse>(); } }
- public AlchemyResponse lastAlchemyResponse { get { return _socket.GetLastResponse<AlchemyResponse>(); } }
- public ReceiveAlchemyItemResponse lastReceiveAlchemyItemResponse { get { return _socket.GetLastResponse<ReceiveAlchemyItemResponse>(); } }
- public RemoveSoulBallResponse lastRemoveSoulBallResponse { get { return _socket.GetLastResponse<RemoveSoulBallResponse>(); } }
- static ZhanYaoHandler()
- {
- EventTypes.RegistPushType("zhanyao.zhanYaoPush.playerYaoQiSharePush", typeof(PlayerYaoQiSharePush));
- EventTypes.RegistRequestType("zhanyao.zhanYaoHandler.getZhanYaoMainDataRequest", typeof(GetZhanYaoMainDataRequest), typeof(GetZhanYaoMainDataponse));
- EventTypes.RegistRequestType("zhanyao.zhanYaoHandler.upgradeYaoQiLevelRequest", typeof(UpgradeYaoQiLevelRequest), typeof(UpgradeYaoQiLevelResponse));
- EventTypes.RegistRequestType("zhanyao.zhanYaoHandler.getTodayZhanYaoAwardRequest", typeof(GetTodayZhanYaoAwardRequest), typeof(GetTodayZhanYaoAwardResponse));
- EventTypes.RegistRequestType("zhanyao.zhanYaoHandler.getPlayerShareYaoQiRequest", typeof(GetPlayerShareYaoQiRequest), typeof(GetPlayerShareYaoQiResponse));
- EventTypes.RegistRequestType("zhanyao.zhanYaoHandler.zhanyaoLotteryRequest", typeof(ZhanyaoLotteryRequest), typeof(ZhanyaoLotteryResponse));
- EventTypes.RegistRequestType("zhanyao.zhanYaoHandler.receiveZhanyaoRewardBoxRequest", typeof(ReceiveZhanyaoRewardBoxRequest), typeof(ReceiveZhanyaoRewardBoxResponse));
- EventTypes.RegistRequestType("zhanyao.zhanYaoHandler.searchDemonRequest", typeof(SearchDemonRequest), typeof(SearchDemonResponse));
- EventTypes.RegistRequestType("zhanyao.zhanYaoHandler.upgradeGourdRequest", typeof(UpgradeGourdRequest), typeof(UpgradeGourdResponse));
- EventTypes.RegistRequestType("zhanyao.zhanYaoHandler.clearSearchDemonFlagRequest", typeof(ClearSearchDemonFlagRequest), typeof(ClearSearchDemonFlagResponse));
- EventTypes.RegistRequestType("zhanyao.zhanYaoHandler.soulLampRequest", typeof(SoulLampRequest), typeof(SoulLampResponse));
- EventTypes.RegistRequestType("zhanyao.zhanYaoHandler.getStoryAwardRequest", typeof(GetStoryAwardRequest), typeof(GetStoryAwardResponse));
- EventTypes.RegistRequestType("zhanyao.zhanYaoHandler.mosaicSoulBallRequest", typeof(MosaicSoulBallRequest), typeof(MosaicSoulBallResponse));
- EventTypes.RegistRequestType("zhanyao.zhanYaoHandler.switchSkillRequest", typeof(SwitchSkillRequest), typeof(SwitchSkillResponse));
- EventTypes.RegistRequestType("zhanyao.zhanYaoHandler.upgradeYaojueSkillRequest", typeof(UpgradeYaojueSkillRequest), typeof(UpgradeYaojueSkillResponse));
- EventTypes.RegistRequestType("zhanyao.zhanYaoHandler.alchemyRequest", typeof(AlchemyRequest), typeof(AlchemyResponse));
- EventTypes.RegistRequestType("zhanyao.zhanYaoHandler.receiveAlchemyItemRequest", typeof(ReceiveAlchemyItemRequest), typeof(ReceiveAlchemyItemResponse));
- EventTypes.RegistRequestType("zhanyao.zhanYaoHandler.removeSoulBallRequest", typeof(RemoveSoulBallRequest), typeof(RemoveSoulBallResponse));
- }
- public ZhanYaoHandler(PomeloClient socket)
- {
- this._socket = socket;
- }
- public void getZhanYaoMainDataRequest(Action<PomeloException,GetZhanYaoMainDataponse> cb,object option = null)
- {
- var request = new GetZhanYaoMainDataRequest();
- _socket.request<GetZhanYaoMainDataponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as GetZhanYaoMainDataponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void upgradeYaoQiLevelRequest(Action<PomeloException,UpgradeYaoQiLevelResponse> cb,object option = null)
- {
- var request = new UpgradeYaoQiLevelRequest();
- _socket.request<UpgradeYaoQiLevelResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as UpgradeYaoQiLevelResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void getTodayZhanYaoAwardRequest(int c2s_awardId,Action<PomeloException,GetTodayZhanYaoAwardResponse> cb,object option = null)
- {
- var request = new GetTodayZhanYaoAwardRequest();
- request.c2s_awardId= c2s_awardId;
- _socket.request<GetTodayZhanYaoAwardResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as GetTodayZhanYaoAwardResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void getPlayerShareYaoQiRequest(int c2s_areaId,int c2s_itemShareId,Action<PomeloException,GetPlayerShareYaoQiResponse> cb,object option = null)
- {
- var request = new GetPlayerShareYaoQiRequest();
- request.c2s_areaId= c2s_areaId;
- request.c2s_itemShareId= c2s_itemShareId;
- _socket.request<GetPlayerShareYaoQiResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as GetPlayerShareYaoQiResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void zhanyaoLotteryRequest(Action<PomeloException,ZhanyaoLotteryResponse> cb,object option = null)
- {
- var request = new ZhanyaoLotteryRequest();
- _socket.request<ZhanyaoLotteryResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as ZhanyaoLotteryResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void receiveZhanyaoRewardBoxRequest(Action<PomeloException,ReceiveZhanyaoRewardBoxResponse> cb,object option = null)
- {
- var request = new ReceiveZhanyaoRewardBoxRequest();
- _socket.request<ReceiveZhanyaoRewardBoxResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as ReceiveZhanyaoRewardBoxResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void searchDemonRequest(Action<PomeloException,SearchDemonResponse> cb,object option = null)
- {
- var request = new SearchDemonRequest();
- _socket.request<SearchDemonResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as SearchDemonResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void upgradeGourdRequest(int opType,Action<PomeloException,UpgradeGourdResponse> cb,object option = null)
- {
- var request = new UpgradeGourdRequest();
- request.opType= opType;
- _socket.request<UpgradeGourdResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as UpgradeGourdResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void clearSearchDemonFlagRequest(Action<PomeloException,ClearSearchDemonFlagResponse> cb,object option = null)
- {
- var request = new ClearSearchDemonFlagRequest();
- _socket.request<ClearSearchDemonFlagResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as ClearSearchDemonFlagResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void soulLampRequest(Action<PomeloException,SoulLampResponse> cb,object option = null)
- {
- var request = new SoulLampRequest();
- _socket.request<SoulLampResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as SoulLampResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void getStoryAwardRequest(int memoriesId,Action<PomeloException,GetStoryAwardResponse> cb,object option = null)
- {
- var request = new GetStoryAwardRequest();
- request.memoriesId= memoriesId;
- _socket.request<GetStoryAwardResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as GetStoryAwardResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void mosaicSoulBallRequest(int skillId,int pos,Action<PomeloException,MosaicSoulBallResponse> cb,object option = null)
- {
- var request = new MosaicSoulBallRequest();
- request.skillId= skillId;
- request.pos= pos;
- _socket.request<MosaicSoulBallResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as MosaicSoulBallResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void switchSkillRequest(Action<PomeloException,SwitchSkillResponse> cb,object option = null)
- {
- var request = new SwitchSkillRequest();
- _socket.request<SwitchSkillResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as SwitchSkillResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void upgradeYaojueSkillRequest(Action<PomeloException,UpgradeYaojueSkillResponse> cb,object option = null)
- {
- var request = new UpgradeYaojueSkillRequest();
- _socket.request<UpgradeYaojueSkillResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as UpgradeYaojueSkillResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void alchemyRequest(int destId,List<pomelo.zhanyao.AlchemyItem> chooseItem,Action<PomeloException,AlchemyResponse> cb,object option = null)
- {
- var request = new AlchemyRequest();
- request.destId= destId;
- request.chooseItem.AddRange(chooseItem);
- _socket.request<AlchemyResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as AlchemyResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void receiveAlchemyItemRequest(int index,Action<PomeloException,ReceiveAlchemyItemResponse> cb,object option = null)
- {
- var request = new ReceiveAlchemyItemRequest();
- request.index= index;
- _socket.request<ReceiveAlchemyItemResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as ReceiveAlchemyItemResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void removeSoulBallRequest(int skillId,int pos,Action<PomeloException,RemoveSoulBallResponse> cb,object option = null)
- {
- var request = new RemoveSoulBallRequest();
- request.skillId= skillId;
- request.pos= pos;
- _socket.request<RemoveSoulBallResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as RemoveSoulBallResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void onPlayerYaoQiSharePush(Action<PlayerYaoQiSharePush> cb)
- {
- _socket.listen_once<PlayerYaoQiSharePush>(cb);
- }
- }
- }
|