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
src/actions/RoleAction.lua
... | ... | @@ -1018,6 +1018,10 @@ function _M.chatRpc(agent, data) |
1018 | 1018 | result = 1 |
1019 | 1019 | return |
1020 | 1020 | end |
1021 | + if role:getProperty("level") < (globalCsv.chat_level or 15) then | |
1022 | + result = 3 | |
1023 | + return | |
1024 | + end | |
1021 | 1025 | |
1022 | 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 | 838 | if not self:isEndless() and self.level >= chapterData.limitlevel then |
839 | 839 | self.owner:checkTaskEnter("AdvAllPass", {id = self.chapterId}) |
840 | 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 | 859 | end |
860 | + | |
860 | 861 | -- 通关的时候要把引导步骤设定到成就引导 |
861 | 862 | if not self.owner:checkOverGuide(57) then |
862 | 863 | self.owner:saveGuide(57,1,true) |
... | ... | @@ -1734,9 +1735,6 @@ function Adv:clickBlock(roomId, blockId, params) |
1734 | 1735 | if not block.isOpen then |
1735 | 1736 | if self.isRelay or checkAroundBlocks() then --开放 |
1736 | 1737 | self:getCurMap():openBlock(roomId, blockId, true, true) |
1737 | - if self.isRelay and self:getCurMap():isAllOpen() then -- 发放翻开的奖励 | |
1738 | - self:passAdvRelay() | |
1739 | - end | |
1740 | 1738 | status = true |
1741 | 1739 | end |
1742 | 1740 | else | ... | ... |
src/adv/AdvMap.lua
... | ... | @@ -272,6 +272,10 @@ function Map:openBlock(roomId, blockId, isPlayer, ignoreBack) |
272 | 272 | if not ignoreBack then |
273 | 273 | self.adv:backBlockChange(roomId, blockId) |
274 | 274 | end |
275 | + | |
276 | + if self.adv.isRelay and self:isAllOpen() then -- 发放翻开的奖励 | |
277 | + self.adv:passAdvRelay() | |
278 | + end | |
275 | 279 | end |
276 | 280 | return status |
277 | 281 | end | ... | ... |
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/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,13 +48,6 @@ ResetFunc["CrossWeek"] = function(self, notify, response) |
43 | 48 | response.dinerS = {} |
44 | 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 | 52 | ResetFunc["DinerRank"] = function(self, notify, response) |
55 | 53 | self.dinerData:rankResetData(notify) |
... | ... | @@ -89,13 +87,10 @@ function Role:updateTimeReset(now, notify) |
89 | 87 | ResetFunc[funcName](self, notify, response, now) |
90 | 88 | resetMode[funcName] = true |
91 | 89 | end |
92 | - if needResetId[resetId] then | |
93 | - -- 充值商城购买记录 | |
94 | - self.storeData:resetStoreReored(resetId) | |
95 | - end | |
96 | 90 | end |
97 | 91 | |
98 | 92 | for resetId, round in pairs(needResetId) do |
93 | + self.storeData:resetStoreReored(resetId) | |
99 | 94 | timeReset[resetId] = round |
100 | 95 | end |
101 | 96 | self:setProperties({timeReset = timeReset, ltime = now}) | ... | ... |
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 | ... | ... |