Commit b8d4bc787aa3dc676d14597025320ee36f392470

Authored by zhouhaihai
2 parents ce42bb03 871b3da3

Merge branch 'bugfix' into develop

* bugfix:
  被动 取消
Showing 2 changed files with 7 additions and 3 deletions   Show diff stats
src/adv/AdvPassive.lua
... ... @@ -304,7 +304,8 @@ function Passive:canEffect(effType, effValue)
304 304 end
305 305 --禁用被动技
306 306 local count = self.owner:getDisablePassiveCount()
307   - if count and (count == 0 or self.owner:getPassiveIdx(self) <= count) then
  307 + local idx = self.owner:getPassiveIdx(self)
  308 + if count and idx and (count == 0 or idx <= count) then
308 309 return
309 310 end
310 311 return true
... ...
src/adv/AdvPlayer.lua
... ... @@ -115,10 +115,13 @@ end
115 115 function BaseObject:getPassiveIdx(passive)
116 116 for idx, passive_ in ipairs(self.passives) do
117 117 if passive_ == passive then
118   - return idx
  118 + if passive.passiveData.dispel ~= 1 then
  119 + return idx
  120 + end
  121 + return
119 122 end
120 123 end
121   - return 999
  124 + return
122 125 end
123 126  
124 127 function BaseObject:getDisablePassiveCount()
... ...