Commit e1355da3f04e96486e689e09c74dba37040fa531

Authored by zhouhaihai
1 parent ab9f5400

神器 被动

Showing 2 changed files with 18 additions and 11 deletions   Show diff stats
src/adv/Adv.lua
... ... @@ -545,6 +545,10 @@ function Adv:artifactLevelUp(id, level)
545 545 local advAFGet = self.owner:getProperty("advAFGet")
546 546 if not advAFGet[id] then return end
547 547 local advAFWear = self.owner:getProperty("advAFWear")
  548 + local curWear = {}
  549 + for _, _id in pairs(advAFWear) do
  550 + curWear[_id] = 1
  551 + end
548 552  
549 553 local newLv = advAFGet[id]
550 554 for i = 1, level do
... ... @@ -554,7 +558,7 @@ function Adv:artifactLevelUp(id, level)
554 558 if newLv == advAFGet[id] then return end
555 559  
556 560 local status = 0
557   - if advAFWear[id] then -- 穿着呢
  561 + if curWear[id] then -- 穿着呢
558 562 local oldData = csvdb["adv_artifactCsv"][id][advAFGet[id]]
559 563 local newData = csvdb["adv_artifactCsv"][id][newLv]
560 564 self:delArtifactEffect(oldData.effect)
... ... @@ -817,6 +821,8 @@ local function clickOut(self, room, block, params)
817 821 self:backReward(self:award({[ItemId.AdvPoint] = curFloorData.exp}))
818 822 end
819 823 local isHaveRelay = self:isHaveRelay(self.level)
  824 +
  825 + self.owner:getProperty("advTeam").player = self.battle.player:getDB() -- 临时缓存住 battle 的player
820 826 if isHaveRelay and not self.isRelay then
821 827 self:initByChapter(self.chapterId, self.level, true, true, true, false)
822 828 else
... ...
src/models/RolePlugin.lua
... ... @@ -794,16 +794,6 @@ function RolePlugin.bind(Role)
794 794 adv:forceOver()
795 795 end
796 796  
797   - -- 重新设定冒险章节和冒险结束时间
798   - self.advElChapter = tonum(redisproxy:hget("adv_season", "chapter"), globalCsv.adv_endless_default_chapter)
799   - self.advOverTime = tonum(redisproxy:hget("adv_season", "overTime"))
800   -
801   - if not notNotify then
802   - SendPacket(actionCodes.Role_updateProperties, MsgPack.pack({
803   - advElChapter = self.advElChapter,
804   - advOverTime = self.advOverTime,
805   - }))
806   - end
807 797 -- 路过的中继层重置掉
808 798 local advRelay = self:getProperty("advRelay")
809 799 advRelay[-1] = nil
... ... @@ -814,6 +804,17 @@ function RolePlugin.bind(Role)
814 804 advElS = nowSeason,
815 805 advRelay = advRelay,
816 806 }, notNotify)
  807 +
  808 +
  809 + -- 重新设定冒险章节和冒险结束时间
  810 + self.advElChapter = tonum(redisproxy:hget("adv_season", "chapter"), globalCsv.adv_endless_default_chapter)
  811 + self.advOverTime = tonum(redisproxy:hget("adv_season", "overTime"))
  812 + if not notNotify then
  813 + SendPacket(actionCodes.Role_updateProperties, MsgPack.pack({
  814 + advElChapter = self.advElChapter,
  815 + advOverTime = self.advOverTime,
  816 + }))
  817 + end
817 818 end
818 819 end
819 820  
... ...