Commit bc50c9714b3941fe2ecca44f21822c8dbeb16eab
Merge remote-tracking branch 'origin/cn/develop' into cn/develop
Showing
5 changed files
with
18 additions
and
2 deletions
Show diff stats
robot/robot.lua
@@ -136,6 +136,18 @@ function CMD.task() | @@ -136,6 +136,18 @@ function CMD.task() | ||
136 | startUnit() | 136 | startUnit() |
137 | end | 137 | end |
138 | 138 | ||
139 | +function randomName() | ||
140 | + local str = "1234567890abcdefghijklmnopqrstuvwxyz" | ||
141 | + local len = #str | ||
142 | + local result = "" | ||
143 | + for i=1,10 do | ||
144 | + local idx = math.random(1, len) | ||
145 | + result = result .. string.sub(str, idx, idx) | ||
146 | + end | ||
147 | + | ||
148 | + return result | ||
149 | +end | ||
150 | + | ||
139 | -- 开始登录 | 151 | -- 开始登录 |
140 | function CMD.start(fd, id) | 152 | function CMD.start(fd, id) |
141 | client.fd = fd | 153 | client.fd = fd |
src/GlobalVar.lua
@@ -371,6 +371,8 @@ MailId = { | @@ -371,6 +371,8 @@ MailId = { | ||
371 | CBBackAward2 = 244, | 371 | CBBackAward2 = 244, |
372 | ActivityPoolRet = 280, | 372 | ActivityPoolRet = 280, |
373 | MyCardBuy = 300, | 373 | MyCardBuy = 300, |
374 | + | ||
375 | + RechargeBack = 3001, | ||
374 | } | 376 | } |
375 | 377 | ||
376 | TriggerEventType = { | 378 | TriggerEventType = { |
src/actions/GmAction.lua
@@ -729,6 +729,8 @@ function _M.cz(role, pms) | @@ -729,6 +729,8 @@ function _M.cz(role, pms) | ||
729 | pay_time = skynet.timex(), | 729 | pay_time = skynet.timex(), |
730 | sid = sid == 1 and IOS_SID or 0, | 730 | sid = sid == 1 and IOS_SID or 0, |
731 | }) | 731 | }) |
732 | + -- 补发邮件 | ||
733 | + role:sendMail(MailId.RechargeBack) | ||
732 | role:mylog("gm_action", {desc = "recharge", int1 = id, key1 = pms.sender}) | 734 | role:mylog("gm_action", {desc = "recharge", int1 = id, key1 = pms.sender}) |
733 | return "指令成功" | 735 | return "指令成功" |
734 | end | 736 | end |
src/agent.lua
@@ -36,7 +36,7 @@ local function handle_timeout() | @@ -36,7 +36,7 @@ local function handle_timeout() | ||
36 | end | 36 | end |
37 | 37 | ||
38 | local function handle_gc() | 38 | local function handle_gc() |
39 | - if agentInfo.open_timer then return end | 39 | + if not agentInfo.open_timer then return end |
40 | collectgarbage("collect") | 40 | collectgarbage("collect") |
41 | skynet.timeout(6000, handle_gc) | 41 | skynet.timeout(6000, handle_gc) |
42 | end | 42 | end |