Commit cd8907bbcd5d10807eeabdc1d920c19c3b7ffb99
Merge branch 'bugfix' into qa
* bugfix: 奖励关卡活动未开启导致Bug 每周循环任务bug 运营需要 屏蔽字 优化
Showing
6 changed files
with
52 additions
and
14 deletions
Show diff stats
src/actions/HangAction.lua
... | ... | @@ -483,9 +483,11 @@ function _M.buyBonusCountRpc(agent, data) |
483 | 483 | if not TimeReset["DailyBattle" .. btype] then return end |
484 | 484 | local open, actId = role.activity:isOpen("BonusDouble") |
485 | 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 | 492 | local bonusC = role.dailyData:getProperty("bonusC") |
491 | 493 | bonusC[btype] = bonusC[btype] or {c = 0, b = 0} |
... | ... | @@ -528,9 +530,11 @@ function _M.startBonusBattleRpc(agent, data) |
528 | 530 | bonusC[bonusData.type] = bonusC[bonusData.type] or {c = 0, b = 0} |
529 | 531 | |
530 | 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 | 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 | 556 | if not role.__bonusBattleCache then return 1 end |
553 | 557 | local open, actId = role.activity:isOpen("BonusDouble") |
554 | 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 | 565 | if role.__bonusBattleCache.id ~= id or role.__bonusBattleCache.key ~= key then |
560 | 566 | SendPacket(actionCodes.Hang_endBonusBattleRpc, MsgPack.pack({errorCode = 1})) | ... | ... |
src/actions/RoleAction.lua
... | ... | @@ -160,6 +160,7 @@ function _M.loginRpc( agent, data ) |
160 | 160 | local resetMode = role:updateTimeReset(now) |
161 | 161 | if not resetMode or not resetMode["CrossDay"] then -- 没有跨天 |
162 | 162 | role.activity:checkActivityStatus(now, false, false) |
163 | + role:log("onLogin") | |
163 | 164 | end |
164 | 165 | |
165 | 166 | redisproxy:zadd(FRIEND_RECOMMEND, now, roleId) |
... | ... | @@ -291,7 +292,6 @@ function _M.loginRpc( agent, data ) |
291 | 292 | role:savePvpHTeam() |
292 | 293 | |
293 | 294 | local hangPass = role:getProperty("hangPass") |
294 | - role:log("onLogin") | |
295 | 295 | role:mylog("login", {key1 = agent.ip:toArray(false, ":")[1], int1 = hangPass[1] or 0}) |
296 | 296 | if msg.newdevice then |
297 | 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 | 218 | local info = actInfoMap[actType] |
219 | 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 | 226 | local curData = self:getActData(actType) |
222 | 227 | local roundData = self:getProperty("round") |
223 | 228 | local curRound = roundData[actType] or 0 |
224 | - local ctrlData = csvdb["activity_ctrlCsv"][actType] | |
229 | + local ctrlData = csvdb["activity_ctrlCsv"][actId] | |
225 | 230 | if not ctrlData then return end |
226 | 231 | if curRound >= ctrlData.condition then |
227 | 232 | return | ... | ... |
src/models/RoleTimeReset.lua
src/services/chated.lua
... | ... | @@ -5,6 +5,8 @@ local crab = require "crab.c" |
5 | 5 | local table_insert = table.insert |
6 | 6 | local table_unpack = table.unpack |
7 | 7 | local mode, id, dict = ... |
8 | +local hideCode = utf8.codepoint("*") | |
9 | + | |
8 | 10 | |
9 | 11 | local function toutf8(name) |
10 | 12 | local t = {} |
... | ... | @@ -14,6 +16,16 @@ local function toutf8(name) |
14 | 16 | return t |
15 | 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 | 29 | if mode == "sub" then |
18 | 30 | local CMD = {} |
19 | 31 | dict = tonumber(dict) |
... | ... | @@ -23,8 +35,9 @@ if mode == "sub" then |
23 | 35 | return false |
24 | 36 | end |
25 | 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 | 41 | end |
29 | 42 | return true |
30 | 43 | end |
... | ... | @@ -45,7 +58,7 @@ else |
45 | 58 | |
46 | 59 | local words = {} |
47 | 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 | 62 | if ok then table.insert(words, utftb) end |
50 | 63 | end |
51 | 64 | local d = crab.open(words) | ... | ... |
src/services/named.lua
... | ... | @@ -5,6 +5,8 @@ local crab = require "crab.c" |
5 | 5 | local table_insert = table.insert |
6 | 6 | local table_unpack = table.unpack |
7 | 7 | local mode, id, dict = ... |
8 | +local hideCode = utf8.codepoint("*") | |
9 | + | |
8 | 10 | |
9 | 11 | local function toutf8(name) |
10 | 12 | local t = {} |
... | ... | @@ -14,6 +16,16 @@ local function toutf8(name) |
14 | 16 | return t |
15 | 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 | 29 | if mode == "sub" then |
18 | 30 | local CMD = {} |
19 | 31 | dict = tonumber(dict) |
... | ... | @@ -23,8 +35,9 @@ if mode == "sub" then |
23 | 35 | return false |
24 | 36 | end |
25 | 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 | 41 | end |
29 | 42 | return true |
30 | 43 | end |
... | ... | @@ -45,7 +58,7 @@ else |
45 | 58 | |
46 | 59 | local words = {} |
47 | 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 | 62 | if ok then table.insert(words, utftb) end |
50 | 63 | end |
51 | 64 | local d = crab.open(words) | ... | ... |