Commit 6d25be1bab8732b6c90a3dc52d4096438c6a6d55
Merge branch 'tr/bugfix' into tr/bugfix-qa
* tr/bugfix: 无论什么方式翻开中继层格子都给奖励 跨天礼包重置 月重置 跨月 拾荒 失败也记录积分 编队 世界聊天等级15判断 # Conflicts: # src/csvdata
Showing
7 changed files
with
34 additions
and
34 deletions
Show diff stats
src/GlobalVar.lua
| @@ -142,7 +142,6 @@ ItemId = { | @@ -142,7 +142,6 @@ ItemId = { | ||
| 142 | TimeReset = { | 142 | TimeReset = { |
| 143 | CrossDay = 1, --通用跨天 | 143 | CrossDay = 1, --通用跨天 |
| 144 | CrossWeek = 2, --通用跨周 | 144 | CrossWeek = 2, --通用跨周 |
| 145 | - CrossMonth = 1, --通用跨月 索引使用跨天,在回调方法中判断是否跨越 跨月的前置条件是跨天 | ||
| 146 | DinerRank = 1, -- 餐厅排行榜 | 145 | DinerRank = 1, -- 餐厅排行榜 |
| 147 | PvpRank = 2, -- pvp排行榜 | 146 | PvpRank = 2, -- pvp排行榜 |
| 148 | PvpHight = 11, --高级竞技场 | 147 | PvpHight = 11, --高级竞技场 |
src/actions/RoleAction.lua
| @@ -1018,6 +1018,10 @@ function _M.chatRpc(agent, data) | @@ -1018,6 +1018,10 @@ function _M.chatRpc(agent, data) | ||
| 1018 | result = 1 | 1018 | result = 1 |
| 1019 | return | 1019 | return |
| 1020 | end | 1020 | end |
| 1021 | + if role:getProperty("level") < (globalCsv.chat_level or 15) then | ||
| 1022 | + result = 3 | ||
| 1023 | + return | ||
| 1024 | + end | ||
| 1021 | 1025 | ||
| 1022 | role._worldChatLimit = role._worldChatLimit or {start = 0, count = 0, canSayt = 0} --第一次开始说话时间 从第一次说话次数 能说话的时间 | 1026 | role._worldChatLimit = role._worldChatLimit or {start = 0, count = 0, canSayt = 0} --第一次开始说话时间 从第一次说话次数 能说话的时间 |
| 1023 | 1027 |
src/adv/Adv.lua
| @@ -838,25 +838,26 @@ function Adv:over(success, rewardRatio, overType) | @@ -838,25 +838,26 @@ function Adv:over(success, rewardRatio, overType) | ||
| 838 | if not self:isEndless() and self.level >= chapterData.limitlevel then | 838 | if not self:isEndless() and self.level >= chapterData.limitlevel then |
| 839 | self.owner:checkTaskEnter("AdvAllPass", {id = self.chapterId}) | 839 | self.owner:checkTaskEnter("AdvAllPass", {id = self.chapterId}) |
| 840 | end | 840 | end |
| 841 | + end | ||
| 841 | 842 | ||
| 842 | - local roleId = self.owner:getProperty("id") | ||
| 843 | - local oldMaxScore = tonum(redisproxy:zscore(self.owner:getAdvRankKey(), roleId)) | ||
| 844 | - if score > oldMaxScore then | ||
| 845 | - local team = self.owner:getProperty("advTeam") | ||
| 846 | - local curInfo = { | ||
| 847 | - name = self.owner:getProperty("name"), | ||
| 848 | - headId = self.owner:getProperty("headId"), | ||
| 849 | - lv = self.owner:getProperty("level"), | ||
| 850 | - batteV = self.owner:getTeamBattleValue(team.heros), | ||
| 851 | - chapter = self.chapterId, | ||
| 852 | - format = self.owner:getTeamHerosInfo(team).heros, | ||
| 853 | - } | ||
| 854 | - redisproxy:pipelining(function (red) | ||
| 855 | - red:zadd(self.owner:getAdvRankKey(), score, roleId) --更新分数 | ||
| 856 | - red:hset(RANK_ADV_INFO, roleId, MsgPack.pack(curInfo)) | ||
| 857 | - end) | ||
| 858 | - end | 843 | + local roleId = self.owner:getProperty("id") |
| 844 | + local oldMaxScore = tonum(redisproxy:zscore(self.owner:getAdvRankKey(), roleId)) | ||
| 845 | + if score > oldMaxScore then | ||
| 846 | + local team = self.owner:getProperty("advTeam") | ||
| 847 | + local curInfo = { | ||
| 848 | + name = self.owner:getProperty("name"), | ||
| 849 | + headId = self.owner:getProperty("headId"), | ||
| 850 | + lv = self.owner:getProperty("level"), | ||
| 851 | + batteV = self.owner:getTeamBattleValue(team.heros), | ||
| 852 | + chapter = self.chapterId, | ||
| 853 | + format = self.owner:getTeamHerosInfo(team).heros, | ||
| 854 | + } | ||
| 855 | + redisproxy:pipelining(function (red) | ||
| 856 | + red:zadd(self.owner:getAdvRankKey(), score, roleId) --更新分数 | ||
| 857 | + red:hset(RANK_ADV_INFO, roleId, MsgPack.pack(curInfo)) | ||
| 858 | + end) | ||
| 859 | end | 859 | end |
| 860 | + | ||
| 860 | -- 通关的时候要把引导步骤设定到成就引导 | 861 | -- 通关的时候要把引导步骤设定到成就引导 |
| 861 | if not self.owner:checkOverGuide(57) then | 862 | if not self.owner:checkOverGuide(57) then |
| 862 | self.owner:saveGuide(57,1,true) | 863 | self.owner:saveGuide(57,1,true) |
| @@ -1734,9 +1735,6 @@ function Adv:clickBlock(roomId, blockId, params) | @@ -1734,9 +1735,6 @@ function Adv:clickBlock(roomId, blockId, params) | ||
| 1734 | if not block.isOpen then | 1735 | if not block.isOpen then |
| 1735 | if self.isRelay or checkAroundBlocks() then --开放 | 1736 | if self.isRelay or checkAroundBlocks() then --开放 |
| 1736 | self:getCurMap():openBlock(roomId, blockId, true, true) | 1737 | self:getCurMap():openBlock(roomId, blockId, true, true) |
| 1737 | - if self.isRelay and self:getCurMap():isAllOpen() then -- 发放翻开的奖励 | ||
| 1738 | - self:passAdvRelay() | ||
| 1739 | - end | ||
| 1740 | status = true | 1738 | status = true |
| 1741 | end | 1739 | end |
| 1742 | else | 1740 | else |
src/adv/AdvMap.lua
| @@ -272,6 +272,10 @@ function Map:openBlock(roomId, blockId, isPlayer, ignoreBack) | @@ -272,6 +272,10 @@ function Map:openBlock(roomId, blockId, isPlayer, ignoreBack) | ||
| 272 | if not ignoreBack then | 272 | if not ignoreBack then |
| 273 | self.adv:backBlockChange(roomId, blockId) | 273 | self.adv:backBlockChange(roomId, blockId) |
| 274 | end | 274 | end |
| 275 | + | ||
| 276 | + if self.adv.isRelay and self:isAllOpen() then -- 发放翻开的奖励 | ||
| 277 | + self.adv:passAdvRelay() | ||
| 278 | + end | ||
| 275 | end | 279 | end |
| 276 | return status | 280 | return status |
| 277 | end | 281 | end |
src/models/RolePvp.lua
| @@ -530,7 +530,7 @@ function Role:changeCrossServerPvpSelfInfo(cType) | @@ -530,7 +530,7 @@ function Role:changeCrossServerPvpSelfInfo(cType) | ||
| 530 | return | 530 | return |
| 531 | end | 531 | end |
| 532 | change.battleV = self:getProperty("pvpTBVH") | 532 | change.battleV = self:getProperty("pvpTBVH") |
| 533 | - change.heros = self:getProperty("pvpTSH") | 533 | + change.team = self:getProperty("pvpTSH") |
| 534 | change.battleInfo = self:getProperty("pvpTBH") | 534 | change.battleInfo = self:getProperty("pvpTBH") |
| 535 | end | 535 | end |
| 536 | 536 |
src/models/RoleTimeReset.lua
| @@ -23,6 +23,11 @@ ResetFunc["CrossDay"] = function(self, notify, response, now) | @@ -23,6 +23,11 @@ ResetFunc["CrossDay"] = function(self, notify, response, now) | ||
| 23 | end | 23 | end |
| 24 | self:setProperty("advMine", advMine) | 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 | response.dTask = {} | 31 | response.dTask = {} |
| 27 | response.advSup = self:getProperty("advSup") | 32 | response.advSup = self:getProperty("advSup") |
| 28 | self:log("onLogin") | 33 | self:log("onLogin") |
| @@ -43,13 +48,6 @@ ResetFunc["CrossWeek"] = function(self, notify, response) | @@ -43,13 +48,6 @@ ResetFunc["CrossWeek"] = function(self, notify, response) | ||
| 43 | response.dinerS = {} | 48 | response.dinerS = {} |
| 44 | end | 49 | end |
| 45 | 50 | ||
| 46 | -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 | -end | ||
| 52 | - | ||
| 53 | 51 | ||
| 54 | ResetFunc["DinerRank"] = function(self, notify, response) | 52 | ResetFunc["DinerRank"] = function(self, notify, response) |
| 55 | self.dinerData:rankResetData(notify) | 53 | self.dinerData:rankResetData(notify) |
| @@ -89,13 +87,10 @@ function Role:updateTimeReset(now, notify) | @@ -89,13 +87,10 @@ function Role:updateTimeReset(now, notify) | ||
| 89 | ResetFunc[funcName](self, notify, response, now) | 87 | ResetFunc[funcName](self, notify, response, now) |
| 90 | resetMode[funcName] = true | 88 | resetMode[funcName] = true |
| 91 | end | 89 | end |
| 92 | - if needResetId[resetId] then | ||
| 93 | - -- 充值商城购买记录 | ||
| 94 | - self.storeData:resetStoreReored(resetId) | ||
| 95 | - end | ||
| 96 | end | 90 | end |
| 97 | 91 | ||
| 98 | for resetId, round in pairs(needResetId) do | 92 | for resetId, round in pairs(needResetId) do |
| 93 | + self.storeData:resetStoreReored(resetId) | ||
| 99 | timeReset[resetId] = round | 94 | timeReset[resetId] = round |
| 100 | end | 95 | end |
| 101 | self:setProperties({timeReset = timeReset, ltime = now}) | 96 | self:setProperties({timeReset = timeReset, ltime = now}) |
src/utils/CommonFunc.lua
| @@ -100,7 +100,7 @@ end | @@ -100,7 +100,7 @@ end | ||
| 100 | -- 判断是不是同一个月 | 100 | -- 判断是不是同一个月 |
| 101 | function isCrossMonth(target, now) | 101 | function isCrossMonth(target, now) |
| 102 | now = now or skynet.timex() | 102 | now = now or skynet.timex() |
| 103 | - local tarTm = os.date("*t", target) | 103 | + local tarTm = os.date("*t", target - RESET_TIME * 3600) |
| 104 | local nowTm = os.date("*t", now - RESET_TIME * 3600) | 104 | local nowTm = os.date("*t", now - RESET_TIME * 3600) |
| 105 | if tarTm.year == nowTm.year and tarTm.month == nowTm.month then | 105 | if tarTm.year == nowTm.year and tarTm.month == nowTm.month then |
| 106 | return false | 106 | return false |