/*----------------------------------------------- *本文件由代码生成器自动生成, *千万不要修改本文件的任何代码, *修改的的任何代码都会被覆盖掉! --------------------------------------------------*/ using System.IO; using System; using System.Collections.Generic; using System.Linq; using System.Text; using Pomelo.DotNetClient; namespace pomelo.five2five { public class Five2FiveHandler { private PomeloClient _socket; public Five2FiveResponse lastFive2FiveResponse { get { return _socket.GetLastResponse(); } } public Five2FiveLookBtlReportResponse lastFive2FiveLookBtlReportResponse { get { return _socket.GetLastResponse(); } } public Five2FiveMatchResponse lastFive2FiveMatchResponse { get { return _socket.GetLastResponse(); } } public Five2FiveRefuseMatchResponse lastFive2FiveRefuseMatchResponse { get { return _socket.GetLastResponse(); } } public Five2FiveAgreeMatchResponse lastFive2FiveAgreeMatchResponse { get { return _socket.GetLastResponse(); } } public Five2FiveCancelMatchResponse lastFive2FiveCancelMatchResponse { get { return _socket.GetLastResponse(); } } public Five2FiveReadyResponse lastFive2FiveReadyResponse { get { return _socket.GetLastResponse(); } } public Five2FiveLeaveAreaResponse lastFive2FiveLeaveAreaResponse { get { return _socket.GetLastResponse(); } } public Five2FiveReciveRewardResponse lastFive2FiveReciveRewardResponse { get { return _socket.GetLastResponse(); } } public Five2FiveLookMatchResultResponse lastFive2FiveLookMatchResultResponse { get { return _socket.GetLastResponse(); } } public Five2FiveShardMatchResultResponse lastFive2FiveShardMatchResultResponse { get { return _socket.GetLastResponse(); } } static Five2FiveHandler() { EventTypes.RegistPushType("five2five.five2FivePush.five2FiveApplyMatchPush", typeof(Five2FiveApplyMatchPush)); EventTypes.RegistPushType("five2five.five2FivePush.five2FiveMatchMemberInfoPush", typeof(Five2FiveMatchMemberInfoPush)); EventTypes.RegistPushType("five2five.five2FivePush.five2FiveMemberChoicePush", typeof(Five2FiveMemberChoicePush)); EventTypes.RegistPushType("five2five.five2FivePush.five2FiveOnGameEndPush", typeof(Five2FiveOnGameEndPush)); EventTypes.RegistPushType("five2five.five2FivePush.five2FiveOnNewRewardPush", typeof(Five2FiveOnNewRewardPush)); EventTypes.RegistPushType("five2five.five2FivePush.five2FiveOnNoRewardPush", typeof(Five2FiveOnNoRewardPush)); EventTypes.RegistPushType("five2five.five2FivePush.five2FiveMatchFailedPush", typeof(Five2FiveMatchFailedPush)); EventTypes.RegistPushType("five2five.five2FivePush.five2FiveLeaderCancelMatchPush", typeof(Five2FiveLeaderCancelMatchPush)); EventTypes.RegistPushType("five2five.five2FivePush.five2FiveTeamChangePush", typeof(Five2FiveTeamChangePush)); EventTypes.RegistPushType("five2five.five2FivePush.five2FiveMatchPoolChangePush", typeof(Five2FiveMatchPoolChangePush)); EventTypes.RegistPushType("five2five.five2FivePush.five2FiveApplyMatchResultPush", typeof(Five2FiveApplyMatchResultPush)); EventTypes.RegistRequestType("five2five.five2FiveHandler.five2FiveRequest", typeof(Five2FiveRequest), typeof(Five2FiveResponse)); EventTypes.RegistRequestType("five2five.five2FiveHandler.five2FiveLookBtlReportRequest", typeof(Five2FiveLookBtlReportRequest), typeof(Five2FiveLookBtlReportResponse)); EventTypes.RegistRequestType("five2five.five2FiveHandler.five2FiveMatchRequest", typeof(Five2FiveMatchRequest), typeof(Five2FiveMatchResponse)); EventTypes.RegistRequestType("five2five.five2FiveHandler.five2FiveRefuseMatchRequest", typeof(Five2FiveRefuseMatchRequest), typeof(Five2FiveRefuseMatchResponse)); EventTypes.RegistRequestType("five2five.five2FiveHandler.five2FiveAgreeMatchRequest", typeof(Five2FiveAgreeMatchRequest), typeof(Five2FiveAgreeMatchResponse)); EventTypes.RegistRequestType("five2five.five2FiveHandler.five2FiveCancelMatchRequest", typeof(Five2FiveCancelMatchRequest), typeof(Five2FiveCancelMatchResponse)); EventTypes.RegistRequestType("five2five.five2FiveHandler.five2FiveReadyRequest", typeof(Five2FiveReadyRequest), typeof(Five2FiveReadyResponse)); EventTypes.RegistRequestType("five2five.five2FiveHandler.five2FiveLeaveAreaRequest", typeof(Five2FiveLeaveAreaRequest), typeof(Five2FiveLeaveAreaResponse)); EventTypes.RegistRequestType("five2five.five2FiveHandler.five2FiveReciveRewardRequest", typeof(Five2FiveReciveRewardRequest), typeof(Five2FiveReciveRewardResponse)); EventTypes.RegistRequestType("five2five.five2FiveHandler.five2FiveLookMatchResultRequest", typeof(Five2FiveLookMatchResultRequest), typeof(Five2FiveLookMatchResultResponse)); EventTypes.RegistRequestType("five2five.five2FiveHandler.five2FiveShardMatchResultRequest", typeof(Five2FiveShardMatchResultRequest), typeof(Five2FiveShardMatchResultResponse)); } public Five2FiveHandler(PomeloClient socket) { this._socket = socket; } public void five2FiveRequest(Action cb,object option = null) { var request = new Five2FiveRequest(); _socket.request(request, (object msg, out int s2c_code, out string s2c_msg) => { var rsp = msg as Five2FiveResponse; s2c_code = rsp.s2c_code; s2c_msg = rsp.s2c_msg; return s2c_code == 200; }, cb, option); } public void five2FiveLookBtlReportRequest(Action cb,object option = null) { var request = new Five2FiveLookBtlReportRequest(); _socket.request(request, (object msg, out int s2c_code, out string s2c_msg) => { var rsp = msg as Five2FiveLookBtlReportResponse; s2c_code = rsp.s2c_code; s2c_msg = rsp.s2c_msg; return s2c_code == 200; }, cb, option); } public void five2FiveMatchRequest(int matchOrReMatch,Action cb,object option = null) { var request = new Five2FiveMatchRequest(); request.matchOrReMatch= matchOrReMatch; _socket.request(request, (object msg, out int s2c_code, out string s2c_msg) => { var rsp = msg as Five2FiveMatchResponse; s2c_code = rsp.s2c_code; s2c_msg = rsp.s2c_msg; return s2c_code == 200; }, cb, option); } public void five2FiveRefuseMatchRequest(Action cb,object option = null) { var request = new Five2FiveRefuseMatchRequest(); _socket.request(request, (object msg, out int s2c_code, out string s2c_msg) => { var rsp = msg as Five2FiveRefuseMatchResponse; s2c_code = rsp.s2c_code; s2c_msg = rsp.s2c_msg; return s2c_code == 200; }, cb, option); } public void five2FiveAgreeMatchRequest(Action cb,object option = null) { var request = new Five2FiveAgreeMatchRequest(); _socket.request(request, (object msg, out int s2c_code, out string s2c_msg) => { var rsp = msg as Five2FiveAgreeMatchResponse; s2c_code = rsp.s2c_code; s2c_msg = rsp.s2c_msg; return s2c_code == 200; }, cb, option); } public void five2FiveCancelMatchRequest(Action cb,object option = null) { var request = new Five2FiveCancelMatchRequest(); _socket.request(request, (object msg, out int s2c_code, out string s2c_msg) => { var rsp = msg as Five2FiveCancelMatchResponse; s2c_code = rsp.s2c_code; s2c_msg = rsp.s2c_msg; return s2c_code == 200; }, cb, option); } public void five2FiveReadyRequest(string tempTeamId,Action cb,object option = null) { var request = new Five2FiveReadyRequest(); request.tempTeamId= tempTeamId; _socket.request(request, (object msg, out int s2c_code, out string s2c_msg) => { var rsp = msg as Five2FiveReadyResponse; s2c_code = rsp.s2c_code; s2c_msg = rsp.s2c_msg; return s2c_code == 200; }, cb, option); } public void five2FiveLeaveAreaRequest(Action cb,object option = null) { var request = new Five2FiveLeaveAreaRequest(); _socket.request(request, (object msg, out int s2c_code, out string s2c_msg) => { var rsp = msg as Five2FiveLeaveAreaResponse; s2c_code = rsp.s2c_code; s2c_msg = rsp.s2c_msg; return s2c_code == 200; }, cb, option); } public void five2FiveReciveRewardRequest(Action cb,object option = null) { var request = new Five2FiveReciveRewardRequest(); _socket.request(request, (object msg, out int s2c_code, out string s2c_msg) => { var rsp = msg as Five2FiveReciveRewardResponse; s2c_code = rsp.s2c_code; s2c_msg = rsp.s2c_msg; return s2c_code == 200; }, cb, option); } public void five2FiveLookMatchResultRequest(string instanceId,Action cb,object option = null) { var request = new Five2FiveLookMatchResultRequest(); request.instanceId= instanceId; _socket.request(request, (object msg, out int s2c_code, out string s2c_msg) => { var rsp = msg as Five2FiveLookMatchResultResponse; s2c_code = rsp.s2c_code; s2c_msg = rsp.s2c_msg; return s2c_code == 200; }, cb, option); } public void five2FiveShardMatchResultRequest(string instanceId,Action cb,object option = null) { var request = new Five2FiveShardMatchResultRequest(); request.instanceId= instanceId; _socket.request(request, (object msg, out int s2c_code, out string s2c_msg) => { var rsp = msg as Five2FiveShardMatchResultResponse; s2c_code = rsp.s2c_code; s2c_msg = rsp.s2c_msg; return s2c_code == 200; }, cb, option); } public void onFive2FiveApplyMatchPush(Action cb) { _socket.listen_once(cb); } public void onFive2FiveMatchMemberInfoPush(Action cb) { _socket.listen_once(cb); } public void onFive2FiveMemberChoicePush(Action cb) { _socket.listen_once(cb); } public void onFive2FiveOnGameEndPush(Action cb) { _socket.listen_once(cb); } public void onFive2FiveOnNewRewardPush(Action cb) { _socket.listen_once(cb); } public void onFive2FiveOnNoRewardPush(Action cb) { _socket.listen_once(cb); } public void onFive2FiveMatchFailedPush(Action cb) { _socket.listen_once(cb); } public void onFive2FiveLeaderCancelMatchPush(Action cb) { _socket.listen_once(cb); } public void onFive2FiveTeamChangePush(Action cb) { _socket.listen_once(cb); } public void onFive2FiveMatchPoolChangePush(Action cb) { _socket.listen_once(cb); } public void onFive2FiveApplyMatchResultPush(Action cb) { _socket.listen_once(cb); } } }