Commit ef9b0e079be1b561be7909e007b9303cfb051f46
Merge branch 'bugfix' into qa
* bugfix: 成就 参数错误 3星解锁 cg 增加神器标签 初始化冒险重置时间 被动新
Showing
6 changed files
with
18 additions
and
4 deletions
Show diff stats
src/actions/HeroAction.lua
| @@ -114,7 +114,7 @@ function _M.wakeRpc(agent, data) | @@ -114,7 +114,7 @@ function _M.wakeRpc(agent, data) | ||
| 114 | 114 | ||
| 115 | local curLevel = hero:getProperty("wakeL") | 115 | local curLevel = hero:getProperty("wakeL") |
| 116 | role:checkTaskEnter("Wake", {heroType = typ, wakeL = curLevel}) | 116 | role:checkTaskEnter("Wake", {heroType = typ, wakeL = curLevel}) |
| 117 | - if curLevel == 4 then -- 解锁cg | 117 | + if curLevel == 3 then -- 解锁cg |
| 118 | role:checkTaskEnter("WakeCG", {heroType = typ}) | 118 | role:checkTaskEnter("WakeCG", {heroType = typ}) |
| 119 | end | 119 | end |
| 120 | hero:mylog({desc = "wake", int1 = hero:getProperty("wakeL")}) | 120 | hero:mylog({desc = "wake", int1 = hero:getProperty("wakeL")}) |
src/adv/AdvPassive.lua
| @@ -119,6 +119,7 @@ Passive.AFTER_ROUND = 27 --经过 x回合时 | @@ -119,6 +119,7 @@ Passive.AFTER_ROUND = 27 --经过 x回合时 | ||
| 119 | Passive.GET_BUFF = 28 --获得指定buff | 119 | Passive.GET_BUFF = 28 --获得指定buff |
| 120 | Passive.OPEN_BLOCK = 29 --翻开格子 | 120 | Passive.OPEN_BLOCK = 29 --翻开格子 |
| 121 | Passive.OPEN_MONSTER = 30 --翻开怪物 | 121 | Passive.OPEN_MONSTER = 30 --翻开怪物 |
| 122 | +Passive.PLAYER_BUFF = 31 --玩家获得buff | ||
| 122 | 123 | ||
| 123 | 124 | ||
| 124 | -- 不同的开启条件 | 125 | -- 不同的开启条件 |
| @@ -180,6 +181,7 @@ PassiveCondFactory[Passive.GET_BUFF] = function(_Passive) | @@ -180,6 +181,7 @@ PassiveCondFactory[Passive.GET_BUFF] = function(_Passive) | ||
| 180 | end | 181 | end |
| 181 | end | 182 | end |
| 182 | end | 183 | end |
| 184 | +PassiveCondFactory[Passive.PLAYER_BUFF] = PassiveCondFactory[Passive.GET_BUFF] | ||
| 183 | 185 | ||
| 184 | 186 | ||
| 185 | PassiveCondFactory[Passive.BORN_ONCE] = function(_Passive) | 187 | PassiveCondFactory[Passive.BORN_ONCE] = function(_Passive) |
src/adv/AdvPlayer.lua
| @@ -670,7 +670,9 @@ function Player:effectBattleBuff() | @@ -670,7 +670,9 @@ function Player:effectBattleBuff() | ||
| 670 | for _, buff in ipairs(self.buffs) do | 670 | for _, buff in ipairs(self.buffs) do |
| 671 | if not buff:isHide() and (buff:getType() == Buff.BATTLE_BUFF or buff:getType() == Buff.BATTLE_PASSIVE) then | 671 | if not buff:isHide() and (buff:getType() == Buff.BATTLE_BUFF or buff:getType() == Buff.BATTLE_PASSIVE) then |
| 672 | buff:effect() | 672 | buff:effect() |
| 673 | - buff:uncover() | 673 | + if not buff.buffData.classify:sismember(7, " ") then -- 神器buff 不会清除 |
| 674 | + buff:uncover() | ||
| 675 | + end | ||
| 674 | end | 676 | end |
| 675 | end | 677 | end |
| 676 | end | 678 | end |
| @@ -696,6 +698,7 @@ function Player:addBuff(buffId, releaser) | @@ -696,6 +698,7 @@ function Player:addBuff(buffId, releaser) | ||
| 696 | self.battle.player:attrChangeCondBuffCheck(2, buffId) | 698 | self.battle.player:attrChangeCondBuffCheck(2, buffId) |
| 697 | self.battle.adv:checkAchievement(self.battle.adv.AchievType.GetBuff, 1, buffId) | 699 | self.battle.adv:checkAchievement(self.battle.adv.AchievType.GetBuff, 1, buffId) |
| 698 | self.battle.adv:pushBackEvent(AdvBackEventType.Buff, {buffId = buffId}) | 700 | self.battle.adv:pushBackEvent(AdvBackEventType.Buff, {buffId = buffId}) |
| 701 | + self.battle:triggerPassive(Passive.PLAYER_BUFF, {buffId = buffId}) | ||
| 699 | end | 702 | end |
| 700 | return status | 703 | return status |
| 701 | end | 704 | end |
src/models/Role.lua
| @@ -29,6 +29,13 @@ function Role:ctor( properties ) | @@ -29,6 +29,13 @@ function Role:ctor( properties ) | ||
| 29 | self.activity = nil | 29 | self.activity = nil |
| 30 | self.advElChapter = tonum(redisproxy:hget("adv_season", "chapter"), globalCsv.adv_endless_default_chapter) -- 无尽模式记录的赛季对应章节 | 30 | self.advElChapter = tonum(redisproxy:hget("adv_season", "chapter"), globalCsv.adv_endless_default_chapter) -- 无尽模式记录的赛季对应章节 |
| 31 | self.advOverTime = tonum(redisproxy:hget("adv_season", "overTime")) -- 无尽模式关闭时间戳 | 31 | self.advOverTime = tonum(redisproxy:hget("adv_season", "overTime")) -- 无尽模式关闭时间戳 |
| 32 | + if self.advOverTime == 0 then | ||
| 33 | + local now = skynet.timex() | ||
| 34 | + if math.floor(now / (3600 * 24 * 7)) % 2 == 1 then | ||
| 35 | + self.advOverTime = 3600 * 24 * 7 | ||
| 36 | + end | ||
| 37 | + self.advOverTime = self.advOverTime + specMonday(now) + 3600 * 24 * 6 | ||
| 38 | + end | ||
| 32 | self.sendMailFlag = false --发送邮件标识 | 39 | self.sendMailFlag = false --发送邮件标识 |
| 33 | end | 40 | end |
| 34 | 41 |
src/models/RolePlugin.lua
| @@ -444,7 +444,9 @@ function RolePlugin.bind(Role) | @@ -444,7 +444,9 @@ function RolePlugin.bind(Role) | ||
| 444 | type= heroType, | 444 | type= heroType, |
| 445 | wakeL = globalCsv.unit_wake_initLevel[unitData.rare], | 445 | wakeL = globalCsv.unit_wake_initLevel[unitData.rare], |
| 446 | } | 446 | } |
| 447 | - | 447 | + if heroInfo.wakeL == 3 then |
| 448 | + self:checkTaskEnter("WakeCG", {heroType = heroType}) | ||
| 449 | + end | ||
| 448 | local newHero = require("models.Hero").new(heroInfo) | 450 | local newHero = require("models.Hero").new(heroInfo) |
| 449 | newHero:create() | 451 | newHero:create() |
| 450 | newHero.owner = self | 452 | newHero.owner = self |
src/utils/CommonFunc.lua
| @@ -219,7 +219,7 @@ function specMonday(now) | @@ -219,7 +219,7 @@ function specMonday(now) | ||
| 219 | local wday = (tm.wday + 6) % 7 | 219 | local wday = (tm.wday + 6) % 7 |
| 220 | if wday == 0 then wday = 7 end | 220 | if wday == 0 then wday = 7 end |
| 221 | 221 | ||
| 222 | - local time = os.time({year = tm.year, month = tm.month, day = tm.day}) | 222 | + local time = os.time({year = tm.year, month = tm.month, day = tm.day, hour = RESET_TIME}) |
| 223 | return time - (wday - 1) * 86400 | 223 | return time - (wday - 1) * 86400 |
| 224 | end | 224 | end |
| 225 | 225 |