Commit 91a40f4db4e555e566c0f6774e9635c9fe7d2066
Merge branch 'cn/develop' into cn/player
Showing
4 changed files
with
5 additions
and
1 deletions
Show diff stats
src/actions/ActivityAction.lua
@@ -135,6 +135,8 @@ function _M.signRpc(agent, data) | @@ -135,6 +135,8 @@ function _M.signRpc(agent, data) | ||
135 | return 2 | 135 | return 2 |
136 | end | 136 | end |
137 | signs[curDay] = yearMonth | 137 | signs[curDay] = yearMonth |
138 | + -- 记录玩家签到天数 | ||
139 | + role.activity:incrProperty("signInDay", 1) | ||
138 | 140 | ||
139 | -- 达到一定等级,签到会有额外奖励 | 141 | -- 达到一定等级,签到会有额外奖励 |
140 | local reward = role:getBnousDaily() | 142 | local reward = role:getBnousDaily() |
src/models/Activity.lua
@@ -68,6 +68,7 @@ Activity.schema = { | @@ -68,6 +68,7 @@ Activity.schema = { | ||
68 | id = {"number", 0, "pri"}, -- 角色id | 68 | id = {"number", 0, "pri"}, -- 角色id |
69 | actime = {"table", {}}, -- 最近检查某项活动的开始时间 {id = time} | 69 | actime = {"table", {}}, -- 最近检查某项活动的开始时间 {id = time} |
70 | round = {"table", {}}, -- 记录活动到了第几轮 {id = roundnum} | 70 | round = {"table", {}}, -- 记录活动到了第几轮 {id = roundnum} |
71 | + signInDay = {"number", 0}, -- 签到天数 | ||
71 | act4 = {"table", {}}, -- {0 = day, 1= -1, 2 = -1} == 签到活动 | 72 | act4 = {"table", {}}, -- {0 = day, 1= -1, 2 = -1} == 签到活动 |
72 | act6 = {"table", {}}, -- {0 = day, 1 = 1, 2 = 1} == 付费签到活动 | 73 | act6 = {"table", {}}, -- {0 = day, 1 = 1, 2 = 1} == 付费签到活动 |
73 | act8 = {"number", 0}, -- 充值返利 | 74 | act8 = {"number", 0}, -- 充值返利 |
src/models/Diner.lua
@@ -399,6 +399,7 @@ function Diner:updateRankRoleName(name) | @@ -399,6 +399,7 @@ function Diner:updateRankRoleName(name) | ||
399 | 399 | ||
400 | local roleId = self.owner:getProperty("id") | 400 | local roleId = self.owner:getProperty("id") |
401 | local redret = redisproxy:hget(RANK_DINER_INFO, roleId) | 401 | local redret = redisproxy:hget(RANK_DINER_INFO, roleId) |
402 | + if not redret then return end | ||
402 | if redret:len() > 0 then | 403 | if redret:len() > 0 then |
403 | local player = MsgPack.unpack(redret) | 404 | local player = MsgPack.unpack(redret) |
404 | player.name = name | 405 | player.name = name |