Commit 6d2df5622fea1d2d9041fb1b0e06a075fe7d51fd
1 parent
55f07e43
保存建筑信息
Showing
1 changed file
with
8 additions
and
0 deletions
Show diff stats
src/adv/AdvBattle.lua
... | ... | @@ -322,6 +322,14 @@ function Battle:saveDB() |
322 | 322 | end |
323 | 323 | end |
324 | 324 | end |
325 | + for idx, mapBuilds in pairs(self.builds) do | |
326 | + for _, build in ipairs(mapBuilds) do | |
327 | + local block = self.adv:getBlock(build.roomId, build.blockId, idx) | |
328 | + if block and block:isBuild() then | |
329 | + block.event.build = build:getDB() | |
330 | + end | |
331 | + end | |
332 | + end | |
325 | 333 | end |
326 | 334 | |
327 | 335 | return Battle |
328 | 336 | \ No newline at end of file | ... | ... |