本地存档
This commit is contained in:
parent
f79124999a
commit
72199d8993
@ -9,7 +9,7 @@ function ServerBagData:init()
|
||||
end
|
||||
|
||||
function ServerBagData:loadLocalData()
|
||||
self.ItemData:init(self.ItemData:loadLocalData())
|
||||
self.ItemData:loadLocalData()
|
||||
end
|
||||
|
||||
function ServerBagData:getCloneData()
|
||||
|
||||
@ -28,7 +28,7 @@ function ServerBaseData:loadLocalData()
|
||||
if data and data ~= "" then
|
||||
dataObj = json.decode(data)
|
||||
end
|
||||
return dataObj
|
||||
self:init(dataObj)
|
||||
end
|
||||
|
||||
function ServerBaseData:saveLocalData()
|
||||
|
||||
@ -77,7 +77,7 @@ function ServerGameData:initData()
|
||||
self:saveData()
|
||||
else
|
||||
for k, v in pairs(self.dataMap) do
|
||||
v:init(v:loadLocalData())
|
||||
v:loadLocalData()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user