Commit f5e382515995f38fddc847c2c03e5b848b250686
1 parent
fbd3dbaf
数据保护
Showing
2 changed files
with
3 additions
and
0 deletions
Show diff stats
src/adv/Adv.lua
| @@ -958,6 +958,7 @@ local function clickMonster(self, room, block, params) | @@ -958,6 +958,7 @@ local function clickMonster(self, room, block, params) | ||
| 958 | end | 958 | end |
| 959 | 959 | ||
| 960 | local function chooseCommon(self, room, block, chooseData, choose, tag) | 960 | local function chooseCommon(self, room, block, chooseData, choose, tag) |
| 961 | + if not choose then return end | ||
| 961 | if not chooseData or not chooseData["button".. choose .."cond"] then return end | 962 | if not chooseData or not chooseData["button".. choose .."cond"] then return end |
| 962 | 963 | ||
| 963 | local cond = chooseData["button".. choose .."cond"]:toArray(true, "=") | 964 | local cond = chooseData["button".. choose .."cond"]:toArray(true, "=") |
src/adv/AdvPassive.lua
| @@ -145,7 +145,9 @@ PassiveCondFactory[Passive.OPEN_BLOCK] = PassiveCondFactory[Passive.HURT_PERCENT | @@ -145,7 +145,9 @@ PassiveCondFactory[Passive.OPEN_BLOCK] = PassiveCondFactory[Passive.HURT_PERCENT | ||
| 145 | PassiveCondFactory[Passive.SELF_HURT] = function(_Passive) | 145 | PassiveCondFactory[Passive.SELF_HURT] = function(_Passive) |
| 146 | _Passive._trigger = function(self, params) | 146 | _Passive._trigger = function(self, params) |
| 147 | local buffId = params.buffId | 147 | local buffId = params.buffId |
| 148 | + if not buffId then return end | ||
| 148 | local data = csvdb["adv_map_buffCsv"][buffId] | 149 | local data = csvdb["adv_map_buffCsv"][buffId] |
| 150 | + if not data then return end | ||
| 149 | if data.classify:sismember(self.passiveData.value, " ") then | 151 | if data.classify:sismember(self.passiveData.value, " ") then |
| 150 | return true | 152 | return true |
| 151 | end | 153 | end |