1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- -------------------------------------------------
- -- 本文件由代码生成器自动生成,
- -- 千万不要修改本文件的任何代码,
- -- 修改的的任何代码都会被覆盖掉!
- ----------------------------------------------------
- local Socket = require "Xmds.Pomelo.LuaGameSocket"
- require "base64"
- require "undergroundPlaceHandler_pb"
- --------------------------------Pomelo-------------------------------
- Pomelo = Pomelo or {}
- --------------------------------UndergroundPlaceHandler-------------------------------
- Pomelo.UndergroundPlaceHandler = {}
- local function bossRefrushTimeRequestEncoder(msg)
- local input = undergroundPlaceHandler_pb.BossRefrushTimeRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function bossRefrushTimeRequestDecoder(stream)
- local res = undergroundPlaceHandler_pb.BossRefrushTimeResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.UndergroundPlaceHandler.bossRefrushTimeRequest(mapID,cb,option)
- local msg = {}
- msg.mapID = mapID
- Socket.OnRequestStart("area.undergroundPlaceHandler.bossRefrushTimeRequest", option)
- Socket.Request("area.undergroundPlaceHandler.bossRefrushTimeRequest", msg, function(res)
- if(res.s2c_code == 200) then
- Pomelo.UndergroundPlaceHandler.lastBossRefrushTimeResponse = res
- Socket.OnRequestEnd("area.undergroundPlaceHandler.bossRefrushTimeRequest", 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.undergroundPlaceHandler.bossRefrushTimeRequest decode error!!"
- end
- Socket.OnRequestEnd("area.undergroundPlaceHandler.bossRefrushTimeRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, bossRefrushTimeRequestEncoder, bossRefrushTimeRequestDecoder)
- end
- local function bossRefrushTimePushDecoder(stream)
- local res = undergroundPlaceHandler_pb.BossRefrushTimePush()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.UndergroundPlaceHandler.bossRefrushTimePush(cb)
- Socket.On("area.undergroundPlacePush.bossRefrushTimePush", function(res)
- Pomelo.UndergroundPlaceHandler.lastBossRefrushTimePush = res
- cb(nil,res)
- end, bossRefrushTimePushDecoder)
- end
- --------------------------------Pomelo-------------------------------
- return Pomelo
|