Commit 44dd6cae85579ca363605eeddd8e7af3435a3f7d

Authored by zhouhaihai
1 parent 50fddc3f

建筑消失删除建筑角色

Showing 1 changed file with 5 additions and 0 deletions   Show diff stats
src/adv/AdvBlock.lua
@@ -36,6 +36,11 @@ end @@ -36,6 +36,11 @@ end
36 function Block:clear() 36 function Block:clear()
37 if self:getEventType() == AdvEventType.Trap then 37 if self:getEventType() == AdvEventType.Trap then
38 self.trapId = self.event.id 38 self.trapId = self.event.id
  39 + elseif self:getEventType() == AdvEventType.Build then
  40 + local build = self.room.map.adv.battle:getBuild(self.room.roomId, self.blockId, self.room.map.mapIdx)
  41 + if build then
  42 + build.isDead = true
  43 + end
39 end 44 end
40 self.event = nil 45 self.event = nil
41 end 46 end