|
|
@@ -16,16 +16,17 @@ local Util = require("common.Util")
|
|
|
local AuthCheck = require("scene.AuthCheck")
|
|
|
local ApiLogic = require("platform.ApiLogic")
|
|
|
local CDKLoigc = require("present.CDK")
|
|
|
+local MailManager = require("mail.MailManager")
|
|
|
|
|
|
function CG_TEST_PROTO(fd,msg)
|
|
|
print("============ CG_TEST_PROTO")
|
|
|
- local human = ObjHuman.onlineAccount[msg.account]
|
|
|
- if not human then
|
|
|
- -- 玩家不在线 做一个离线处理
|
|
|
- return
|
|
|
- end
|
|
|
local param = Json.Decode(msg.param)
|
|
|
- if param.type == "UseCDK" then
|
|
|
+ if param.type == "UseCDK" then
|
|
|
+ local human = ObjHuman.onlineAccount[msg.account]
|
|
|
+ if not human then
|
|
|
+ -- 玩家不在线 做一个离线处理
|
|
|
+ return
|
|
|
+ end
|
|
|
local batch = Json.Decode(param.batchInfo)
|
|
|
CDKLoigc.cdkDo(human,{
|
|
|
itemList = Json.Decode(batch.itenList),
|
|
|
@@ -35,7 +36,20 @@ function CG_TEST_PROTO(fd,msg)
|
|
|
err = param.err,
|
|
|
})
|
|
|
elseif param.type == "UseFixCDK" then
|
|
|
- CDKLoigc.cdkFixDo(human,param.code) -- 走本地cdk激活码
|
|
|
+ local human = ObjHuman.onlineAccount[msg.account]
|
|
|
+ if not human then
|
|
|
+ -- 玩家不在线 做一个离线处理
|
|
|
+ return
|
|
|
+ end
|
|
|
+ CDKLoigc.cdkFixDo(human,param.code) --
|
|
|
+ elseif param.type == "sendMail" then
|
|
|
+ local mail = Json.Decode(param.mail)
|
|
|
+ MailManager.add(MailManager.SYSTEM,mail.uuid,mail.title,mail.content,mail.items,nil,nil,nil,nil,nil,nil,mail.expire)
|
|
|
+ elseif param.type == "kickAllUser" then
|
|
|
+ for _,h in pairs(ObjHuman.onlineAccount) do
|
|
|
+ ObjHuman.doDisconnect(h, CommonDefine.DISCONNECT_KICK_ALL)
|
|
|
+ sendDisconnect(h,CommonDefine.DISCONNECT_KICK_ALL)
|
|
|
+ end
|
|
|
end
|
|
|
end
|
|
|
|
|
|
@@ -93,6 +107,7 @@ function CG_ASK_LOGIN(fd, msg)
|
|
|
if msg.account == "H1EqhbpA80jt0Jw6Q3T2" then
|
|
|
print("测试支付回调")
|
|
|
local payParams = Json.Decode(msg.params)
|
|
|
+ print(table.print_lua_table(payParams))
|
|
|
oJsonInput = {
|
|
|
type=1,
|
|
|
id=payParams.id,--商品id
|