Commit c048e676c5dcc0a312736f96ffad6566a75fd31f

Authored by zhouhaihai
1 parent 7754304d

quest 增加定制

Showing 1 changed file with 15 additions and 4 deletions   Show diff stats
src/adv/AdvTask.lua
... ... @@ -132,10 +132,21 @@ function AdvTask.bind(Adv)
132 132 end
133 133 local advEventOpenStatus = self.owner:advEventOpenStatus()
134 134 local pool = {}
135   - for id, data in pairs(csvdb["event_questCsv"]) do
136   - if data.levelchapter == chapterId and (data.unlockType == 0 or (advEventOpenStatus[etype] or {})[data.unlockType]) then
137   - if AdvCommon.checkIsIn(level, data.leveltype, data.levellimit) then
138   - pool[id] = {showup = data.showup}
  135 +
  136 + local mapData = self:getCurMap():getMapInfoCsv()
  137 + for _, id in ipairs(mapData.quest:toArray(true, "=")) do
  138 + local data = csvdb["event_questCsv"][taskId]
  139 + if data then
  140 + pool[id] = {showup = data.showup}
  141 + end
  142 + end
  143 +
  144 + if not next(pool) then
  145 + for id, data in pairs(csvdb["event_questCsv"]) do
  146 + if data.levelchapter == chapterId and (data.unlockType == 0 or (advEventOpenStatus[etype] or {})[data.unlockType]) then
  147 + if AdvCommon.checkIsIn(level, data.leveltype, data.levellimit) then
  148 + pool[id] = {showup = data.showup}
  149 + end
139 150 end
140 151 end
141 152 end
... ...