Commit 0a2bd4e070a563d3a0d663a65828e5af53df9509
Merge branch 'bugfix' into tr/cb
* bugfix: 调整顺序 签到成就 充值返利邮件内容优化 奖励关卡活动未开启导致Bug 每周循环任务bug 运营需要 屏蔽字 优化
Showing
10 changed files
with
62 additions
and
22 deletions
Show diff stats
src/actions/ActivityAction.lua
@@ -138,6 +138,7 @@ function _M.signRpc(agent, data) | @@ -138,6 +138,7 @@ function _M.signRpc(agent, data) | ||
138 | 138 | ||
139 | local reward, change = role:award(monthData[curDay].item, {log = {desc = "sign", int1 = yearMonth, int2 = curDay}}) | 139 | local reward, change = role:award(monthData[curDay].item, {log = {desc = "sign", int1 = yearMonth, int2 = curDay}}) |
140 | role:changeUpdates({{type = "sign", field = curDay, value = yearMonth}}) | 140 | role:changeUpdates({{type = "sign", field = curDay, value = yearMonth}}) |
141 | + role:checkTaskEnter("SignIn") | ||
141 | 142 | ||
142 | SendPacket(actionCodes.Activity_signRpc, MsgPack.pack(role:packReward(reward, change))) | 143 | SendPacket(actionCodes.Activity_signRpc, MsgPack.pack(role:packReward(reward, change))) |
143 | return true | 144 | return true |
src/actions/HangAction.lua
@@ -483,9 +483,11 @@ function _M.buyBonusCountRpc(agent, data) | @@ -483,9 +483,11 @@ function _M.buyBonusCountRpc(agent, data) | ||
483 | if not TimeReset["DailyBattle" .. btype] then return end | 483 | if not TimeReset["DailyBattle" .. btype] then return end |
484 | local open, actId = role.activity:isOpen("BonusDouble") | 484 | local open, actId = role.activity:isOpen("BonusDouble") |
485 | local actData = csvdb["activity_ctrlCsv"][actId] | 485 | local actData = csvdb["activity_ctrlCsv"][actId] |
486 | - if not actData then return end | ||
487 | 486 | ||
488 | - local coef = open and tonumber(actData.condition2) or 1 | 487 | + local coef = 1 |
488 | + if open and actData then | ||
489 | + coef= tonumber(actData.condition2) | ||
490 | + end | ||
489 | 491 | ||
490 | local bonusC = role.dailyData:getProperty("bonusC") | 492 | local bonusC = role.dailyData:getProperty("bonusC") |
491 | bonusC[btype] = bonusC[btype] or {c = 0, b = 0} | 493 | bonusC[btype] = bonusC[btype] or {c = 0, b = 0} |
@@ -528,9 +530,11 @@ function _M.startBonusBattleRpc(agent, data) | @@ -528,9 +530,11 @@ function _M.startBonusBattleRpc(agent, data) | ||
528 | bonusC[bonusData.type] = bonusC[bonusData.type] or {c = 0, b = 0} | 530 | bonusC[bonusData.type] = bonusC[bonusData.type] or {c = 0, b = 0} |
529 | 531 | ||
530 | local actData = csvdb["activity_ctrlCsv"][actId] | 532 | local actData = csvdb["activity_ctrlCsv"][actId] |
531 | - if not actData then return 6 end | ||
532 | 533 | ||
533 | - local coef = open and tonumber(actData.condition2) or 1 | 534 | + local coef = 1 |
535 | + if open and actData then | ||
536 | + coef = tonumber(actData.condition2) | ||
537 | + end | ||
534 | 538 | ||
535 | if globalCsv.bonus_daily_count * coef - bonusC[bonusData.type]["c"] <= 0 then return 7 end | 539 | if globalCsv.bonus_daily_count * coef - bonusC[bonusData.type]["c"] <= 0 then return 7 end |
536 | 540 | ||
@@ -552,9 +556,11 @@ function _M.endBonusBattleRpc(agent, data) | @@ -552,9 +556,11 @@ function _M.endBonusBattleRpc(agent, data) | ||
552 | if not role.__bonusBattleCache then return 1 end | 556 | if not role.__bonusBattleCache then return 1 end |
553 | local open, actId = role.activity:isOpen("BonusDouble") | 557 | local open, actId = role.activity:isOpen("BonusDouble") |
554 | local actData = csvdb["activity_ctrlCsv"][actId] | 558 | local actData = csvdb["activity_ctrlCsv"][actId] |
555 | - if not actData then return end | ||
556 | 559 | ||
557 | - local coef = open and tonumber(actData.condition2) or 1 | 560 | + local coef = 1 |
561 | + if open and actData then | ||
562 | + coef = tonumber(actData.condition2) | ||
563 | + end | ||
558 | 564 | ||
559 | if role.__bonusBattleCache.id ~= id or role.__bonusBattleCache.key ~= key then | 565 | if role.__bonusBattleCache.id ~= id or role.__bonusBattleCache.key ~= key then |
560 | SendPacket(actionCodes.Hang_endBonusBattleRpc, MsgPack.pack({errorCode = 1})) | 566 | SendPacket(actionCodes.Hang_endBonusBattleRpc, MsgPack.pack({errorCode = 1})) |
src/actions/RoleAction.lua
@@ -160,6 +160,7 @@ function _M.loginRpc( agent, data ) | @@ -160,6 +160,7 @@ function _M.loginRpc( agent, data ) | ||
160 | local resetMode = role:updateTimeReset(now) | 160 | local resetMode = role:updateTimeReset(now) |
161 | if not resetMode or not resetMode["CrossDay"] then -- 没有跨天 | 161 | if not resetMode or not resetMode["CrossDay"] then -- 没有跨天 |
162 | role.activity:checkActivityStatus(now, false, false) | 162 | role.activity:checkActivityStatus(now, false, false) |
163 | + role:log("onLogin") | ||
163 | end | 164 | end |
164 | 165 | ||
165 | redisproxy:zadd(FRIEND_RECOMMEND, now, roleId) | 166 | redisproxy:zadd(FRIEND_RECOMMEND, now, roleId) |
@@ -291,7 +292,6 @@ function _M.loginRpc( agent, data ) | @@ -291,7 +292,6 @@ function _M.loginRpc( agent, data ) | ||
291 | role:savePvpHTeam() | 292 | role:savePvpHTeam() |
292 | 293 | ||
293 | local hangPass = role:getProperty("hangPass") | 294 | local hangPass = role:getProperty("hangPass") |
294 | - role:log("onLogin") | ||
295 | role:mylog("login", {key1 = agent.ip:toArray(false, ":")[1], int1 = hangPass[1] or 0}) | 295 | role:mylog("login", {key1 = agent.ip:toArray(false, ":")[1], int1 = hangPass[1] or 0}) |
296 | if msg.newdevice then | 296 | if msg.newdevice then |
297 | role:mylog("newdevice", {key1 = agent.ip:toArray(false, ":")[1]}) | 297 | role:mylog("newdevice", {key1 = agent.ip:toArray(false, ":")[1]}) |
src/models/Activity.lua
@@ -218,10 +218,15 @@ function Activity:checkWeeklyAct(actType, notify, count, pool) | @@ -218,10 +218,15 @@ function Activity:checkWeeklyAct(actType, notify, count, pool) | ||
218 | local info = actInfoMap[actType] | 218 | local info = actInfoMap[actType] |
219 | if not info then return end | 219 | if not info then return end |
220 | 220 | ||
221 | + local open, actId = self:isOpen(actType) | ||
222 | + if not open then | ||
223 | + return | ||
224 | + end | ||
225 | + | ||
221 | local curData = self:getActData(actType) | 226 | local curData = self:getActData(actType) |
222 | local roundData = self:getProperty("round") | 227 | local roundData = self:getProperty("round") |
223 | local curRound = roundData[actType] or 0 | 228 | local curRound = roundData[actType] or 0 |
224 | - local ctrlData = csvdb["activity_ctrlCsv"][actType] | 229 | + local ctrlData = csvdb["activity_ctrlCsv"][actId] |
225 | if not ctrlData then return end | 230 | if not ctrlData then return end |
226 | if curRound >= ctrlData.condition then | 231 | if curRound >= ctrlData.condition then |
227 | return | 232 | return |
@@ -350,7 +355,7 @@ activityFunc[Activity.ActivityType.PayBack] = { | @@ -350,7 +355,7 @@ activityFunc[Activity.ActivityType.PayBack] = { | ||
350 | local newVal = oldVal + twd | 355 | local newVal = oldVal + twd |
351 | local gift, checkPoint = self.owner:getPaybackReward(oldVal, newVal) | 356 | local gift, checkPoint = self.owner:getPaybackReward(oldVal, newVal) |
352 | if gift ~= "" then | 357 | if gift ~= "" then |
353 | - local strCp = table.concat(checkPoint ,"/") | 358 | + local strCp = table.concat(checkPoint ,"、") |
354 | self.owner:sendMail(MailId.PayBackAward, nil, gift, {newVal, strCp}) | 359 | self.owner:sendMail(MailId.PayBackAward, nil, gift, {newVal, strCp}) |
355 | end | 360 | end |
356 | self:updateActData(actType, newVal, not notify) | 361 | self:updateActData(actType, newVal, not notify) |
src/models/RoleLog.lua
@@ -367,7 +367,6 @@ local MethodType = { | @@ -367,7 +367,6 @@ local MethodType = { | ||
367 | --]] | 367 | --]] |
368 | friend_opt = { --好友操作 | 368 | friend_opt = { --好友操作 |
369 | friend_opt_type = true, -- 好友操作类型,见枚举表中 好友操作类型枚举表 | 369 | friend_opt_type = true, -- 好友操作类型,见枚举表中 好友操作类型枚举表 |
370 | - friend_accountid = true, -- 好友账户id | ||
371 | friend_roleid = true, -- 好友账户下的角色id | 370 | friend_roleid = true, -- 好友账户下的角色id |
372 | friend_cnt = true, -- 操作后好友数量 | 371 | friend_cnt = true, -- 操作后好友数量 |
373 | }, | 372 | }, |
src/models/RoleTask.lua
@@ -82,8 +82,13 @@ local TaskType = { | @@ -82,8 +82,13 @@ local TaskType = { | ||
82 | GetFriendP = 803, -- 获得友情点 - count | 82 | GetFriendP = 803, -- 获得友情点 - count |
83 | 83 | ||
84 | -- 角色相关 | 84 | -- 角色相关 |
85 | - RoleLevelUp = 901, -- 角色升级 - curlevel | ||
86 | - RuneQualityCollect = 902, -- 铭文品质收集进度 | 85 | + RoleLevelUp = 851, -- 角色升级 - curlevel |
86 | + RuneQualityCollect = 852, -- 铭文品质收集进度 | ||
87 | + | ||
88 | + -- 其他相关 | ||
89 | + SignIn = 901, -- 签到 | ||
90 | + Pay = 902, -- 充值 | ||
91 | + ShopAll = 903, -- 在任意商店购买 | ||
87 | 92 | ||
88 | --功能未实现 todo | 93 | --功能未实现 todo |
89 | AdvShop = 1002, -- 冒险商城 | 94 | AdvShop = 1002, -- 冒险商城 |
@@ -93,9 +98,6 @@ local TaskType = { | @@ -93,9 +98,6 @@ local TaskType = { | ||
93 | BindPhone = 1008, -- 绑定手机 | 98 | BindPhone = 1008, -- 绑定手机 |
94 | WeChat = 1009, -- 关注微信 | 99 | WeChat = 1009, -- 关注微信 |
95 | WeBlog = 1010, -- 关注微博 | 100 | WeBlog = 1010, -- 关注微博 |
96 | - SignIn = 1011, -- 签到 | ||
97 | - ShopAll = 1013, -- 在任意商店购买 | ||
98 | - Pay = 1014, -- 充值 | ||
99 | } | 101 | } |
100 | 102 | ||
101 | local function f(field, func) | 103 | local function f(field, func) |
src/models/RoleTimeReset.lua
@@ -20,6 +20,7 @@ ResetFunc["CrossDay"] = function(self, notify, response, now) | @@ -20,6 +20,7 @@ ResetFunc["CrossDay"] = function(self, notify, response, now) | ||
20 | 20 | ||
21 | response.dTask = {} | 21 | response.dTask = {} |
22 | response.advSup = self:getProperty("advSup") | 22 | response.advSup = self:getProperty("advSup") |
23 | + self:log("onLogin") | ||
23 | end | 24 | end |
24 | 25 | ||
25 | ResetFunc["CrossWeek"] = function(self, notify, response) | 26 | ResetFunc["CrossWeek"] = function(self, notify, response) |
src/services/chated.lua
@@ -5,6 +5,8 @@ local crab = require "crab.c" | @@ -5,6 +5,8 @@ local crab = require "crab.c" | ||
5 | local table_insert = table.insert | 5 | local table_insert = table.insert |
6 | local table_unpack = table.unpack | 6 | local table_unpack = table.unpack |
7 | local mode, id, dict = ... | 7 | local mode, id, dict = ... |
8 | +local hideCode = utf8.codepoint("*") | ||
9 | + | ||
8 | 10 | ||
9 | local function toutf8(name) | 11 | local function toutf8(name) |
10 | local t = {} | 12 | local t = {} |
@@ -14,6 +16,16 @@ local function toutf8(name) | @@ -14,6 +16,16 @@ local function toutf8(name) | ||
14 | return t | 16 | return t |
15 | end | 17 | end |
16 | 18 | ||
19 | +local function fix(a, b) | ||
20 | + for i, v in pairs(a) do | ||
21 | + if b[i] == hideCode then | ||
22 | + a[i] = hideCode | ||
23 | + end | ||
24 | + end | ||
25 | + return utf8.char(table_unpack(a)) | ||
26 | +end | ||
27 | + | ||
28 | + | ||
17 | if mode == "sub" then | 29 | if mode == "sub" then |
18 | local CMD = {} | 30 | local CMD = {} |
19 | dict = tonumber(dict) | 31 | dict = tonumber(dict) |
@@ -23,8 +35,9 @@ if mode == "sub" then | @@ -23,8 +35,9 @@ if mode == "sub" then | ||
23 | return false | 35 | return false |
24 | end | 36 | end |
25 | local utftb = toutf8(name) | 37 | local utftb = toutf8(name) |
26 | - if crab.filter(dict, utftb) then | ||
27 | - return false, utf8.char(table_unpack(utftb)) | 38 | + local utftbU = toutf8(string.upper(name)) |
39 | + if crab.filter(dict, utftbU) then | ||
40 | + return false, fix(utftb, utftbU) | ||
28 | end | 41 | end |
29 | return true | 42 | return true |
30 | end | 43 | end |
@@ -45,7 +58,7 @@ else | @@ -45,7 +58,7 @@ else | ||
45 | 58 | ||
46 | local words = {} | 59 | local words = {} |
47 | for _, data in ipairs(forbidNames) do | 60 | for _, data in ipairs(forbidNames) do |
48 | - local ok, utftb = pcall(toutf8, data.name) | 61 | + local ok, utftb = pcall(toutf8, string.upper(data.name)) |
49 | if ok then table.insert(words, utftb) end | 62 | if ok then table.insert(words, utftb) end |
50 | end | 63 | end |
51 | local d = crab.open(words) | 64 | local d = crab.open(words) |
src/services/named.lua
@@ -5,6 +5,8 @@ local crab = require "crab.c" | @@ -5,6 +5,8 @@ local crab = require "crab.c" | ||
5 | local table_insert = table.insert | 5 | local table_insert = table.insert |
6 | local table_unpack = table.unpack | 6 | local table_unpack = table.unpack |
7 | local mode, id, dict = ... | 7 | local mode, id, dict = ... |
8 | +local hideCode = utf8.codepoint("*") | ||
9 | + | ||
8 | 10 | ||
9 | local function toutf8(name) | 11 | local function toutf8(name) |
10 | local t = {} | 12 | local t = {} |
@@ -14,6 +16,16 @@ local function toutf8(name) | @@ -14,6 +16,16 @@ local function toutf8(name) | ||
14 | return t | 16 | return t |
15 | end | 17 | end |
16 | 18 | ||
19 | +local function fix(a, b) | ||
20 | + for i, v in pairs(a) do | ||
21 | + if b[i] == hideCode then | ||
22 | + a[i] = hideCode | ||
23 | + end | ||
24 | + end | ||
25 | + return utf8.char(table_unpack(a)) | ||
26 | +end | ||
27 | + | ||
28 | + | ||
17 | if mode == "sub" then | 29 | if mode == "sub" then |
18 | local CMD = {} | 30 | local CMD = {} |
19 | dict = tonumber(dict) | 31 | dict = tonumber(dict) |
@@ -23,8 +35,9 @@ if mode == "sub" then | @@ -23,8 +35,9 @@ if mode == "sub" then | ||
23 | return false | 35 | return false |
24 | end | 36 | end |
25 | local utftb = toutf8(name) | 37 | local utftb = toutf8(name) |
26 | - if crab.filter(dict, utftb) then | ||
27 | - return false, utf8.char(table_unpack(utftb)) | 38 | + local utftbU = toutf8(string.upper(name)) |
39 | + if crab.filter(dict, utftbU) then | ||
40 | + return false, fix(utftb, utftbU) | ||
28 | end | 41 | end |
29 | return true | 42 | return true |
30 | end | 43 | end |
@@ -45,7 +58,7 @@ else | @@ -45,7 +58,7 @@ else | ||
45 | 58 | ||
46 | local words = {} | 59 | local words = {} |
47 | for _, data in ipairs(forbidNames) do | 60 | for _, data in ipairs(forbidNames) do |
48 | - local ok, utftb = pcall(toutf8, data.name) | 61 | + local ok, utftb = pcall(toutf8, string.upper(data.name)) |
49 | if ok then table.insert(words, utftb) end | 62 | if ok then table.insert(words, utftb) end |
50 | end | 63 | end |
51 | local d = crab.open(words) | 64 | local d = crab.open(words) |