Commit f9aa553919e58263595c03b52f04e7d35d32f08f
Merge branch 'tr/bugfix' into tr/publish/release
* tr/bugfix: 月重置 跨月 拾荒 失败也记录积分 编队 世界聊天等级15判断 活动卡池结束回馈次数通关邮件折算碎片 功能注释 第一次通关拾荒章节推送限时礼包,活动卡池结束回馈次数通关邮件折算碎片 可能的报错点 # Conflicts: # src/csvdata
Showing
10 changed files
with
49 additions
and
27 deletions
Show diff stats
src/GlobalVar.lua
src/actions/ActivityAction.lua
... | ... | @@ -587,7 +587,7 @@ function _M.endBattleRpc(agent, data) |
587 | 587 | info = msg.info, |
588 | 588 | format = role.__actBattleCache.format |
589 | 589 | }) then |
590 | - SendPacket(actionCodes.Hang_endBonusBattleRpc, MsgPack.pack({errorCode = 1})) | |
590 | + SendPacket(actionCodes.Activity_endBattleRpc, MsgPack.pack({errorCode = 1})) | |
591 | 591 | return true |
592 | 592 | end |
593 | 593 | role.__actBattleCache = nil | ... | ... |
src/actions/RoleAction.lua
... | ... | @@ -1013,6 +1013,10 @@ function _M.chatRpc(agent, data) |
1013 | 1013 | result = 1 |
1014 | 1014 | return |
1015 | 1015 | end |
1016 | + if role:getProperty("level") < (globalCsv.chat_level or 15) then | |
1017 | + result = 3 | |
1018 | + return | |
1019 | + end | |
1016 | 1020 | |
1017 | 1021 | role._worldChatLimit = role._worldChatLimit or {start = 0, count = 0, canSayt = 0} --第一次开始说话时间 从第一次说话次数 能说话的时间 |
1018 | 1022 | ... | ... |
src/adv/Adv.lua
... | ... | @@ -819,25 +819,26 @@ function Adv:over(success, rewardRatio, overType) |
819 | 819 | if not self:isEndless() and self.level >= chapterData.limitlevel then |
820 | 820 | self.owner:checkTaskEnter("AdvAllPass", {id = self.chapterId}) |
821 | 821 | end |
822 | + end | |
822 | 823 | |
823 | - local roleId = self.owner:getProperty("id") | |
824 | - local oldMaxScore = tonum(redisproxy:zscore(self.owner:getAdvRankKey(), roleId)) | |
825 | - if score > oldMaxScore then | |
826 | - local team = self.owner:getProperty("advTeam") | |
827 | - local curInfo = { | |
828 | - name = self.owner:getProperty("name"), | |
829 | - headId = self.owner:getProperty("headId"), | |
830 | - lv = self.owner:getProperty("level"), | |
831 | - batteV = self.owner:getTeamBattleValue(team.heros), | |
832 | - chapter = self.chapterId, | |
833 | - format = self.owner:getTeamHerosInfo(team).heros, | |
834 | - } | |
835 | - redisproxy:pipelining(function (red) | |
836 | - red:zadd(self.owner:getAdvRankKey(), score, roleId) --更新分数 | |
837 | - red:hset(RANK_ADV_INFO, roleId, MsgPack.pack(curInfo)) | |
838 | - end) | |
839 | - end | |
824 | + local roleId = self.owner:getProperty("id") | |
825 | + local oldMaxScore = tonum(redisproxy:zscore(self.owner:getAdvRankKey(), roleId)) | |
826 | + if score > oldMaxScore then | |
827 | + local team = self.owner:getProperty("advTeam") | |
828 | + local curInfo = { | |
829 | + name = self.owner:getProperty("name"), | |
830 | + headId = self.owner:getProperty("headId"), | |
831 | + lv = self.owner:getProperty("level"), | |
832 | + batteV = self.owner:getTeamBattleValue(team.heros), | |
833 | + chapter = self.chapterId, | |
834 | + format = self.owner:getTeamHerosInfo(team).heros, | |
835 | + } | |
836 | + redisproxy:pipelining(function (red) | |
837 | + red:zadd(self.owner:getAdvRankKey(), score, roleId) --更新分数 | |
838 | + red:hset(RANK_ADV_INFO, roleId, MsgPack.pack(curInfo)) | |
839 | + end) | |
840 | 840 | end |
841 | + | |
841 | 842 | -- 通关的时候要把引导步骤设定到成就引导 |
842 | 843 | if not self.owner:checkOverGuide(57) then |
843 | 844 | self.owner:saveGuide(57,1,true) |
... | ... | @@ -1120,6 +1121,11 @@ local function clickOut(self, room, block, params, isExit) |
1120 | 1121 | else |
1121 | 1122 | if self.level > (advPass[self.chapterId] or 0) then |
1122 | 1123 | self.owner:changeUpdates({{type = "advPass", field = self.chapterId, value = self.level}}) |
1124 | + | |
1125 | + if (self.level >= csvdb["adv_chapterCsv"][self.chapterId].limitlevel) then --关卡结束 | |
1126 | + self.owner:checkTaskEnter("AdvPassFirst", {id = self.chapterId}) | |
1127 | + end | |
1128 | + | |
1123 | 1129 | end |
1124 | 1130 | end |
1125 | 1131 | ... | ... |
src/models/Activity.lua
... | ... | @@ -529,6 +529,12 @@ activityFunc[Activity.ActivityType.ActHeroPool] = { |
529 | 529 | local actData = self:getActData(actType) |
530 | 530 | local cfg = csvdb["activity_ctrlCsv"][actId] |
531 | 531 | if not cfg then return end |
532 | + -- 保底次数转换成万能碎片 | |
533 | + --local count = math.ceil(((actData[cfg.condition] or 0) / 100) * 60) | |
534 | + --if count > 0 then | |
535 | + -- local gift = {[723] = count} | |
536 | + -- self.owner:sendMail(MailId.ActivityPoolRet, nil, gift, {}) | |
537 | + --end | |
532 | 538 | actData[cfg.condition] = nil |
533 | 539 | self:updateActData(actType, actData, not notify) |
534 | 540 | end, | ... | ... |
src/models/RoleBattle.lua
... | ... | @@ -150,7 +150,7 @@ function Role:checkBattleCheat(battleType, params) |
150 | 150 | -- self:setProperty("cheatCount", cheatCount) |
151 | 151 | |
152 | 152 | local result = {clientSelf = {}, serverSelf = {}} |
153 | - for k , v in pairs(clientInfo.selfAttr) do | |
153 | + for k , v in pairs(clientInfo.selfAttr or {}) do | |
154 | 154 | result.clientSelf[tostring(k)] = v |
155 | 155 | end |
156 | 156 | for k , v in pairs(selfTeamServer) do | ... | ... |
src/models/RolePvp.lua
... | ... | @@ -530,7 +530,7 @@ function Role:changeCrossServerPvpSelfInfo(cType) |
530 | 530 | return |
531 | 531 | end |
532 | 532 | change.battleV = self:getProperty("pvpTBVH") |
533 | - change.heros = self:getProperty("pvpTSH") | |
533 | + change.team = self:getProperty("pvpTSH") | |
534 | 534 | change.battleInfo = self:getProperty("pvpTBH") |
535 | 535 | end |
536 | 536 | ... | ... |
src/models/RoleTask.lua
... | ... | @@ -50,6 +50,7 @@ local TaskType = { |
50 | 50 | AdvHang = 412, -- 代理拾荒次数 |
51 | 51 | AdvMineKill = 413, -- 宝藏怪击杀 |
52 | 52 | AdvMineLayer = 414, -- 宝藏洞激活 |
53 | + AdvPassFirst = 415, -- 冒险首次通关 - id | |
53 | 54 | |
54 | 55 | --爬塔相关 |
55 | 56 | TowerPass = 501, -- 爬塔通关 - level |
... | ... | @@ -240,7 +241,7 @@ local StoreListener = { |
240 | 241 | [TaskType.HangPass] = {{TriggerEventType.HangPass, f("id")}}, |
241 | 242 | [TaskType.RoleLevelUp] = {{TriggerEventType.LevelUp, f("level")}}, |
242 | 243 | [TaskType.TowerPass] = {{TriggerEventType.TowerPass, f("level")}}, |
243 | - [TaskType.AdvPass] = {{TriggerEventType.AdvPass, f("id")}}, | |
244 | + [TaskType.AdvPassFirst] = {{TriggerEventType.AdvPass, f("id")}}, | |
244 | 245 | [TaskType.AddHero] = {{TriggerEventType.AddNewHero, f("heroType")}, {TriggerEventType.SSRCount, f("ssrCount")}}, |
245 | 246 | } |
246 | 247 | } | ... | ... |
src/models/RoleTimeReset.lua
... | ... | @@ -23,6 +23,11 @@ ResetFunc["CrossDay"] = function(self, notify, response, now) |
23 | 23 | end |
24 | 24 | self:setProperty("advMine", advMine) |
25 | 25 | |
26 | + local ltime = self:getProperty("ltime") | |
27 | + if isCrossMonth(ltime, now) then | |
28 | + self.storeData:resetStoreReored(3) --商店跨月重置 time_reset表关联id | |
29 | + end | |
30 | + | |
26 | 31 | response.dTask = {} |
27 | 32 | response.advSup = self:getProperty("advSup") |
28 | 33 | self:log("onLogin") |
... | ... | @@ -43,11 +48,8 @@ ResetFunc["CrossWeek"] = function(self, notify, response) |
43 | 48 | response.dinerS = {} |
44 | 49 | end |
45 | 50 | |
51 | +-- 30天 非自然月 | |
46 | 52 | ResetFunc["CrossMonth"] = function(self, notify, response) |
47 | - local ltime = self:getProperty("ltime") | |
48 | - if isCrossMonth(ltime, skynet.timex()) then | |
49 | - self.storeData:resetStoreReored(3) --商店跨月重置 time_reset表关联id | |
50 | - end | |
51 | 53 | end |
52 | 54 | |
53 | 55 | |
... | ... | @@ -91,7 +93,9 @@ function Role:updateTimeReset(now, notify) |
91 | 93 | end |
92 | 94 | if needResetId[resetId] then |
93 | 95 | -- 充值商城购买记录 |
94 | - self.storeData:resetStoreReored(resetId) | |
96 | + if resetId ~= TimeReset.CrossMonth then | |
97 | + self.storeData:resetStoreReored(resetId) | |
98 | + end | |
95 | 99 | end |
96 | 100 | end |
97 | 101 | ... | ... |
src/utils/CommonFunc.lua
... | ... | @@ -100,7 +100,7 @@ end |
100 | 100 | -- 判断是不是同一个月 |
101 | 101 | function isCrossMonth(target, now) |
102 | 102 | now = now or skynet.timex() |
103 | - local tarTm = os.date("*t", target) | |
103 | + local tarTm = os.date("*t", target - RESET_TIME * 3600) | |
104 | 104 | local nowTm = os.date("*t", now - RESET_TIME * 3600) |
105 | 105 | if tarTm.year == nowTm.year and tarTm.month == nowTm.month then |
106 | 106 | return false | ... | ... |