Commit bb89ada662d41e06389dc1598ef93a548a2d0994

Authored by zhouhaihai
2 parents 0d3dbda9 ba84f3c7

Merge branch 'develop' into tr/cb

config/develop.lua
@@ -15,5 +15,3 @@ redis_host = "127.0.0.1" @@ -15,5 +15,3 @@ redis_host = "127.0.0.1"
15 redis_port = 6100 15 redis_port = 6100
16 redis_db = 1 16 redis_db = 1
17 redis_auth = nil 17 redis_auth = nil
18 -  
19 -pay_url = ""  
20 \ No newline at end of file 18 \ No newline at end of file
src/actions/ActivityAction.lua
@@ -68,7 +68,7 @@ function _M.sudokuRpc(agent, data) @@ -68,7 +68,7 @@ function _M.sudokuRpc(agent, data)
68 role:log("activity", { 68 role:log("activity", {
69 activity_id = id, -- 活动ID(或活动指定任务的ID) 69 activity_id = id, -- 活动ID(或活动指定任务的ID)
70 activity_type = 0, -- 活动类型,见活动类型枚举表 70 activity_type = 0, -- 活动类型,见活动类型枚举表
71 - activity_reward = reward, -- 活动奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} 71 + activity_reward = reward or {}, -- 活动奖励,json格式记录,{'itemid1':123,'itemid2':456,………...}
72 }) 72 })
73 73
74 SendPacket(actionCodes.Activity_sudokuRpc, MsgPack.pack({task = role:packReward(task, tchange), reward = role:packReward(reward, rchange), rId = rId})) 74 SendPacket(actionCodes.Activity_sudokuRpc, MsgPack.pack({task = role:packReward(task, tchange), reward = role:packReward(reward, rchange), rId = rId}))
src/actions/RoleAction.lua
@@ -308,6 +308,13 @@ function _M.createRpc(agent, data) @@ -308,6 +308,13 @@ function _M.createRpc(agent, data)
308 SendPacket(actionCodes.Role_createRpc, MsgPack.pack(response)) 308 SendPacket(actionCodes.Role_createRpc, MsgPack.pack(response))
309 return true 309 return true
310 end 310 end
  311 + local stopcreate = tonumber(redisproxy:hget("autoincrement_set", "stopcreate"))
  312 + if stopcreate and stopcreate > 0 then
  313 + response.result = "STOP_CREATE"
  314 + SendPacket(actionCodes.Role_createRpc, MsgPack.pack(response))
  315 + return true
  316 + end
  317 +
311 318
312 local roleId = getNextRoleId() 319 local roleId = getNextRoleId()
313 if not roleId then 320 if not roleId then
src/actions/StoreAction.lua
@@ -2,7 +2,6 @@ local _M = {} @@ -2,7 +2,6 @@ local _M = {}
2 2
3 local serverId = tonumber(skynet.getenv("servId")) 3 local serverId = tonumber(skynet.getenv("servId"))
4 local md5 = require "md5" 4 local md5 = require "md5"
5 -local pay_url = skynet.getenv("pay_url") or ""  
6 5
7 local function makeOrder(roleId, rechargeId) 6 local function makeOrder(roleId, rechargeId)
8 local orderId = redisproxy:hincrby("autoincrement_set", "order", 1) 7 local orderId = redisproxy:hincrby("autoincrement_set", "order", 1)
@@ -86,7 +85,7 @@ function _M.googleRechargeRpc(agent, data) @@ -86,7 +85,7 @@ function _M.googleRechargeRpc(agent, data)
86 money = dataSet.rmb * 100, 85 money = dataSet.rmb * 100,
87 game_money = dataSet.diamond, 86 game_money = dataSet.diamond,
88 product_id = dataSet.productId, 87 product_id = dataSet.productId,
89 - notify_url = pay_url .. "/pay/google" 88 + notify_url = msg.notifyUrl
90 } 89 }
91 local sign = signPms(need, secret_key) 90 local sign = signPms(need, secret_key)
92 91
@@ -112,7 +111,7 @@ function _M.myCardRechargeRpc(agent, data) @@ -112,7 +111,7 @@ function _M.myCardRechargeRpc(agent, data)
112 out_trade_no = partnerOrderId, 111 out_trade_no = partnerOrderId,
113 money = dataSet.rmb * 100, 112 money = dataSet.rmb * 100,
114 game_money = dataSet.diamond, 113 game_money = dataSet.diamond,
115 - notify_url = pay_url .. "/pay/mycard" 114 + notify_url = msg.notifyUrl
116 } 115 }
117 local sign = signPms(need, secret_key) 116 local sign = signPms(need, secret_key)
118 117
@@ -139,7 +138,7 @@ function _M.iosRechargeRpc(agent, data) @@ -139,7 +138,7 @@ function _M.iosRechargeRpc(agent, data)
139 money = dataSet.rmb * 100, 138 money = dataSet.rmb * 100,
140 game_money = dataSet.diamond, 139 game_money = dataSet.diamond,
141 product_id = dataSet.iap_product_id, 140 product_id = dataSet.iap_product_id,
142 - notify_url = pay_url .. "/pay/ios" 141 + notify_url = msg.notifyUrl
143 } 142 }
144 local sign = signPms(need, secret_key) 143 local sign = signPms(need, secret_key)
145 144
1 -Subproject commit b026265df3a1755bad4a83630d7457b790232b3e 1 +Subproject commit 2de1748bed665c9220f68eeb23a8ce3d1f810bda
src/models/Role.lua
@@ -381,6 +381,8 @@ function Role:data() @@ -381,6 +381,8 @@ function Role:data()
381 381
382 redp = self:getProperty("redp"), 382 redp = self:getProperty("redp"),
383 chatline = self:getProperty("chatline"), 383 chatline = self:getProperty("chatline"),
  384 +
  385 + downCvR = self:getProperty("downCvR"), -- 下载cv扩展包奖励
384 } 386 }
385 end 387 end
386 388
src/models/RoleLog.lua
@@ -97,6 +97,7 @@ local ItemReason = { @@ -97,6 +97,7 @@ local ItemReason = {
97 createHeroRandom = 1206, -- 随机合成 97 createHeroRandom = 1206, -- 随机合成
98 resetHero = 1207, -- 重置养成 98 resetHero = 1207, -- 重置养成
99 unlockPool = 1208, -- 解锁英雄定向抽卡池 99 unlockPool = 1208, -- 解锁英雄定向抽卡池
  100 + downloadCv = 1209, -- 下载 cv包奖励
100 } 101 }
101 102
102 103
src/models/RolePlugin.lua
@@ -229,7 +229,7 @@ function RolePlugin.bind(Role) @@ -229,7 +229,7 @@ function RolePlugin.bind(Role)
229 self:log("setLevel", { 229 self:log("setLevel", {
230 level_before = oldLevel, 230 level_before = oldLevel,
231 level_changemain = log.desc, 231 level_changemain = log.desc,
232 - level_changedetail = log.sub, 232 + level_changedetail = log.sub or "",
233 level_reward = {}, 233 level_reward = {},
234 }) 234 })
235 else 235 else
src/models/Store.lua
@@ -270,11 +270,12 @@ end @@ -270,11 +270,12 @@ end
270 --触发限时礼包 270 --触发限时礼包
271 function Store:OnTriggerLimitTimePack(eventType, param) 271 function Store:OnTriggerLimitTimePack(eventType, param)
272 local limitPack = self:getProperty("limitTPack") 272 local limitPack = self:getProperty("limitTPack")
  273 + local payRecord = self:getProperty("payR")
273 local timeNow = skynet.timex() 274 local timeNow = skynet.timex()
274 local find = false 275 local find = false
275 -- 有未过期的限时礼包不再推送 276 -- 有未过期的限时礼包不再推送
276 for k, v in pairs(limitPack) do 277 for k, v in pairs(limitPack) do
277 - if v > timeNow then 278 + if v > timeNow and not payRecord[k] then
278 find = true 279 find = true
279 break 280 break
280 end 281 end
src/services/globald.lua
@@ -60,25 +60,25 @@ local function mailQuene() @@ -60,25 +60,25 @@ local function mailQuene()
60 if email.mid then 60 if email.mid then
61 redisproxy:hmset(string_format("globalEmail:%s", gid), 61 redisproxy:hmset(string_format("globalEmail:%s", gid),
62 "id", gid, 62 "id", gid,
63 - "createtime", email.endTime, 63 + "createtime", email.startTime,
64 "title", email.title, 64 "title", email.title,
65 "stitle", email.stitle, 65 "stitle", email.stitle,
66 "content", email.content, 66 "content", email.content,
67 "attachments", email.attachments, 67 "attachments", email.attachments,
68 "endtime", email.endTime, 68 "endtime", email.endTime,
69 "mid", email.mid, 69 "mid", email.mid,
70 - "timestamp", email.startTime 70 + "timestamp", now
71 ) 71 )
72 else 72 else
73 redisproxy:hmset(string_format("globalEmail:%s", gid), 73 redisproxy:hmset(string_format("globalEmail:%s", gid),
74 "id", gid, 74 "id", gid,
75 - "createtime", email.endTime, 75 + "createtime", email.startTime,
76 "title", email.title, 76 "title", email.title,
77 "stitle", email.stitle, 77 "stitle", email.stitle,
78 "content", email.content, 78 "content", email.content,
79 "attachments", email.attachments, 79 "attachments", email.attachments,
80 "endtime", email.endTime, 80 "endtime", email.endTime,
81 - "timestamp", email.startTime 81 + "timestamp", now
82 ) 82 )
83 end 83 end
84 end 84 end
src/services/logd.lua
@@ -65,7 +65,7 @@ function CMD.log(doc) @@ -65,7 +65,7 @@ function CMD.log(doc)
65 end 65 end
66 66
67 function CMD.open() 67 function CMD.open()
68 - log_fd = socketdriver.connect("127.0.0.1", 5170) 68 + log_fd = socketdriver.connect("127.0.0.1", 13001)
69 connecting = true 69 connecting = true
70 end 70 end
71 71