feat: add enable_aha_global passive support to Persistent and battle handlers
This commit is contained in:
1 parent
74f3c4411b
commit
332171cafb
3 files changed
+26
-15
No files matched your search
@@ -405,6 +405,7 @@ func createBattleInfo(s *Session, casterID, skillIndex uint32) *goproto.SceneBat
|
||||
|
||||
// global buffs
|
||||
hasCastorice, hasSilverWolf := false, false
|
||||
hasAha := false
|
||||
for _, buff := range battleInfo.BuffList {
|
||||
if buff.Id == 140703 {
|
||||
hasCastorice = true
|
||||
@@ -412,6 +413,9 @@ func createBattleInfo(s *Session, casterID, skillIndex uint32) *goproto.SceneBat
|
||||
if buff.Id == 150602 {
|
||||
hasSilverWolf = true
|
||||
}
|
||||
if buff.Id == 151104 {
|
||||
hasAha = true
|
||||
}
|
||||
}
|
||||
if !hasCastorice && (player.EnableCastoriceGlobal == nil || *player.EnableCastoriceGlobal) {
|
||||
battleInfo.BuffList = append(battleInfo.BuffList, &goproto.BattleBuff{
|
||||
@@ -423,6 +427,11 @@ func createBattleInfo(s *Session, casterID, skillIndex uint32) *goproto.SceneBat
|
||||
Id: 150602, Level: 1, OwnerId: 0xffffffff, WaveFlag: 0xffffffff,
|
||||
})
|
||||
}
|
||||
if !hasAha && (player.EnableAhaGlobal == nil || *player.EnableAhaGlobal) {
|
||||
battleInfo.BuffList = append(battleInfo.BuffList, &goproto.BattleBuff{
|
||||
Id: 151104, Level: 1, OwnerId: 0xffffffff, WaveFlag: 0xffffffff,
|
||||
})
|
||||
}
|
||||
|
||||
// Stage invasion buff (pearl-sr 4.6.53: e.g. Peak 11 stage 4 30511021/30511022 -> buff 3034004)
|
||||
if invasionID := getStageInvasionID(battleInfo.StageId); invasionID != 0 {
|
||||
@@ -445,11 +454,6 @@ func createBattleInfo(s *Session, casterID, skillIndex uint32) *goproto.SceneBat
|
||||
})
|
||||
}
|
||||
|
||||
// Aha Global Passive (151104) — always on, same as the Rust build
|
||||
battleInfo.BuffList = append(battleInfo.BuffList, &goproto.BattleBuff{
|
||||
Id: 151104, Level: 1, OwnerId: 0xffffffff, WaveFlag: 0xffffffff,
|
||||
})
|
||||
|
||||
return battleInfo
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user