diff --git a/src/actions/AdvAction.lua b/src/actions/AdvAction.lua index e972058..87f9530 100644 --- a/src/actions/AdvAction.lua +++ b/src/actions/AdvAction.lua @@ -206,9 +206,9 @@ function _M.startHangRpc(agent, data) info.time = skynet.timex() + chapterData.idleTime --挂机时间 -- 没有在战斗 用team来挂机了 把team清掉 - -- if not role:getAdvData():isRunning() then - -- role:updateProperty({field = "advTeam", value = {}}) - -- end + if not role:getAdvData():isRunning() then + role:updateProperty({field = "advTeam", value = {}}) + end role:changeUpdates({{type = "advHang", field = chapterId, value = info}}) diff --git a/src/adv/Adv.lua b/src/adv/Adv.lua index bbddb92..5bbceaa 100644 --- a/src/adv/Adv.lua +++ b/src/adv/Adv.lua @@ -80,6 +80,7 @@ function Adv:initByChapter(chapterId, level, isToNext, notNotify, isRelay, isEnt self.cacheUnlock = self.cacheUnlock or {} self.shopStatus = self.shopStatus or {} self.support = self.support or {} + self.battle = nil -- 清掉 老的 battle if isEnter then -- 把 支援效果初始化为易用用的形式 self:initSupport(support or {}) -- libgit2 0.21.2