Commit b8d4bc787aa3dc676d14597025320ee36f392470
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,7 +304,8 @@ function Passive:canEffect(effType, effValue) | ||
| 304 | end | 304 | end | 
| 305 | --禁用被动技 | 305 | --禁用被动技 | 
| 306 | local count = self.owner:getDisablePassiveCount() | 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 | return | 309 | return | 
| 309 | end | 310 | end | 
| 310 | return true | 311 | return true | 
src/adv/AdvPlayer.lua
| @@ -115,10 +115,13 @@ end | @@ -115,10 +115,13 @@ end | ||
| 115 | function BaseObject:getPassiveIdx(passive) | 115 | function BaseObject:getPassiveIdx(passive) | 
| 116 | for idx, passive_ in ipairs(self.passives) do | 116 | for idx, passive_ in ipairs(self.passives) do | 
| 117 | if passive_ == passive then | 117 | if passive_ == passive then | 
| 118 | - return idx | 118 | + if passive.passiveData.dispel ~= 1 then | 
| 119 | + return idx | ||
| 120 | + end | ||
| 121 | + return | ||
| 119 | end | 122 | end | 
| 120 | end | 123 | end | 
| 121 | - return 999 | 124 | + return | 
| 122 | end | 125 | end | 
| 123 | 126 | ||
| 124 | function BaseObject:getDisablePassiveCount() | 127 | function BaseObject:getDisablePassiveCount() | 
- 
mentioned in commit 52f8c5f05d0a531232a7dd7887becd2a77986aa1
 - 
mentioned in commit 52f8c5f05d0a531232a7dd7887becd2a77986aa1
 - 
mentioned in commit ba6d85edc65900830c7e168102d70671881b5808
 - 
mentioned in commit ba6d85edc65900830c7e168102d70671881b5808