添加打印
This commit is contained in:
parent
92a147c14c
commit
996f3deeee
@ -435,7 +435,9 @@ function LocalData:saveBattleSnapshot(snapshot)
|
||||
if EDITOR_MODE then
|
||||
Logger.logHighlight(json.encode(snapshot))
|
||||
end
|
||||
print("Snapshot: " .. json.encode(snapshot))
|
||||
self:setString(LocalData:getRoleKey(LOCAL_DATA_KEY.BATTLE_SNAPSHOT), json.encode(snapshot))
|
||||
LocalData:save()
|
||||
end
|
||||
|
||||
function LocalData:getBattleSnapshot()
|
||||
@ -443,6 +445,7 @@ function LocalData:getBattleSnapshot()
|
||||
if EDITOR_MODE then
|
||||
Logger.logHighlight(dealedSnapshot)
|
||||
end
|
||||
print("Snapshot: " .. dealedSnapshot)
|
||||
return json.decode(dealedSnapshot)
|
||||
end
|
||||
|
||||
|
||||
@ -480,6 +480,10 @@ function BattleBaseController:init(params, snapshot)
|
||||
self.delayEffectTextList = {}
|
||||
self.delayEffectTextCount = 0
|
||||
self.time = 0
|
||||
print("Snapshot: -----------------------------------------")
|
||||
if snapshot then
|
||||
print("Snapshot: " .. snapshot.battleType)
|
||||
end
|
||||
if snapshot then -- 处理战斗快照
|
||||
self:dealSnapshotBattleBaseInfo(snapshot)
|
||||
self.battleData:init(params, snapshot.battledataShopInfo)
|
||||
|
||||
@ -117,12 +117,15 @@ function BattleSnapshotHelper:snapshotBattleInfo(battleBaseController)
|
||||
end
|
||||
|
||||
function BattleSnapshotHelper:dealSnapshotBattleBaseInfo(battleBaseController, snapInfo)
|
||||
print("Snapshot: dealSnapshotBattleBaseInfo")
|
||||
if not snapInfo then
|
||||
return
|
||||
end
|
||||
print("Snapshot: snapInfo")
|
||||
if not NEED_SAVE_SNAPSHOT_BATTLE_TYPE[snapInfo.battleType] then
|
||||
return
|
||||
end
|
||||
print("Snapshot: NEED_SAVE_SNAPSHOT_BATTLE_TYPE")
|
||||
|
||||
local atkFormation = snapInfo.params.atkFormation
|
||||
snapInfo.params.atkFormation = {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user