123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535 |
- -------------------------------------------------
- -- 本文件由代码生成器自动生成,
- -- 千万不要修改本文件的任何代码,
- -- 修改的的任何代码都会被覆盖掉!
- ----------------------------------------------------
- local Socket = require "Xmds.Pomelo.LuaGameSocket"
- require "base64"
- require "animaInscriptionHandler_pb"
- --------------------------------Pomelo-------------------------------
- Pomelo = Pomelo or {}
- --------------------------------AnimaInscriptionHandler-------------------------------
- Pomelo.AnimaInscriptionHandler = {}
- local function animaInfoRequestEncoder(msg)
- local input = animaInscriptionHandler_pb.AnimaInfoRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function animaInfoRequestDecoder(stream)
- local res = animaInscriptionHandler_pb.AnimaInfoResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AnimaInscriptionHandler.animaInfoRequest(cb,option)
- local input = nil
- Socket.OnRequestStart("area.animaInscriptionHandler.animaInfoRequest", option)
- Socket.Request("area.animaInscriptionHandler.animaInfoRequest", input, function(res)
- if(res.s2c_code == 200) then
- Pomelo.AnimaInscriptionHandler.lastAnimaInfoResponse = res
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaInfoRequest", 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.animaInscriptionHandler.animaInfoRequest decode error!!"
- end
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaInfoRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, animaInfoRequestEncoder, animaInfoRequestDecoder)
- end
- local function animaUpgradeRequestEncoder(msg)
- local input = animaInscriptionHandler_pb.AnimaUpgradeRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function animaUpgradeRequestDecoder(stream)
- local res = animaInscriptionHandler_pb.AnimaUpgradeResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AnimaInscriptionHandler.animaUpgradeRequest(cb,option)
- local input = nil
- Socket.OnRequestStart("area.animaInscriptionHandler.animaUpgradeRequest", option)
- Socket.Request("area.animaInscriptionHandler.animaUpgradeRequest", input, function(res)
- if(res.s2c_code == 200) then
- Pomelo.AnimaInscriptionHandler.lastAnimaUpgradeResponse = res
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaUpgradeRequest", 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.animaInscriptionHandler.animaUpgradeRequest decode error!!"
- end
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaUpgradeRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, animaUpgradeRequestEncoder, animaUpgradeRequestDecoder)
- end
- local function animaLuckyRequestEncoder(msg)
- local input = animaInscriptionHandler_pb.AnimaLuckyRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function animaLuckyRequestDecoder(stream)
- local res = animaInscriptionHandler_pb.AnimaLuckyResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AnimaInscriptionHandler.animaLuckyRequest(cb,option)
- local input = nil
- Socket.OnRequestStart("area.animaInscriptionHandler.animaLuckyRequest", option)
- Socket.Request("area.animaInscriptionHandler.animaLuckyRequest", input, function(res)
- if(res.s2c_code == 200) then
- Pomelo.AnimaInscriptionHandler.lastAnimaLuckyResponse = res
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaLuckyRequest", 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.animaInscriptionHandler.animaLuckyRequest decode error!!"
- end
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaLuckyRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, animaLuckyRequestEncoder, animaLuckyRequestDecoder)
- end
- local function animaInscriptionInfoRequestEncoder(msg)
- local input = animaInscriptionHandler_pb.AnimaInscriptionInfoRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function animaInscriptionInfoRequestDecoder(stream)
- local res = animaInscriptionHandler_pb.AnimaInscriptionInfoResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AnimaInscriptionHandler.animaInscriptionInfoRequest(cb,option)
- local input = nil
- Socket.OnRequestStart("area.animaInscriptionHandler.animaInscriptionInfoRequest", option)
- Socket.Request("area.animaInscriptionHandler.animaInscriptionInfoRequest", input, function(res)
- if(res.s2c_code == 200) then
- Pomelo.AnimaInscriptionHandler.lastAnimaInscriptionInfoResponse = res
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaInscriptionInfoRequest", 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.animaInscriptionHandler.animaInscriptionInfoRequest decode error!!"
- end
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaInscriptionInfoRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, animaInscriptionInfoRequestEncoder, animaInscriptionInfoRequestDecoder)
- end
- local function animaInscriptionUpgradeRequestEncoder(msg)
- local input = animaInscriptionHandler_pb.AnimaInscriptionUpgradeRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function animaInscriptionUpgradeRequestDecoder(stream)
- local res = animaInscriptionHandler_pb.AnimaInscriptionUpgradeResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AnimaInscriptionHandler.animaInscriptionUpgradeRequest(code,destroyedInfo,cb,option)
- local msg = {}
- msg.code = code
- msg.destroyedInfo = destroyedInfo
- Socket.OnRequestStart("area.animaInscriptionHandler.animaInscriptionUpgradeRequest", option)
- Socket.Request("area.animaInscriptionHandler.animaInscriptionUpgradeRequest", msg, function(res)
- if(res.s2c_code == 200) then
- Pomelo.AnimaInscriptionHandler.lastAnimaInscriptionUpgradeResponse = res
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaInscriptionUpgradeRequest", 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.animaInscriptionHandler.animaInscriptionUpgradeRequest decode error!!"
- end
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaInscriptionUpgradeRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, animaInscriptionUpgradeRequestEncoder, animaInscriptionUpgradeRequestDecoder)
- end
- local function animaInscriptionEquipRequestEncoder(msg)
- local input = animaInscriptionHandler_pb.AnimaInscriptionEquipRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function animaInscriptionEquipRequestDecoder(stream)
- local res = animaInscriptionHandler_pb.AnimaInscriptionEquipResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AnimaInscriptionHandler.animaInscriptionEquipRequest(equipIndex,girdIndex,cb,option)
- local msg = {}
- msg.equipIndex = equipIndex
- msg.girdIndex = girdIndex
- Socket.OnRequestStart("area.animaInscriptionHandler.animaInscriptionEquipRequest", option)
- Socket.Request("area.animaInscriptionHandler.animaInscriptionEquipRequest", msg, function(res)
- if(res.s2c_code == 200) then
- Pomelo.AnimaInscriptionHandler.lastAnimaInscriptionEquipResponse = res
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaInscriptionEquipRequest", 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.animaInscriptionHandler.animaInscriptionEquipRequest decode error!!"
- end
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaInscriptionEquipRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, animaInscriptionEquipRequestEncoder, animaInscriptionEquipRequestDecoder)
- end
- local function animaInscriptionDownRequestEncoder(msg)
- local input = animaInscriptionHandler_pb.AnimaInscriptionDownRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function animaInscriptionDownRequestDecoder(stream)
- local res = animaInscriptionHandler_pb.AnimaInscriptionDownResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AnimaInscriptionHandler.animaInscriptionDownRequest(equipIndex,cb,option)
- local msg = {}
- msg.equipIndex = equipIndex
- Socket.OnRequestStart("area.animaInscriptionHandler.animaInscriptionDownRequest", option)
- Socket.Request("area.animaInscriptionHandler.animaInscriptionDownRequest", msg, function(res)
- if(res.s2c_code == 200) then
- Pomelo.AnimaInscriptionHandler.lastAnimaInscriptionDownResponse = res
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaInscriptionDownRequest", 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.animaInscriptionHandler.animaInscriptionDownRequest decode error!!"
- end
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaInscriptionDownRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, animaInscriptionDownRequestEncoder, animaInscriptionDownRequestDecoder)
- end
- local function animaInscriptionUpgradeOneKeyRequestEncoder(msg)
- local input = animaInscriptionHandler_pb.AnimaInscriptionUpgradeOneKeyRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function animaInscriptionUpgradeOneKeyRequestDecoder(stream)
- local res = animaInscriptionHandler_pb.AnimaInscriptionUpgradeOneKeyResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AnimaInscriptionHandler.animaInscriptionUpgradeOneKeyRequest(code,cb,option)
- local msg = {}
- msg.code = code
- Socket.OnRequestStart("area.animaInscriptionHandler.animaInscriptionUpgradeOneKeyRequest", option)
- Socket.Request("area.animaInscriptionHandler.animaInscriptionUpgradeOneKeyRequest", msg, function(res)
- if(res.s2c_code == 200) then
- Pomelo.AnimaInscriptionHandler.lastAnimaInscriptionUpgradeOneKeyResponse = res
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaInscriptionUpgradeOneKeyRequest", 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.animaInscriptionHandler.animaInscriptionUpgradeOneKeyRequest decode error!!"
- end
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaInscriptionUpgradeOneKeyRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, animaInscriptionUpgradeOneKeyRequestEncoder, animaInscriptionUpgradeOneKeyRequestDecoder)
- end
- local function animaSevenStarRequestEncoder(msg)
- local input = animaInscriptionHandler_pb.AnimaSevenStarRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function animaSevenStarRequestDecoder(stream)
- local res = animaInscriptionHandler_pb.AnimaSevenStarResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AnimaInscriptionHandler.animaSevenStarRequest(cb,option)
- local input = nil
- Socket.OnRequestStart("area.animaInscriptionHandler.animaSevenStarRequest", option)
- Socket.Request("area.animaInscriptionHandler.animaSevenStarRequest", input, function(res)
- if(res.s2c_code == 200) then
- Pomelo.AnimaInscriptionHandler.lastAnimaSevenStarResponse = res
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaSevenStarRequest", 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.animaInscriptionHandler.animaSevenStarRequest decode error!!"
- end
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaSevenStarRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, animaSevenStarRequestEncoder, animaSevenStarRequestDecoder)
- end
- local function animaLingZhuInfoRequestEncoder(msg)
- local input = animaInscriptionHandler_pb.AnimaLingZhuInfoRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function animaLingZhuInfoRequestDecoder(stream)
- local res = animaInscriptionHandler_pb.AnimaLingZhuInfoResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AnimaInscriptionHandler.animaLingZhuInfoRequest(cb,option)
- local input = nil
- Socket.OnRequestStart("area.animaInscriptionHandler.animaLingZhuInfoRequest", option)
- Socket.Request("area.animaInscriptionHandler.animaLingZhuInfoRequest", input, function(res)
- if(res.s2c_code == 200) then
- Pomelo.AnimaInscriptionHandler.lastAnimaLingZhuInfoResponse = res
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaLingZhuInfoRequest", 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.animaInscriptionHandler.animaLingZhuInfoRequest decode error!!"
- end
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaLingZhuInfoRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, animaLingZhuInfoRequestEncoder, animaLingZhuInfoRequestDecoder)
- end
- local function animaLingZhuUpgradeRequestEncoder(msg)
- local input = animaInscriptionHandler_pb.AnimaLingZhuUpgradeRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function animaLingZhuUpgradeRequestDecoder(stream)
- local res = animaInscriptionHandler_pb.AnimaLingZhuUpgradeResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AnimaInscriptionHandler.animaLingZhuUpgradeRequest(zhu_index,cb,option)
- local msg = {}
- msg.zhu_index = zhu_index
- Socket.OnRequestStart("area.animaInscriptionHandler.animaLingZhuUpgradeRequest", option)
- Socket.Request("area.animaInscriptionHandler.animaLingZhuUpgradeRequest", msg, function(res)
- if(res.s2c_code == 200) then
- Pomelo.AnimaInscriptionHandler.lastAnimaLingZhuUpgradeResponse = res
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaLingZhuUpgradeRequest", 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.animaInscriptionHandler.animaLingZhuUpgradeRequest decode error!!"
- end
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaLingZhuUpgradeRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, animaLingZhuUpgradeRequestEncoder, animaLingZhuUpgradeRequestDecoder)
- end
- local function animaGongFaInfoRequestEncoder(msg)
- local input = animaInscriptionHandler_pb.AnimaGongFaInfoRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function animaGongFaInfoRequestDecoder(stream)
- local res = animaInscriptionHandler_pb.AnimaGongFaInfoResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AnimaInscriptionHandler.animaGongFaInfoRequest(index,cb,option)
- local msg = {}
- msg.index = index
- Socket.OnRequestStart("area.animaInscriptionHandler.animaGongFaInfoRequest", option)
- Socket.Request("area.animaInscriptionHandler.animaGongFaInfoRequest", msg, function(res)
- if(res.s2c_code == 200) then
- Pomelo.AnimaInscriptionHandler.lastAnimaGongFaInfoResponse = res
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaGongFaInfoRequest", 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.animaInscriptionHandler.animaGongFaInfoRequest decode error!!"
- end
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaGongFaInfoRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, animaGongFaInfoRequestEncoder, animaGongFaInfoRequestDecoder)
- end
- local function animaGongFaStudyRequestEncoder(msg)
- local input = animaInscriptionHandler_pb.AnimaGongFaStudyRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function animaGongFaStudyRequestDecoder(stream)
- local res = animaInscriptionHandler_pb.AnimaGongFaStudyResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AnimaInscriptionHandler.animaGongFaStudyRequest(gong_index,bag_pos,cb,option)
- local msg = {}
- msg.gong_index = gong_index
- msg.bag_pos = bag_pos
- Socket.OnRequestStart("area.animaInscriptionHandler.animaGongFaStudyRequest", option)
- Socket.Request("area.animaInscriptionHandler.animaGongFaStudyRequest", msg, function(res)
- if(res.s2c_code == 200) then
- Pomelo.AnimaInscriptionHandler.lastAnimaGongFaStudyResponse = res
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaGongFaStudyRequest", 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.animaInscriptionHandler.animaGongFaStudyRequest decode error!!"
- end
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaGongFaStudyRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, animaGongFaStudyRequestEncoder, animaGongFaStudyRequestDecoder)
- end
- local function animaGongFaUpgradeRequestEncoder(msg)
- local input = animaInscriptionHandler_pb.AnimaGongFaUpgradeRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function animaGongFaUpgradeRequestDecoder(stream)
- local res = animaInscriptionHandler_pb.AnimaGongFaUpgradeResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.AnimaInscriptionHandler.animaGongFaUpgradeRequest(gpid,cb,option)
- local msg = {}
- msg.gpid = gpid
- Socket.OnRequestStart("area.animaInscriptionHandler.animaGongFaUpgradeRequest", option)
- Socket.Request("area.animaInscriptionHandler.animaGongFaUpgradeRequest", msg, function(res)
- if(res.s2c_code == 200) then
- Pomelo.AnimaInscriptionHandler.lastAnimaGongFaUpgradeResponse = res
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaGongFaUpgradeRequest", 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.animaInscriptionHandler.animaGongFaUpgradeRequest decode error!!"
- end
- Socket.OnRequestEnd("area.animaInscriptionHandler.animaGongFaUpgradeRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, animaGongFaUpgradeRequestEncoder, animaGongFaUpgradeRequestDecoder)
- end
- --------------------------------Pomelo-------------------------------
- return Pomelo
|