------------------------------------------------- -- 本文件由代码生成器自动生成, -- 千万不要修改本文件的任何代码, -- 修改的的任何代码都会被覆盖掉! ---------------------------------------------------- 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