314bc5df
zhengshouren
提交服务器初始代码
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
local _M = {}
local redisproxy = redisproxy
function _M.clientRequest(agent, data)
local msg = MsgPack.unpack(data)
local role = agent.role
local action = _M[msg.cmd]
local bin = MsgPack.pack({ cmd = "指令失败" })
if not action then
SendPacket(actionCodes.Gm_receiveResponse, bin)
return true
end
local ret = action(role, msg)
bin = MsgPack.pack({ cmd = ret })
SendPacket(actionCodes.Gm_receiveResponse, bin)
return true
end
|
4b7c7c96
zhouahaihai
增加 清空 挂机 冒险gm 角色经验
|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
function _M.advc(role, pms)
role:updateProperty({field = "advInfo", value = {}})
role:updateProperty({field = "advItems", value = ""})
role:updateProperty({field = "advTeam", value = {}})
role.advData = nil
return "成功"
end
function _M.idlec(role, pms)
role:updateProperty({field = "hangTeam", value = {}})
role:updateProperty({field = "hangInfo", value = {}})
role:updateProperty({field = "hangBag", value = {}})
role.advData = nil
return "成功"
end
|