Commit 3f9c1e7a8cfba8439299dc8d2732d81ff95d6920
1 parent
58559948
加个保护
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
src/adv/Adv.lua
... | ... | @@ -162,6 +162,7 @@ local function randomAdvMap(role, chapterId, level, notNotify) |
162 | 162 | local function randomCommon() |
163 | 163 | if not eventLib[etype] or not next(eventLib[etype]) or not eventLib[etype][especial] or not next(eventLib[etype][especial]) then return false end |
164 | 164 | event.id = math.randWeight(eventLib[etype][especial], "showup") |
165 | + if not event.id then return false end | |
165 | 166 | if eventLib[etype][especial][event.id].limit > 1 then |
166 | 167 | eventLib[etype][especial][event.id].limit = eventLib[etype][especial][event.id].limit - 1 |
167 | 168 | elseif eventLib[etype][especial][event.id].limit == 1 then | ... | ... |