Commit 06d56de79951c6c3dccd665171611b9d090a3ac2
Merge branch 'develop' of 120.26.43.151:wasteland/server into develop
Showing
11 changed files
with
73 additions
and
26 deletions
Show diff stats
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/adv/AdvBuff.lua
@@ -584,12 +584,12 @@ end | @@ -584,12 +584,12 @@ end | ||
584 | -- 在当前阶段不可用 小透明 < 不会回合遍历 不会查找遍历 可以删除遍历 可以下层遍历 > | 584 | -- 在当前阶段不可用 小透明 < 不会回合遍历 不会查找遍历 可以删除遍历 可以下层遍历 > |
585 | function Buff:isHide() | 585 | function Buff:isHide() |
586 | if self.isDel then | 586 | if self.isDel then |
587 | - return false | 587 | + return true |
588 | end | 588 | end |
589 | if self.buffData.mapLock == 1 and self.mapId and self.owner.battle.adv:getCurMap().mapId ~= self.mapId then | 589 | if self.buffData.mapLock == 1 and self.mapId and self.owner.battle.adv:getCurMap().mapId ~= self.mapId then |
590 | - return false | 590 | + return true |
591 | end | 591 | end |
592 | - return true | 592 | + return false |
593 | end | 593 | end |
594 | 594 | ||
595 | --删除buff 时调用 | 595 | --删除buff 时调用 |
src/adv/AdvPassive.lua
@@ -355,12 +355,12 @@ end | @@ -355,12 +355,12 @@ end | ||
355 | -- 在当前阶段不可用 小透明 < 不会回合遍历 不会查找遍历 可以删除遍历 可以下层遍历 > | 355 | -- 在当前阶段不可用 小透明 < 不会回合遍历 不会查找遍历 可以删除遍历 可以下层遍历 > |
356 | function Passive:isHide() | 356 | function Passive:isHide() |
357 | if self.isDel then | 357 | if self.isDel then |
358 | - return false | 358 | + return true |
359 | end | 359 | end |
360 | if self.passiveData.mapLock == 1 and self.mapId and self.owner.battle.adv:getCurMap().mapId ~= self.mapId then | 360 | if self.passiveData.mapLock == 1 and self.mapId and self.owner.battle.adv:getCurMap().mapId ~= self.mapId then |
361 | - return false | 361 | + return true |
362 | end | 362 | end |
363 | - return true | 363 | + return false |
364 | end | 364 | end |
365 | 365 | ||
366 | -- 可以触发 | 366 | -- 可以触发 |
src/adv/AdvPlayer.lua
@@ -349,7 +349,7 @@ function BaseObject:hurt(value, releaser, params) | @@ -349,7 +349,7 @@ function BaseObject:hurt(value, releaser, params) | ||
349 | end | 349 | end |
350 | 350 | ||
351 | if params.hurtType ~= 5 then | 351 | if params.hurtType ~= 5 then |
352 | - if params.hurtType ~= 6 or params.hurtType ~= 4 then | 352 | + if params.hurtType ~= 6 and params.hurtType ~= 4 then |
353 | value = math.max(0, value - self.def) | 353 | value = math.max(0, value - self.def) |
354 | end | 354 | end |
355 | value = self:getInjuredValue(value) --减伤计算 | 355 | value = self:getInjuredValue(value) --减伤计算 |
src/models/Activity.lua
@@ -348,9 +348,10 @@ activityFunc[Activity.ActivityType.PayBack] = { | @@ -348,9 +348,10 @@ activityFunc[Activity.ActivityType.PayBack] = { | ||
348 | ["check"] = function(self, actType, notify, twd) -- 检查 | 348 | ["check"] = function(self, actType, notify, twd) -- 检查 |
349 | local oldVal = self:getActData(actType) or 0 | 349 | local oldVal = self:getActData(actType) or 0 |
350 | local newVal = oldVal + twd | 350 | local newVal = oldVal + twd |
351 | - local gift = self.owner:getPaybackReward(oldVal, newVal) | 351 | + local gift, checkPoint = self.owner:getPaybackReward(oldVal, newVal) |
352 | if gift ~= "" then | 352 | if gift ~= "" then |
353 | - self.owner:sendMail(MailId.PayBackAward, nil, gift, {newVal}) | 353 | + local strCp = table.concat(checkPoint ,"/") |
354 | + self.owner:sendMail(MailId.PayBackAward, nil, gift, {newVal, strCp}) | ||
354 | end | 355 | end |
355 | self:updateActData(actType, newVal, not notify) | 356 | self:updateActData(actType, newVal, not notify) |
356 | end, | 357 | end, |
src/models/RoleLog.lua
@@ -62,6 +62,7 @@ local ItemReason = { | @@ -62,6 +62,7 @@ local ItemReason = { | ||
62 | finishTask = 403, -- 任务 | 62 | finishTask = 403, -- 任务 |
63 | taskActive = 404, -- 完成活跃任务 | 63 | taskActive = 404, -- 完成活跃任务 |
64 | advMainTask = 405, -- 拾荒主线 | 64 | advMainTask = 405, -- 拾荒主线 |
65 | + chatline = 406, --查看chatline | ||
65 | 66 | ||
66 | finishAchive = 601, -- 完成成就 | 67 | finishAchive = 601, -- 完成成就 |
67 | advAchiev = 602, -- 拾荒成就 | 68 | advAchiev = 602, -- 拾荒成就 |
@@ -92,7 +93,8 @@ local ItemReason = { | @@ -92,7 +93,8 @@ local ItemReason = { | ||
92 | dinerBuildUp = 1108, -- 建筑升级 | 93 | dinerBuildUp = 1108, -- 建筑升级 |
93 | removeSell = 1109, -- 移除售卖 | 94 | removeSell = 1109, -- 移除售卖 |
94 | dinerSell = 1110, -- 餐饮售卖 | 95 | dinerSell = 1110, -- 餐饮售卖 |
95 | - | 96 | + dinerShop = 1111, -- 餐厅商店 |
97 | + dinerSellQ = 1112, -- 餐厅快速 | ||
96 | -- 英雄 | 98 | -- 英雄 |
97 | heroLevelUp = 1201, -- 英雄升级 | 99 | heroLevelUp = 1201, -- 英雄升级 |
98 | heroBreak = 1202, -- 英雄突破 | 100 | heroBreak = 1202, -- 英雄突破 |
@@ -104,6 +106,13 @@ local ItemReason = { | @@ -104,6 +106,13 @@ local ItemReason = { | ||
104 | unlockPool = 1208, -- 解锁英雄定向抽卡池 | 106 | unlockPool = 1208, -- 解锁英雄定向抽卡池 |
105 | downloadCv = 1209, -- 下载 cv包奖励 | 107 | downloadCv = 1209, -- 下载 cv包奖励 |
106 | refer = 1210, -- 穿戴 | 108 | refer = 1210, -- 穿戴 |
109 | + | ||
110 | + -- pvp | ||
111 | + pvpCHead = 1301, -- pvp 跨服竞技场头像 | ||
112 | + | ||
113 | + --adv | ||
114 | + chooseEvent = 1351, -- 冒险选择 | ||
115 | + clickTrader = 1352, -- 冒险商店 | ||
107 | } | 116 | } |
108 | 117 | ||
109 | 118 | ||
@@ -699,7 +708,7 @@ function RoleLog.bind(Role) | @@ -699,7 +708,7 @@ function RoleLog.bind(Role) | ||
699 | action_type = after - before > 0 and 1 or 0, -- 变化类型(玩家获取:1,玩家消耗:0) | 708 | action_type = after - before > 0 and 1 or 0, -- 变化类型(玩家获取:1,玩家消耗:0) |
700 | item_before = before, -- 道具变化前的数量 | 709 | item_before = before, -- 道具变化前的数量 |
701 | item_after = after, -- 道具变化后的数量 | 710 | item_after = after, -- 道具变化后的数量 |
702 | - item_reason = reasonType, -- 道具流动一级原因,如抽卡、装备强化、副本掉落,可参考道具动作类型枚举表 | 711 | + item_reason = reasonType or 0, -- 道具流动一级原因,如抽卡、装备强化、副本掉落,可参考道具动作类型枚举表 |
703 | item_subreason = subreason, -- 道具流动二级原因,抽卡:卡池ID,装备强化:装备ID,副本掉落:副本ID | 712 | item_subreason = subreason, -- 道具流动二级原因,抽卡:卡池ID,装备强化:装备ID,副本掉落:副本ID |
704 | item_other = other, -- 其他(可包含阶数,强化等级,随机属性) | 713 | item_other = other, -- 其他(可包含阶数,强化等级,随机属性) |
705 | }) | 714 | }) |
src/models/RolePlugin.lua
@@ -203,7 +203,7 @@ function RolePlugin.bind(Role) | @@ -203,7 +203,7 @@ function RolePlugin.bind(Role) | ||
203 | function Role:changeHead(id, notNotify) | 203 | function Role:changeHead(id, notNotify) |
204 | self:updateProperty({field = "headId" ,value = id, notNotify = notNotify}) | 204 | self:updateProperty({field = "headId" ,value = id, notNotify = notNotify}) |
205 | self:changeCrossServerPvpSelfInfo("headId") | 205 | self:changeCrossServerPvpSelfInfo("headId") |
206 | - self:log("role_action", {desc = "changeHead", int1 = id}) | 206 | + self:mylog("role_action", {desc = "changeHead", int1 = id}) |
207 | end | 207 | end |
208 | 208 | ||
209 | function Role:addPlayExp(addExp, params) | 209 | function Role:addPlayExp(addExp, params) |
@@ -761,7 +761,7 @@ function RolePlugin.bind(Role) | @@ -761,7 +761,7 @@ function RolePlugin.bind(Role) | ||
761 | end | 761 | end |
762 | if heartWarning < 50 and heartWarning % 5 == 0 then | 762 | if heartWarning < 50 and heartWarning % 5 == 0 then |
763 | self:sendGmMsg("server_accountBanned_warning") | 763 | self:sendGmMsg("server_accountBanned_warning") |
764 | - self:log("role_action",{desc = "heartWarning", int1 = heartWarning}) | 764 | + self:mylog("role_action",{desc = "heartWarning", int1 = heartWarning}) |
765 | end | 765 | end |
766 | end | 766 | end |
767 | 767 | ||
@@ -774,11 +774,11 @@ function RolePlugin.bind(Role) | @@ -774,11 +774,11 @@ function RolePlugin.bind(Role) | ||
774 | self:setProperty("banType", 0) | 774 | self:setProperty("banType", 0) |
775 | self:setProperty("heartWarning", 0) | 775 | self:setProperty("heartWarning", 0) |
776 | 776 | ||
777 | - self:log("role_action", {desc = "ban_rm"}) | 777 | + self:mylog("role_action", {desc = "ban_rm"}) |
778 | else | 778 | else |
779 | self:setProperty("banTime", now + 86400 * time) | 779 | self:setProperty("banTime", now + 86400 * time) |
780 | self:setProperty("banType", banType) | 780 | self:setProperty("banType", banType) |
781 | - self:log("role_action", {desc = "ban", int1 = time, int2 = banType}) | 781 | + self:mylog("role_action", {desc = "ban", int1 = time, int2 = banType}) |
782 | end | 782 | end |
783 | end | 783 | end |
784 | 784 | ||
@@ -1595,7 +1595,7 @@ function RolePlugin.bind(Role) | @@ -1595,7 +1595,7 @@ function RolePlugin.bind(Role) | ||
1595 | self:updateProperty({field = "rmbC", delta = rmb}) | 1595 | self:updateProperty({field = "rmbC", delta = rmb}) |
1596 | self:updateProperty({field = "twdC", delta = rechargeData.twd}) | 1596 | self:updateProperty({field = "twdC", delta = rechargeData.twd}) |
1597 | 1597 | ||
1598 | - self:mylog("role_action", {desc = "recharge", int1 = id, int2 = rmb, key1 = params.transactionId, key2 = params.order, long1 = params.pay_time}) | 1598 | + self:mylog("role_action", {desc = "recharge", int1 = id, int2 = rmb, key1 = params.transactionId, key2 = params.order, long1 = tonum(params.pay_time, 0)}) |
1599 | 1599 | ||
1600 | return nil, reward | 1600 | return nil, reward |
1601 | end | 1601 | end |
@@ -1704,6 +1704,7 @@ function RolePlugin.bind(Role) | @@ -1704,6 +1704,7 @@ function RolePlugin.bind(Role) | ||
1704 | function Role:getPaybackReward(oldVal, newVal) | 1704 | function Role:getPaybackReward(oldVal, newVal) |
1705 | local maxVal, diff, extraReward = 0, 0, "" | 1705 | local maxVal, diff, extraReward = 0, 0, "" |
1706 | local gift = "" | 1706 | local gift = "" |
1707 | + local checkPoint = {} | ||
1707 | for k, v in pairs(csvdb["rebateCsv"]) do | 1708 | for k, v in pairs(csvdb["rebateCsv"]) do |
1708 | if k > maxVal then | 1709 | if k > maxVal then |
1709 | maxVal = k | 1710 | maxVal = k |
@@ -1714,21 +1715,30 @@ function RolePlugin.bind(Role) | @@ -1714,21 +1715,30 @@ function RolePlugin.bind(Role) | ||
1714 | end | 1715 | end |
1715 | if oldVal < k and newVal > k then | 1716 | if oldVal < k and newVal > k then |
1716 | gift = gift .. v.reward .. " " | 1717 | gift = gift .. v.reward .. " " |
1718 | + | ||
1719 | + table.insert(checkPoint, k) | ||
1717 | end | 1720 | end |
1718 | end | 1721 | end |
1719 | if newVal > maxVal then | 1722 | if newVal > maxVal then |
1720 | local cnt = 0 | 1723 | local cnt = 0 |
1724 | + local oldCheckPoint = 0 | ||
1721 | if oldVal < maxVal then | 1725 | if oldVal < maxVal then |
1722 | cnt = math.floor((newVal - maxVal) / diff) | 1726 | cnt = math.floor((newVal - maxVal) / diff) |
1727 | + oldCheckPoint = maxVal | ||
1723 | else | 1728 | else |
1724 | cnt = math.floor((newVal - maxVal) / diff) - math.floor((oldVal - maxVal) / diff) | 1729 | cnt = math.floor((newVal - maxVal) / diff) - math.floor((oldVal - maxVal) / diff) |
1730 | + oldCheckPoint = maxVal + math.floor((oldVal - maxVal) / diff) * diff | ||
1725 | end | 1731 | end |
1726 | for i = 1, cnt do | 1732 | for i = 1, cnt do |
1727 | gift = gift .. extraReward .. " " | 1733 | gift = gift .. extraReward .. " " |
1734 | + | ||
1735 | + table.insert(checkPoint, oldCheckPoint + i * diff) | ||
1728 | end | 1736 | end |
1729 | end | 1737 | end |
1730 | - | ||
1731 | - return gift | 1738 | + table.sort(checkPoint, function(a, b) |
1739 | + return a < b | ||
1740 | + end) | ||
1741 | + return gift, checkPoint | ||
1732 | end | 1742 | end |
1733 | 1743 | ||
1734 | end | 1744 | end |
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) |
-
mentioned in commit 52f8c5f05d0a531232a7dd7887becd2a77986aa1
-
mentioned in commit ba6d85edc65900830c7e168102d70671881b5808