------------------------------------------------- -- 本文件由代码生成器自动生成, -- 千万不要修改本文件的任何代码, -- 修改的的任何代码都会被覆盖掉! ---------------------------------------------------- local Socket = require "Xmds.Pomelo.LuaGameSocket" require "base64" require "spiritualHelpHandler_pb" --------------------------------Pomelo------------------------------- Pomelo = Pomelo or {} --------------------------------SpiritualHelpHandler------------------------------- Pomelo.SpiritualHelpHandler = {} local function spiritualTalkInfoRequestEncoder(msg) local input = spiritualHelpHandler_pb.SpiritualTalkInfoRequest() protobuf.FromMessage(input,msg) return (input:SerializeToString()) end local function spiritualTalkInfoRequestDecoder(stream) local res = spiritualHelpHandler_pb.SpiritualTalkInfoResponse() res:ParseFromString(stream) return res end function Pomelo.SpiritualHelpHandler.spiritualTalkInfoRequest(cb,option) local input = nil Socket.OnRequestStart("area.spiritualHelpHandler.spiritualTalkInfoRequest", option) Socket.Request("area.spiritualHelpHandler.spiritualTalkInfoRequest", input, function(res) if(res.s2c_code == 200) then Pomelo.SpiritualHelpHandler.lastSpiritualTalkInfoResponse = res Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualTalkInfoRequest", 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.spiritualHelpHandler.spiritualTalkInfoRequest decode error!!" end Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualTalkInfoRequest", false,ex.Code,ex.Message) cb(ex,nil) end end, spiritualTalkInfoRequestEncoder, spiritualTalkInfoRequestDecoder) end local function spiritualTalkRequestEncoder(msg) local input = spiritualHelpHandler_pb.SpiritualTalkRequest() protobuf.FromMessage(input,msg) return (input:SerializeToString()) end local function spiritualTalkRequestDecoder(stream) local res = spiritualHelpHandler_pb.SpiritualTalkResponse() res:ParseFromString(stream) return res end function Pomelo.SpiritualHelpHandler.spiritualTalkRequest(cb,option) local input = nil Socket.OnRequestStart("area.spiritualHelpHandler.spiritualTalkRequest", option) Socket.Request("area.spiritualHelpHandler.spiritualTalkRequest", input, function(res) if(res.s2c_code == 200) then Pomelo.SpiritualHelpHandler.lastSpiritualTalkResponse = res Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualTalkRequest", 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.spiritualHelpHandler.spiritualTalkRequest decode error!!" end Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualTalkRequest", false,ex.Code,ex.Message) cb(ex,nil) end end, spiritualTalkRequestEncoder, spiritualTalkRequestDecoder) end local function spiritualTalkHistoryRequestEncoder(msg) local input = spiritualHelpHandler_pb.SpiritualTalkHistoryRequest() protobuf.FromMessage(input,msg) return (input:SerializeToString()) end local function spiritualTalkHistoryRequestDecoder(stream) local res = spiritualHelpHandler_pb.SpiritualTalkHistoryResponse() res:ParseFromString(stream) return res end function Pomelo.SpiritualHelpHandler.spiritualTalkHistoryRequest(s2c_is_record,s2c_last_read_id,cb,option) local msg = {} msg.s2c_is_record = s2c_is_record msg.s2c_last_read_id = s2c_last_read_id Socket.OnRequestStart("area.spiritualHelpHandler.spiritualTalkHistoryRequest", option) Socket.Request("area.spiritualHelpHandler.spiritualTalkHistoryRequest", msg, function(res) if(res.s2c_code == 200) then Pomelo.SpiritualHelpHandler.lastSpiritualTalkHistoryResponse = res Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualTalkHistoryRequest", 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.spiritualHelpHandler.spiritualTalkHistoryRequest decode error!!" end Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualTalkHistoryRequest", false,ex.Code,ex.Message) cb(ex,nil) end end, spiritualTalkHistoryRequestEncoder, spiritualTalkHistoryRequestDecoder) end local function spiritualUpgradeInfoRequestEncoder(msg) local input = spiritualHelpHandler_pb.SpiritualUpgradeInfoRequest() protobuf.FromMessage(input,msg) return (input:SerializeToString()) end local function spiritualUpgradeInfoRequestDecoder(stream) local res = spiritualHelpHandler_pb.SpiritualUpgradeInfoResponse() res:ParseFromString(stream) return res end function Pomelo.SpiritualHelpHandler.spiritualUpgradeInfoRequest(cb,option) local input = nil Socket.OnRequestStart("area.spiritualHelpHandler.spiritualUpgradeInfoRequest", option) Socket.Request("area.spiritualHelpHandler.spiritualUpgradeInfoRequest", input, function(res) if(res.s2c_code == 200) then Pomelo.SpiritualHelpHandler.lastSpiritualUpgradeInfoResponse = res Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualUpgradeInfoRequest", 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.spiritualHelpHandler.spiritualUpgradeInfoRequest decode error!!" end Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualUpgradeInfoRequest", false,ex.Code,ex.Message) cb(ex,nil) end end, spiritualUpgradeInfoRequestEncoder, spiritualUpgradeInfoRequestDecoder) end local function spiritualUpgradeRequestEncoder(msg) local input = spiritualHelpHandler_pb.SpiritualUpgradeRequest() protobuf.FromMessage(input,msg) return (input:SerializeToString()) end local function spiritualUpgradeRequestDecoder(stream) local res = spiritualHelpHandler_pb.SpiritualUpgradeResponse() res:ParseFromString(stream) return res end function Pomelo.SpiritualHelpHandler.spiritualUpgradeRequest(c2s_start_end,cb,option) local msg = {} msg.c2s_start_end = c2s_start_end Socket.OnRequestStart("area.spiritualHelpHandler.spiritualUpgradeRequest", option) Socket.Request("area.spiritualHelpHandler.spiritualUpgradeRequest", msg, function(res) if(res.s2c_code == 200) then Pomelo.SpiritualHelpHandler.lastSpiritualUpgradeResponse = res Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualUpgradeRequest", 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.spiritualHelpHandler.spiritualUpgradeRequest decode error!!" end Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualUpgradeRequest", false,ex.Code,ex.Message) cb(ex,nil) end end, spiritualUpgradeRequestEncoder, spiritualUpgradeRequestDecoder) end local function spiritualUpgradeAirRequestEncoder(msg) local input = spiritualHelpHandler_pb.SpiritualUpgradeAirRequest() protobuf.FromMessage(input,msg) return (input:SerializeToString()) end local function spiritualUpgradeAirRequestDecoder(stream) local res = spiritualHelpHandler_pb.SpiritualUpgradeAirResponse() res:ParseFromString(stream) return res end function Pomelo.SpiritualHelpHandler.spiritualUpgradeAirRequest(cb,option) local input = nil Socket.OnRequestStart("area.spiritualHelpHandler.spiritualUpgradeAirRequest", option) Socket.Request("area.spiritualHelpHandler.spiritualUpgradeAirRequest", input, function(res) if(res.s2c_code == 200) then Pomelo.SpiritualHelpHandler.lastSpiritualUpgradeAirResponse = res Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualUpgradeAirRequest", 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.spiritualHelpHandler.spiritualUpgradeAirRequest decode error!!" end Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualUpgradeAirRequest", false,ex.Code,ex.Message) cb(ex,nil) end end, spiritualUpgradeAirRequestEncoder, spiritualUpgradeAirRequestDecoder) end local function spiritualUpgradeButtonRequestEncoder(msg) local input = spiritualHelpHandler_pb.SpiritualUpgradeButtonRequest() protobuf.FromMessage(input,msg) return (input:SerializeToString()) end local function spiritualUpgradeButtonRequestDecoder(stream) local res = spiritualHelpHandler_pb.SpiritualUpgradeButtonResponse() res:ParseFromString(stream) return res end function Pomelo.SpiritualHelpHandler.spiritualUpgradeButtonRequest(cb,option) local input = nil Socket.OnRequestStart("area.spiritualHelpHandler.spiritualUpgradeButtonRequest", option) Socket.Request("area.spiritualHelpHandler.spiritualUpgradeButtonRequest", input, function(res) if(res.s2c_code == 200) then Pomelo.SpiritualHelpHandler.lastSpiritualUpgradeButtonResponse = res Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualUpgradeButtonRequest", 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.spiritualHelpHandler.spiritualUpgradeButtonRequest decode error!!" end Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualUpgradeButtonRequest", false,ex.Code,ex.Message) cb(ex,nil) end end, spiritualUpgradeButtonRequestEncoder, spiritualUpgradeButtonRequestDecoder) end local function spiritualBornInfoRequestEncoder(msg) local input = spiritualHelpHandler_pb.SpiritualBornInfoRequest() protobuf.FromMessage(input,msg) return (input:SerializeToString()) end local function spiritualBornInfoRequestDecoder(stream) local res = spiritualHelpHandler_pb.SpiritualBornInfoResponse() res:ParseFromString(stream) return res end function Pomelo.SpiritualHelpHandler.spiritualBornInfoRequest(cb,option) local input = nil Socket.OnRequestStart("area.spiritualHelpHandler.spiritualBornInfoRequest", option) Socket.Request("area.spiritualHelpHandler.spiritualBornInfoRequest", input, function(res) if(res.s2c_code == 200) then Pomelo.SpiritualHelpHandler.lastSpiritualBornInfoResponse = res Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualBornInfoRequest", 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.spiritualHelpHandler.spiritualBornInfoRequest decode error!!" end Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualBornInfoRequest", false,ex.Code,ex.Message) cb(ex,nil) end end, spiritualBornInfoRequestEncoder, spiritualBornInfoRequestDecoder) end local function spiritualBornButtonRequestEncoder(msg) local input = spiritualHelpHandler_pb.SpiritualBornButtonRequest() protobuf.FromMessage(input,msg) return (input:SerializeToString()) end local function spiritualBornButtonRequestDecoder(stream) local res = spiritualHelpHandler_pb.SpiritualBornButtonResponse() res:ParseFromString(stream) return res end function Pomelo.SpiritualHelpHandler.spiritualBornButtonRequest(cb,option) local input = nil Socket.OnRequestStart("area.spiritualHelpHandler.spiritualBornButtonRequest", option) Socket.Request("area.spiritualHelpHandler.spiritualBornButtonRequest", input, function(res) if(res.s2c_code == 200) then Pomelo.SpiritualHelpHandler.lastSpiritualBornButtonResponse = res Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualBornButtonRequest", 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.spiritualHelpHandler.spiritualBornButtonRequest decode error!!" end Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualBornButtonRequest", false,ex.Code,ex.Message) cb(ex,nil) end end, spiritualBornButtonRequestEncoder, spiritualBornButtonRequestDecoder) end local function spiritualBornKillRequestEncoder(msg) local input = spiritualHelpHandler_pb.SpiritualBornKillRequest() protobuf.FromMessage(input,msg) return (input:SerializeToString()) end local function spiritualBornKillRequestDecoder(stream) local res = spiritualHelpHandler_pb.SpiritualBornKillResponse() res:ParseFromString(stream) return res end function Pomelo.SpiritualHelpHandler.spiritualBornKillRequest(cb,option) local input = nil Socket.OnRequestStart("area.spiritualHelpHandler.spiritualBornKillRequest", option) Socket.Request("area.spiritualHelpHandler.spiritualBornKillRequest", input, function(res) if(res.s2c_code == 200) then Pomelo.SpiritualHelpHandler.lastSpiritualBornKillResponse = res Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualBornKillRequest", 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.spiritualHelpHandler.spiritualBornKillRequest decode error!!" end Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualBornKillRequest", false,ex.Code,ex.Message) cb(ex,nil) end end, spiritualBornKillRequestEncoder, spiritualBornKillRequestDecoder) end local function spiritualUpgradeBackRequestEncoder(msg) local input = spiritualHelpHandler_pb.SpiritualUpgradeBackRequest() protobuf.FromMessage(input,msg) return (input:SerializeToString()) end local function spiritualUpgradeBackRequestDecoder(stream) local res = spiritualHelpHandler_pb.SpiritualUpgradeBackResponse() res:ParseFromString(stream) return res end function Pomelo.SpiritualHelpHandler.spiritualUpgradeBackRequest(cb,option) local input = nil Socket.OnRequestStart("area.spiritualHelpHandler.spiritualUpgradeBackRequest", option) Socket.Request("area.spiritualHelpHandler.spiritualUpgradeBackRequest", input, function(res) if(res.s2c_code == 200) then Pomelo.SpiritualHelpHandler.lastSpiritualUpgradeBackResponse = res Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualUpgradeBackRequest", 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.spiritualHelpHandler.spiritualUpgradeBackRequest decode error!!" end Socket.OnRequestEnd("area.spiritualHelpHandler.spiritualUpgradeBackRequest", false,ex.Code,ex.Message) cb(ex,nil) end end, spiritualUpgradeBackRequestEncoder, spiritualUpgradeBackRequestDecoder) end --------------------------------Pomelo------------------------------- return Pomelo