存档bug
This commit is contained in:
parent
4180d78a70
commit
94e9a6cc18
@ -116,6 +116,7 @@ function ServerItemData:recoveryItem(data, maxCount)
|
||||
addCount = maxCount - currentCount
|
||||
end
|
||||
self:_addItem(data.cfg_id, addCount)
|
||||
ServerDataManager:saveData()
|
||||
end
|
||||
|
||||
function ServerItemData:resetVitRecoverTime()
|
||||
|
||||
@ -22,6 +22,7 @@ function ServerGameData:init()
|
||||
end
|
||||
|
||||
function ServerGameData:initData()
|
||||
self.disableSave = true
|
||||
self:init()
|
||||
if self.distinctId == nil or self.distinctId == "" then
|
||||
self.distinctId = LocalData:getDistinctId()
|
||||
@ -87,6 +88,7 @@ function ServerGameData:initData()
|
||||
v:loadLocalData()
|
||||
end
|
||||
end
|
||||
self.disableSave = false
|
||||
end
|
||||
|
||||
function ServerGameData:initServerData(name, path)
|
||||
@ -106,6 +108,9 @@ function ServerGameData:getData()
|
||||
end
|
||||
|
||||
function ServerGameData:saveData()
|
||||
if self.disableSave then
|
||||
return
|
||||
end
|
||||
for k, v in pairs(self.dataMap) do
|
||||
v:saveLocalData()
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user