Commit 8781e10326dcb450be4e549f8b48b85fe041c125

Authored by zhouhaihai
1 parent d3da3368

冒险 bug

src/actions/GmAction.lua
... ... @@ -197,6 +197,8 @@ function _M.advc(role, pms)
197 197 role:updateProperty({field = "advTask", value = {}})
198 198 role:updateProperty({field = "advItems", value = ""})
199 199 role:updateProperty({field = "advTeam", value = {}})
  200 + role:updateProperty({field = "advAFGet", value = {}})
  201 + role:updateProperty({field = "advAFWear", value = {}})
200 202 role.advData = nil
201 203 return "成功"
202 204 end
... ...
src/adv/Adv.lua
... ... @@ -325,6 +325,7 @@ function Adv:over(success, isAllPass)
325 325 self.owner:checkTaskEnter("AdvScore", {score = score})
326 326 self.owner:updateProperty({field = "advItems", value = ""})
327 327 self.owner:updateProperty({field = "advAFGet", value = {}})
  328 + self.owner:updateProperty({field = "advAFWear", value = {}})
328 329  
329 330 self:backEnd(success, score, scoreInfo, reward)
330 331 end
... ... @@ -764,7 +765,7 @@ function Adv:clickBlock(roomId, blockId, params)
764 765 end
765 766 end
766 767 if canOpen and not hadMonster then --开放
767   - self:getCurMap():openBlock(roomId, blockId, true)
  768 + self:getCurMap():openBlock(roomId, blockId, true, true)
768 769 status = true
769 770 end
770 771 else
... ...
src/adv/AdvMap.lua
... ... @@ -126,16 +126,18 @@ end
126 126  
127 127  
128 128 -- 打开一个地块
129   -function Map:openBlock(roomId, blockId, isPlayer)
  129 +function Map:openBlock(roomId, blockId, isPlayer, ignoreBack)
130 130 local room = self.rooms[roomId]
131 131 if not room then return end
132 132 local block = room.blocks[blockId]
133 133 if not block then return end
134 134 room:openBlock(block)
135 135 if isPlayer then
136   - self.adv.player:triggerPassive(Passive.OPEN_BLOCK)
  136 + self.adv.battle.player:triggerPassive(Passive.OPEN_BLOCK)
  137 + end
  138 + if not ignoreBack then
  139 + self.adv:backBlockChange(roomId, blockId)
137 140 end
138   - self:backBlockChange(roomId, blockId)
139 141 end
140 142  
141 143 function Map:openBlockBySize(roomId, blockId, size, isPlayer)
... ...
src/adv/AdvPlayer.lua
... ... @@ -140,7 +140,7 @@ function BaseObject:addBuff(buffId, releaser)
140 140 if not Buff.checkKeep({
141 141 owner = self,
142 142 buffData = buffData,
143   - releaseId = releaser.monsterId
  143 + releaseId = releaser and releaser.monsterId or nil
144 144 }) then return end
145 145 table.insert(self.buffs, Buff.create(self, releaser, {id = buffId}))
146 146 end
... ... @@ -574,7 +574,7 @@ function Player:addExp(value)
574 574 end
575 575 local delta = level - self.level
576 576 if delta > 0 then
577   - for _, attr in pairs(AdvAttsEnum) do
  577 + for attr, _ in pairs(AdvAttsEnum) do
578 578 if attr == "hp" then
579 579 self[attr] = self[attr] + self.growth[attr] * delta
580 580 self._hpMax = self._hpMax + self.growth[attr] * delta
... ...