feat: add enable_aha_global passive support to Persistent and battle handlers

This commit is contained in:
CAtlas0784 committed 2026-10-17 00:49:09 +07:00
1 parent 74f3c4411b
commit 332171cafb
3 files changed
+26 -15

No files matched your search

+6
View File
@@ -305,6 +305,7 @@ type Persistent struct {
MarchType MultiPathAvatar `json:"march_type"`
EnableSWGlobal *bool `json:"enable_sw_global"`
EnableCastoriceGlobal *bool `json:"enable_castorice_global"`
EnableAhaGlobal *bool `json:"enable_aha_global"`
DressedSkins map[uint32]uint32 `json:"dressed_skins"`
ExRanksUnlocked map[uint32]bool `json:"ex_ranks_unlocked"`
}
@@ -313,6 +314,7 @@ type Persistent struct {
func DefaultPersistent() Persistent {
sw := true
cg := true
aha := true
return Persistent{
Lineups: map[uint32]uint32{0: 1313, 1: 1006, 2: 8001, 3: 1405},
Position: DefaultPosition(),
@@ -321,6 +323,7 @@ func DefaultPersistent() Persistent {
MarchType: MultiPathMarchHunt,
EnableSWGlobal: &sw,
EnableCastoriceGlobal: &cg,
EnableAhaGlobal: &aha,
DressedSkins: map[uint32]uint32{},
ExRanksUnlocked: map[uint32]bool{},
}
@@ -344,6 +347,7 @@ type FreesrData struct {
MarchType MultiPathAvatar `json:"-"`
EnableSWGlobal *bool `json:"-"`
EnableCastoriceGlobal *bool `json:"-"`
EnableAhaGlobal *bool `json:"-"`
DressedSkins map[uint32]uint32 `json:"-"`
}
@@ -379,6 +383,7 @@ func LoadFreesrData() (*FreesrData, error) {
data.MarchType = p.MarchType
data.EnableSWGlobal = p.EnableSWGlobal
data.EnableCastoriceGlobal = p.EnableCastoriceGlobal
data.EnableAhaGlobal = p.EnableAhaGlobal
data.DressedSkins = p.DressedSkins
for aid, unlocked := range p.ExRanksUnlocked {
if av, ok := data.Avatars[aid]; ok {
@@ -460,6 +465,7 @@ func (f *FreesrData) SavePersistent() {
MarchType: f.MarchType,
EnableSWGlobal: f.EnableSWGlobal,
EnableCastoriceGlobal: f.EnableCastoriceGlobal,
EnableAhaGlobal: f.EnableAhaGlobal,
DressedSkins: f.DressedSkins,
ExRanksUnlocked: exUnlocked,
}