1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- /*-----------------------------------------------
- *本文件由代码生成器自动生成,
- *千万不要修改本文件的任何代码,
- *修改的的任何代码都会被覆盖掉!
- --------------------------------------------------*/
- using System.IO;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Pomelo.DotNetClient;
- namespace pomelo.area
- {
- public class AbyssDungeonHandler
- {
- private PomeloClient _socket;
- public AbyssDungeonInfoResponse lastAbyssDungeonInfoResponse { get { return _socket.GetLastResponse<AbyssDungeonInfoResponse>(); } }
- public AbyssDungeonDiscardResponse lastAbyssDungeonDiscardResponse { get { return _socket.GetLastResponse<AbyssDungeonDiscardResponse>(); } }
- public AbyssDungeonMatchLessStartResponse lastAbyssDungeonMatchLessStartResponse { get { return _socket.GetLastResponse<AbyssDungeonMatchLessStartResponse>(); } }
- static AbyssDungeonHandler()
- {
- EventTypes.RegistPushType("area.abyssDungeonPush.abyssDungeonBossDeadPush", typeof(AbyssDungeonBossDeadPush));
- EventTypes.RegistPushType("area.abyssDungeonPush.abyssDungeonEnterPush", typeof(AbyssDungeonEnterPush));
- EventTypes.RegistPushType("area.abyssDungeonPush.abyssDungeonSkillChangePush", typeof(AbyssDungeonSkillChangePush));
- EventTypes.RegistPushType("area.abyssDungeonPush.abyssDungeonMatchlessPush", typeof(AbyssDungeonMatchlessPush));
- EventTypes.RegistRequestType("area.abyssDungeonHandler.abyssDungeonInfoRequest", typeof(AbyssDungeonInfoRequest), typeof(AbyssDungeonInfoResponse));
- EventTypes.RegistRequestType("area.abyssDungeonHandler.abyssDungeonDiscardRequest", typeof(AbyssDungeonDiscardRequest), typeof(AbyssDungeonDiscardResponse));
- EventTypes.RegistRequestType("area.abyssDungeonHandler.abyssDungeonMatchLessStartRequest", typeof(AbyssDungeonMatchLessStartRequest), typeof(AbyssDungeonMatchLessStartResponse));
- }
- public AbyssDungeonHandler(PomeloClient socket)
- {
- this._socket = socket;
- }
- public void abyssDungeonInfoRequest(Action<PomeloException,AbyssDungeonInfoResponse> cb,object option = null)
- {
- var request = new AbyssDungeonInfoRequest();
- _socket.request<AbyssDungeonInfoResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as AbyssDungeonInfoResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void abyssDungeonDiscardRequest(int index,Action<PomeloException,AbyssDungeonDiscardResponse> cb,object option = null)
- {
- var request = new AbyssDungeonDiscardRequest();
- request.index= index;
- _socket.request<AbyssDungeonDiscardResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as AbyssDungeonDiscardResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void abyssDungeonMatchLessStartRequest(Action<PomeloException,AbyssDungeonMatchLessStartResponse> cb,object option = null)
- {
- var request = new AbyssDungeonMatchLessStartRequest();
- _socket.request<AbyssDungeonMatchLessStartResponse>(request, (object msg, out int s2c_code, out string s2c_msg) => {
- var rsp = msg as AbyssDungeonMatchLessStartResponse;
- s2c_code = rsp.s2c_code;
- s2c_msg = rsp.s2c_msg;
- return s2c_code == 200;
- }, cb, option);
- }
- public void onAbyssDungeonBossDeadPush(Action<AbyssDungeonBossDeadPush> cb)
- {
- _socket.listen_once<AbyssDungeonBossDeadPush>(cb);
- }
- public void onAbyssDungeonEnterPush(Action<AbyssDungeonEnterPush> cb)
- {
- _socket.listen_once<AbyssDungeonEnterPush>(cb);
- }
- public void onAbyssDungeonSkillChangePush(Action<AbyssDungeonSkillChangePush> cb)
- {
- _socket.listen_once<AbyssDungeonSkillChangePush>(cb);
- }
- public void onAbyssDungeonMatchlessPush(Action<AbyssDungeonMatchlessPush> cb)
- {
- _socket.listen_once<AbyssDungeonMatchlessPush>(cb);
- }
- }
- }
|