123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- -------------------------------------------------
- -- 本文件由代码生成器自动生成,
- -- 千万不要修改本文件的任何代码,
- -- 修改的的任何代码都会被覆盖掉!
- ----------------------------------------------------
- local Socket = require "Xmds.Pomelo.LuaGameSocket"
- require "base64"
- require "abyssDungeonHandler_pb"
- --------------------------------Pomelo-------------------------------
- Pomelo = Pomelo or {}
- --------------------------------AbyssDungeonHandler-------------------------------
- Pomelo.AbyssDungeonHandler = {}
- local function abyssDungeonInfoRequestEncoder(msg)
- local input = abyssDungeonHandler_pb.AbyssDungeonInfoRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function abyssDungeonInfoRequestDecoder(stream)
- local res = abyssDungeonHandler_pb.AbyssDungeonInfoResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AbyssDungeonHandler.abyssDungeonInfoRequest(cb,option)
- local input = nil
- Socket.OnRequestStart("area.abyssDungeonHandler.abyssDungeonInfoRequest", option)
- Socket.Request("area.abyssDungeonHandler.abyssDungeonInfoRequest", input, function(res)
- if(res.s2c_code == 200) then
- Pomelo.AbyssDungeonHandler.lastAbyssDungeonInfoResponse = res
- Socket.OnRequestEnd("area.abyssDungeonHandler.abyssDungeonInfoRequest", true)
- cb(nil,res)
- else
- local ex = {}
- if(res.s2c_code) then
- ex.Code = res.s2c_code
- ex.Message = res.s2c_msg
- else
- ex.Code = 501
- ex.Message = "[LuaXmdsNetClient] area.abyssDungeonHandler.abyssDungeonInfoRequest decode error!!"
- end
- Socket.OnRequestEnd("area.abyssDungeonHandler.abyssDungeonInfoRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, abyssDungeonInfoRequestEncoder, abyssDungeonInfoRequestDecoder)
- end
- local function abyssDungeonDiscardRequestEncoder(msg)
- local input = abyssDungeonHandler_pb.AbyssDungeonDiscardRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function abyssDungeonDiscardRequestDecoder(stream)
- local res = abyssDungeonHandler_pb.AbyssDungeonDiscardResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AbyssDungeonHandler.abyssDungeonDiscardRequest(index,cb,option)
- local msg = {}
- msg.index = index
- Socket.OnRequestStart("area.abyssDungeonHandler.abyssDungeonDiscardRequest", option)
- Socket.Request("area.abyssDungeonHandler.abyssDungeonDiscardRequest", msg, function(res)
- if(res.s2c_code == 200) then
- Pomelo.AbyssDungeonHandler.lastAbyssDungeonDiscardResponse = res
- Socket.OnRequestEnd("area.abyssDungeonHandler.abyssDungeonDiscardRequest", true)
- cb(nil,res)
- else
- local ex = {}
- if(res.s2c_code) then
- ex.Code = res.s2c_code
- ex.Message = res.s2c_msg
- else
- ex.Code = 501
- ex.Message = "[LuaXmdsNetClient] area.abyssDungeonHandler.abyssDungeonDiscardRequest decode error!!"
- end
- Socket.OnRequestEnd("area.abyssDungeonHandler.abyssDungeonDiscardRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, abyssDungeonDiscardRequestEncoder, abyssDungeonDiscardRequestDecoder)
- end
- local function abyssDungeonMatchLessStartRequestEncoder(msg)
- local input = abyssDungeonHandler_pb.AbyssDungeonMatchLessStartRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function abyssDungeonMatchLessStartRequestDecoder(stream)
- local res = abyssDungeonHandler_pb.AbyssDungeonMatchLessStartResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AbyssDungeonHandler.abyssDungeonMatchLessStartRequest(cb,option)
- local input = nil
- Socket.OnRequestStart("area.abyssDungeonHandler.abyssDungeonMatchLessStartRequest", option)
- Socket.Request("area.abyssDungeonHandler.abyssDungeonMatchLessStartRequest", input, function(res)
- if(res.s2c_code == 200) then
- Pomelo.AbyssDungeonHandler.lastAbyssDungeonMatchLessStartResponse = res
- Socket.OnRequestEnd("area.abyssDungeonHandler.abyssDungeonMatchLessStartRequest", true)
- cb(nil,res)
- else
- local ex = {}
- if(res.s2c_code) then
- ex.Code = res.s2c_code
- ex.Message = res.s2c_msg
- else
- ex.Code = 501
- ex.Message = "[LuaXmdsNetClient] area.abyssDungeonHandler.abyssDungeonMatchLessStartRequest decode error!!"
- end
- Socket.OnRequestEnd("area.abyssDungeonHandler.abyssDungeonMatchLessStartRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, abyssDungeonMatchLessStartRequestEncoder, abyssDungeonMatchLessStartRequestDecoder)
- end
- local function abyssDungeonBossDeadPushDecoder(stream)
- local res = abyssDungeonHandler_pb.AbyssDungeonBossDeadPush()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AbyssDungeonHandler.abyssDungeonBossDeadPush(cb)
- Socket.On("area.abyssDungeonPush.abyssDungeonBossDeadPush", function(res)
- Pomelo.AbyssDungeonHandler.lastAbyssDungeonBossDeadPush = res
- cb(nil,res)
- end, abyssDungeonBossDeadPushDecoder)
- end
- local function abyssDungeonEnterPushDecoder(stream)
- local res = abyssDungeonHandler_pb.AbyssDungeonEnterPush()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AbyssDungeonHandler.abyssDungeonEnterPush(cb)
- Socket.On("area.abyssDungeonPush.abyssDungeonEnterPush", function(res)
- Pomelo.AbyssDungeonHandler.lastAbyssDungeonEnterPush = res
- cb(nil,res)
- end, abyssDungeonEnterPushDecoder)
- end
- local function abyssDungeonSkillChangePushDecoder(stream)
- local res = abyssDungeonHandler_pb.AbyssDungeonSkillChangePush()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AbyssDungeonHandler.abyssDungeonSkillChangePush(cb)
- Socket.On("area.abyssDungeonPush.abyssDungeonSkillChangePush", function(res)
- Pomelo.AbyssDungeonHandler.lastAbyssDungeonSkillChangePush = res
- cb(nil,res)
- end, abyssDungeonSkillChangePushDecoder)
- end
- local function abyssDungeonMatchlessPushDecoder(stream)
- local res = abyssDungeonHandler_pb.AbyssDungeonMatchlessPush()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AbyssDungeonHandler.abyssDungeonMatchlessPush(cb)
- Socket.On("area.abyssDungeonPush.abyssDungeonMatchlessPush", function(res)
- Pomelo.AbyssDungeonHandler.lastAbyssDungeonMatchlessPush = res
- cb(nil,res)
- end, abyssDungeonMatchlessPushDecoder)
- end
- --------------------------------Pomelo-------------------------------
- return Pomelo
|