123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- -------------------------------------------------
- -- 本文件由代码生成器自动生成,
- -- 千万不要修改本文件的任何代码,
- -- 修改的的任何代码都会被覆盖掉!
- ----------------------------------------------------
- local Socket = require "Xmds.Pomelo.LuaGameSocket"
- require "base64"
- require "weekendStarDungeonHandler_pb"
- --------------------------------Pomelo-------------------------------
- Pomelo = Pomelo or {}
- --------------------------------WeekendStarDungeonHandler-------------------------------
- Pomelo.WeekendStarDungeonHandler = {}
- local function weekendStarDungeonEnterNpcRequestEncoder(msg)
- local input = weekendStarDungeonHandler_pb.WeekendStarDungeonEnterNpcRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function weekendStarDungeonEnterNpcRequestDecoder(stream)
- local res = weekendStarDungeonHandler_pb.WeekendStarDungeonEnterNpcResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.WeekendStarDungeonHandler.weekendStarDungeonEnterNpcRequest(cb,option)
- local input = nil
- Socket.OnRequestStart("area.weekendStarDungeonHandler.weekendStarDungeonEnterNpcRequest", option)
- Socket.Request("area.weekendStarDungeonHandler.weekendStarDungeonEnterNpcRequest", input, function(res)
- if(res.s2c_code == 200) then
- Pomelo.WeekendStarDungeonHandler.lastWeekendStarDungeonEnterNpcResponse = res
- Socket.OnRequestEnd("area.weekendStarDungeonHandler.weekendStarDungeonEnterNpcRequest", 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.weekendStarDungeonHandler.weekendStarDungeonEnterNpcRequest decode error!!"
- end
- Socket.OnRequestEnd("area.weekendStarDungeonHandler.weekendStarDungeonEnterNpcRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, weekendStarDungeonEnterNpcRequestEncoder, weekendStarDungeonEnterNpcRequestDecoder)
- end
- local function weekendStarDungeonRecvRequestEncoder(msg)
- local input = weekendStarDungeonHandler_pb.WeekendStarDungeonRecvRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function weekendStarDungeonRecvRequestDecoder(stream)
- local res = weekendStarDungeonHandler_pb.WeekendStarDungeonRecvResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.WeekendStarDungeonHandler.weekendStarDungeonRecvRequest(s2c_id,cb,option)
- local msg = {}
- msg.s2c_id = s2c_id
- Socket.OnRequestStart("area.weekendStarDungeonHandler.weekendStarDungeonRecvRequest", option)
- Socket.Request("area.weekendStarDungeonHandler.weekendStarDungeonRecvRequest", msg, function(res)
- if(res.s2c_code == 200) then
- Pomelo.WeekendStarDungeonHandler.lastWeekendStarDungeonRecvResponse = res
- Socket.OnRequestEnd("area.weekendStarDungeonHandler.weekendStarDungeonRecvRequest", 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.weekendStarDungeonHandler.weekendStarDungeonRecvRequest decode error!!"
- end
- Socket.OnRequestEnd("area.weekendStarDungeonHandler.weekendStarDungeonRecvRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, weekendStarDungeonRecvRequestEncoder, weekendStarDungeonRecvRequestDecoder)
- end
- local function weekendStarDungeonSelectTypeRequestEncoder(msg)
- local input = weekendStarDungeonHandler_pb.WeekendStarDungeonSelectTypeRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function weekendStarDungeonSelectTypeRequestDecoder(stream)
- local res = weekendStarDungeonHandler_pb.WeekendStarDungeonSelectTypeResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.WeekendStarDungeonHandler.weekendStarDungeonSelectTypeRequest(cb,option)
- local input = nil
- Socket.OnRequestStart("area.weekendStarDungeonHandler.weekendStarDungeonSelectTypeRequest", option)
- Socket.Request("area.weekendStarDungeonHandler.weekendStarDungeonSelectTypeRequest", input, function(res)
- if(res.s2c_code == 200) then
- Pomelo.WeekendStarDungeonHandler.lastWeekendStarDungeonSelectTypeResponse = res
- Socket.OnRequestEnd("area.weekendStarDungeonHandler.weekendStarDungeonSelectTypeRequest", 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.weekendStarDungeonHandler.weekendStarDungeonSelectTypeRequest decode error!!"
- end
- Socket.OnRequestEnd("area.weekendStarDungeonHandler.weekendStarDungeonSelectTypeRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, weekendStarDungeonSelectTypeRequestEncoder, weekendStarDungeonSelectTypeRequestDecoder)
- end
- local function weekendStarDungeonRecvListRequestEncoder(msg)
- local input = weekendStarDungeonHandler_pb.WeekendStarDungeonRecvListRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function weekendStarDungeonRecvListRequestDecoder(stream)
- local res = weekendStarDungeonHandler_pb.WeekendStarDungeonRecvListResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.WeekendStarDungeonHandler.weekendStarDungeonRecvListRequest(cb,option)
- local input = nil
- Socket.OnRequestStart("area.weekendStarDungeonHandler.weekendStarDungeonRecvListRequest", option)
- Socket.Request("area.weekendStarDungeonHandler.weekendStarDungeonRecvListRequest", input, function(res)
- if(res.s2c_code == 200) then
- Pomelo.WeekendStarDungeonHandler.lastWeekendStarDungeonRecvListResponse = res
- Socket.OnRequestEnd("area.weekendStarDungeonHandler.weekendStarDungeonRecvListRequest", 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.weekendStarDungeonHandler.weekendStarDungeonRecvListRequest decode error!!"
- end
- Socket.OnRequestEnd("area.weekendStarDungeonHandler.weekendStarDungeonRecvListRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, weekendStarDungeonRecvListRequestEncoder, weekendStarDungeonRecvListRequestDecoder)
- end
- local function onWeekendStarDungeonEnterNumPushDecoder(stream)
- local res = weekendStarDungeonHandler_pb.OnWeekendStarDungeonEnterNumPush()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.WeekendStarDungeonHandler.onWeekendStarDungeonEnterNumPush(cb)
- Socket.On("area.weekendStarDungeonPush.onWeekendStarDungeonEnterNumPush", function(res)
- Pomelo.WeekendStarDungeonHandler.lastOnWeekendStarDungeonEnterNumPush = res
- cb(nil,res)
- end, onWeekendStarDungeonEnterNumPushDecoder)
- end
- local function onWeekendStarDungeonBossOrderPushDecoder(stream)
- local res = weekendStarDungeonHandler_pb.OnWeekendStarDungeonBossOrderPush()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.WeekendStarDungeonHandler.onWeekendStarDungeonBossOrderPush(cb)
- Socket.On("area.weekendStarDungeonPush.onWeekendStarDungeonBossOrderPush", function(res)
- Pomelo.WeekendStarDungeonHandler.lastOnWeekendStarDungeonBossOrderPush = res
- cb(nil,res)
- end, onWeekendStarDungeonBossOrderPushDecoder)
- end
- local function onWeekendStarDungeonRankChangePushDecoder(stream)
- local res = weekendStarDungeonHandler_pb.OnWeekendStarDungeonRankChangePush()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.WeekendStarDungeonHandler.onWeekendStarDungeonRankChangePush(cb)
- Socket.On("area.weekendStarDungeonPush.onWeekendStarDungeonRankChangePush", function(res)
- Pomelo.WeekendStarDungeonHandler.lastOnWeekendStarDungeonRankChangePush = res
- cb(nil,res)
- end, onWeekendStarDungeonRankChangePushDecoder)
- end
- --------------------------------Pomelo-------------------------------
- return Pomelo
|