123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- -------------------------------------------------
- -- 本文件由代码生成器自动生成,
- -- 千万不要修改本文件的任何代码,
- -- 修改的的任何代码都会被覆盖掉!
- ----------------------------------------------------
- local Socket = require "Xmds.Pomelo.LuaGameSocket"
- require "base64"
- require "guildExtHandler_pb"
- --------------------------------Pomelo-------------------------------
- Pomelo = Pomelo or {}
- --------------------------------GuildExtHandler-------------------------------
- Pomelo.GuildExtHandler = {}
- local function getGuildRecordRequestEncoder(msg)
- local input = guildExtHandler_pb.GetGuildRecordRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function getGuildRecordRequestDecoder(stream)
- local res = guildExtHandler_pb.GetGuildRecordResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.GuildExtHandler.getGuildRecordRequest(page,cb,option)
- local msg = {}
- msg.page = page
- Socket.OnRequestStart("area.guildExtHandler.getGuildRecordRequest", option)
- Socket.Request("area.guildExtHandler.getGuildRecordRequest", msg, function(res)
- if(res.s2c_code == 200) then
- Pomelo.GuildExtHandler.lastGetGuildRecordResponse = res
- Socket.OnRequestEnd("area.guildExtHandler.getGuildRecordRequest", 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.guildExtHandler.getGuildRecordRequest decode error!!"
- end
- Socket.OnRequestEnd("area.guildExtHandler.getGuildRecordRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, getGuildRecordRequestEncoder, getGuildRecordRequestDecoder)
- end
- local function impeachGuildPresidentRequestEncoder(msg)
- local input = guildExtHandler_pb.ImpeachGuildPresidentRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function impeachGuildPresidentRequestDecoder(stream)
- local res = guildExtHandler_pb.ImpeachGuildPresidentResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.GuildExtHandler.impeachGuildPresidentRequest(cb,option)
- local input = nil
- Socket.OnRequestStart("area.guildExtHandler.impeachGuildPresidentRequest", option)
- Socket.Request("area.guildExtHandler.impeachGuildPresidentRequest", input, function(res)
- if(res.s2c_code == 200) then
- Pomelo.GuildExtHandler.lastImpeachGuildPresidentResponse = res
- Socket.OnRequestEnd("area.guildExtHandler.impeachGuildPresidentRequest", 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.guildExtHandler.impeachGuildPresidentRequest decode error!!"
- end
- Socket.OnRequestEnd("area.guildExtHandler.impeachGuildPresidentRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, impeachGuildPresidentRequestEncoder, impeachGuildPresidentRequestDecoder)
- end
- local function getGuildMoneyRequestEncoder(msg)
- local input = guildExtHandler_pb.GetGuildMoneyRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function getGuildMoneyRequestDecoder(stream)
- local res = guildExtHandler_pb.GetGuildMoneyResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.GuildExtHandler.getGuildMoneyRequest(cb,option)
- local input = nil
- Socket.OnRequestStart("area.guildExtHandler.getGuildMoneyRequest", option)
- Socket.Request("area.guildExtHandler.getGuildMoneyRequest", input, function(res)
- if(res.s2c_code == 200) then
- Pomelo.GuildExtHandler.lastGetGuildMoneyResponse = res
- Socket.OnRequestEnd("area.guildExtHandler.getGuildMoneyRequest", 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.guildExtHandler.getGuildMoneyRequest decode error!!"
- end
- Socket.OnRequestEnd("area.guildExtHandler.getGuildMoneyRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, getGuildMoneyRequestEncoder, getGuildMoneyRequestDecoder)
- end
- local function joinGuildDungeonRequestEncoder(msg)
- local input = guildExtHandler_pb.JoinGuildDungeonRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function joinGuildDungeonRequestDecoder(stream)
- local res = guildExtHandler_pb.JoinGuildDungeonResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.GuildExtHandler.joinGuildDungeonRequest(c2s_type,cb,option)
- local msg = {}
- msg.c2s_type = c2s_type
- Socket.OnRequestStart("area.guildExtHandler.joinGuildDungeonRequest", option)
- Socket.Request("area.guildExtHandler.joinGuildDungeonRequest", msg, function(res)
- if(res.s2c_code == 200) then
- Pomelo.GuildExtHandler.lastJoinGuildDungeonResponse = res
- Socket.OnRequestEnd("area.guildExtHandler.joinGuildDungeonRequest", 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.guildExtHandler.joinGuildDungeonRequest decode error!!"
- end
- Socket.OnRequestEnd("area.guildExtHandler.joinGuildDungeonRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, joinGuildDungeonRequestEncoder, joinGuildDungeonRequestDecoder)
- end
- local function leaveGuildDungeonRequestEncoder(msg)
- local input = guildExtHandler_pb.LeaveGuildDungeonRequest()
- protobuf.FromMessage(input,msg)
- return (input:SerializeToString())
- end
- local function leaveGuildDungeonRequestDecoder(stream)
- local res = guildExtHandler_pb.LeaveGuildDungeonResponse()
- res:ParseFromString(stream)
- return res
- end
- function Pomelo.GuildExtHandler.leaveGuildDungeonRequest(cb,option)
- local input = nil
- Socket.OnRequestStart("area.guildExtHandler.leaveGuildDungeonRequest", option)
- Socket.Request("area.guildExtHandler.leaveGuildDungeonRequest", input, function(res)
- if(res.s2c_code == 200) then
- Pomelo.GuildExtHandler.lastLeaveGuildDungeonResponse = res
- Socket.OnRequestEnd("area.guildExtHandler.leaveGuildDungeonRequest", 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.guildExtHandler.leaveGuildDungeonRequest decode error!!"
- end
- Socket.OnRequestEnd("area.guildExtHandler.leaveGuildDungeonRequest", false,ex.Code,ex.Message)
- cb(ex,nil)
- end
- end, leaveGuildDungeonRequestEncoder, leaveGuildDungeonRequestDecoder)
- end
- --------------------------------Pomelo-------------------------------
- return Pomelo
|