Commit e1355da3f04e96486e689e09c74dba37040fa531
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,6 +545,10 @@ function Adv:artifactLevelUp(id, level) | ||
| 545 | local advAFGet = self.owner:getProperty("advAFGet") | 545 | local advAFGet = self.owner:getProperty("advAFGet") |
| 546 | if not advAFGet[id] then return end | 546 | if not advAFGet[id] then return end |
| 547 | local advAFWear = self.owner:getProperty("advAFWear") | 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 | local newLv = advAFGet[id] | 553 | local newLv = advAFGet[id] |
| 550 | for i = 1, level do | 554 | for i = 1, level do |
| @@ -554,7 +558,7 @@ function Adv:artifactLevelUp(id, level) | @@ -554,7 +558,7 @@ function Adv:artifactLevelUp(id, level) | ||
| 554 | if newLv == advAFGet[id] then return end | 558 | if newLv == advAFGet[id] then return end |
| 555 | 559 | ||
| 556 | local status = 0 | 560 | local status = 0 |
| 557 | - if advAFWear[id] then -- 穿着呢 | 561 | + if curWear[id] then -- 穿着呢 |
| 558 | local oldData = csvdb["adv_artifactCsv"][id][advAFGet[id]] | 562 | local oldData = csvdb["adv_artifactCsv"][id][advAFGet[id]] |
| 559 | local newData = csvdb["adv_artifactCsv"][id][newLv] | 563 | local newData = csvdb["adv_artifactCsv"][id][newLv] |
| 560 | self:delArtifactEffect(oldData.effect) | 564 | self:delArtifactEffect(oldData.effect) |
| @@ -817,6 +821,8 @@ local function clickOut(self, room, block, params) | @@ -817,6 +821,8 @@ local function clickOut(self, room, block, params) | ||
| 817 | self:backReward(self:award({[ItemId.AdvPoint] = curFloorData.exp})) | 821 | self:backReward(self:award({[ItemId.AdvPoint] = curFloorData.exp})) |
| 818 | end | 822 | end |
| 819 | local isHaveRelay = self:isHaveRelay(self.level) | 823 | local isHaveRelay = self:isHaveRelay(self.level) |
| 824 | + | ||
| 825 | + self.owner:getProperty("advTeam").player = self.battle.player:getDB() -- 临时缓存住 battle 的player | ||
| 820 | if isHaveRelay and not self.isRelay then | 826 | if isHaveRelay and not self.isRelay then |
| 821 | self:initByChapter(self.chapterId, self.level, true, true, true, false) | 827 | self:initByChapter(self.chapterId, self.level, true, true, true, false) |
| 822 | else | 828 | else |
src/models/RolePlugin.lua
| @@ -794,16 +794,6 @@ function RolePlugin.bind(Role) | @@ -794,16 +794,6 @@ function RolePlugin.bind(Role) | ||
| 794 | adv:forceOver() | 794 | adv:forceOver() |
| 795 | end | 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 | local advRelay = self:getProperty("advRelay") | 798 | local advRelay = self:getProperty("advRelay") |
| 809 | advRelay[-1] = nil | 799 | advRelay[-1] = nil |
| @@ -814,6 +804,17 @@ function RolePlugin.bind(Role) | @@ -814,6 +804,17 @@ function RolePlugin.bind(Role) | ||
| 814 | advElS = nowSeason, | 804 | advElS = nowSeason, |
| 815 | advRelay = advRelay, | 805 | advRelay = advRelay, |
| 816 | }, notNotify) | 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 | end | 818 | end |
| 818 | end | 819 | end |
| 819 | 820 |