Save endgame progress, team presets, technique support and camera controls

This commit is contained in:
CAtlas0784 committed 2026-10-17 23:44:36 +07:00
1 parent a681affdb3
commit 639cef7d19
52 files changed
+11940 -766

No files matched your search

+14 -2
View File
@@ -45,9 +45,18 @@ type Session struct {
// spawned in the current scene. Used by SceneCastSkill to decide whether an
// attack actually hit a monster (the camera-detach bug fix).
MonsterEntities map[uint32]uint32
partyActorSlots map[uint32]bool
// Set by the challenge scene loader, cleared when loading an overworld scene.
ChallengeStageID uint32
pendingExRankSync map[uint32]bool
ChallengeStageID uint32
ChallengeBattleConfig *common.BattleConfig
ChallengeRun *challengeRun
PeakHardModes map[uint32]bool
TierceTeams map[uint32][][]uint32
TierceBuffs map[uint32][]uint32
pendingExRankSync map[uint32]bool
techniqueMP *uint32
leaderSlot uint32
paidTechniqueCasts map[uint32]bool
closed atomic.Bool
closeOnce sync.Once
@@ -89,6 +98,9 @@ func (s *Session) JSON() *common.FreesrData {
// SetJSON installs (or reloads) the player data.
func (s *Session) SetJSON(d *common.FreesrData) {
s.jsonMu.Lock()
if s.json == nil && d != nil {
s.leaderSlot = d.TeamPreset(d.ActiveTeamPreset).LeaderSlot
}
s.json = d
s.jsonMu.Unlock()
}