Update GaCy-GO
This commit is contained in:
1 parent
da8a32f60d
commit
0cbe460e49
345 files changed
+98202
-77559
No files matched your search
@@ -77,6 +77,12 @@ func buildCurrencyWarsBattle(s *Session, catalog *common.CurrencyWarsCatalog, ru
|
||||
return nil, err
|
||||
}
|
||||
ext := proto.Clone(grid.GridGameRoleList[0].DCEOLAAMGOO).(*pb.JJHJCIAPADP)
|
||||
// This is the native mode envelope: tag 1 is the captured CW mode, while
|
||||
// tag 2 is SpotlightID. Keep the mode, remove only the reference binding.
|
||||
if ext.GLHDCCPOGHL == nil {
|
||||
return nil, fmt.Errorf("CW battle mode envelope missing")
|
||||
}
|
||||
ext.GLHDCCPOGHL.IHHNLLAJAGB = 0
|
||||
// These fields contain the reference party's traits, buffs and battle events.
|
||||
// They cannot be reused for another party. Derived trait/equipment effects
|
||||
// remain a separate implementation task; don't silently inherit its bonuses.
|
||||
@@ -122,18 +128,48 @@ func buildCurrencyWarsBattle(s *Session, catalog *common.CurrencyWarsCatalog, ru
|
||||
}
|
||||
seen[avatarID] = true
|
||||
avatar := adventure.Avatars[avatarID]
|
||||
if avatar == nil {
|
||||
return nil, fmt.Errorf("CW role avatar %d not owned; trial resolver required", avatarID)
|
||||
var battleAvatar *pb.BattleAvatar
|
||||
if avatar == nil || config.Config.IsFakeAvatar != 0 {
|
||||
battleAvatar, err = cwTrialBattleAvatar(catalog, config, uint32(len(info.BattleAvatarList)))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
battleAvatar, _ = avatar.ToBattleAvatarProto(uint32(len(info.BattleAvatarList)), adventure.FindLightconeFor(avatarID), filterSupportedRelics(adventure.FindRelicsFor(avatarID), supported))
|
||||
battleAvatar.AvatarType = pb.AvatarType_AvatarType_AvatarGridFightType
|
||||
}
|
||||
battleAvatar, _ := avatar.ToBattleAvatarProto(uint32(len(info.BattleAvatarList)), adventure.FindLightconeFor(avatarID), filterSupportedRelics(adventure.FindRelicsFor(avatarID), supported))
|
||||
battleAvatar.AvatarType = pb.AvatarType_AvatarType_AvatarGridFightType
|
||||
if uint64(role.Pos) <= uint64(front) {
|
||||
info.BattleAvatarList = append(info.BattleAvatarList, battleAvatar)
|
||||
} else {
|
||||
battleAvatar.Index = uint32(len(grid.OPHONCKPNMG))
|
||||
grid.OPHONCKPNMG = append(grid.OPHONCKPNMG, battleAvatar)
|
||||
}
|
||||
grid.GridGameRoleList = append(grid.GridGameRoleList, &pb.BJGJBNJDLIK{RoleId: role.Id, RoleStar: role.RoleStar, Pos: role.Pos, AvatarId: avatarID, UniqueId: role.UniqueId, ConvertPropertyToFixpoint: maps.Clone(role.ConvertPropertyToFixpoint), DCEOLAAMGOO: proto.Clone(ext).(*pb.JJHJCIAPADP)})
|
||||
roleExt := proto.Clone(ext).(*pb.JJHJCIAPADP)
|
||||
if spotlights := cwSpotlights(run); spotlights != nil {
|
||||
for _, binding := range spotlights.FNNEPMAPOOF {
|
||||
if binding.RoleId == role.Id && binding.MDNAGANGNKK == role.UniqueId && !binding.ELBPNDIENDL {
|
||||
roleExt.GLHDCCPOGHL.IHHNLLAJAGB = binding.IHHNLLAJAGB
|
||||
}
|
||||
}
|
||||
}
|
||||
battleRole := &pb.BJGJBNJDLIK{RoleId: role.Id, RoleStar: role.RoleStar, Pos: role.Pos, AvatarId: avatarID, UniqueId: role.UniqueId, ConvertPropertyToFixpoint: maps.Clone(role.ConvertPropertyToFixpoint), DCEOLAAMGOO: roleExt, BABNHPDGNGB: maps.Clone(role.BABNHPDGNGB)}
|
||||
bag := cwEquipmentBag(run)
|
||||
for _, uid := range role.PNJIPHJJONG {
|
||||
var gear *pb.IJDLENJJBHJ
|
||||
if bag != nil {
|
||||
for _, owned := range bag.GridFightEquipmentList {
|
||||
if owned.UniqueId == uid {
|
||||
gear = owned
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if gear == nil {
|
||||
return nil, fmt.Errorf("CW role equipment %d is missing from saved inventory", uid)
|
||||
}
|
||||
battleRole.CNIJIJMEPEF = append(battleRole.CNIJIJMEPEF, &pb.ACFLKPFDHIM{UniqueId: gear.UniqueId, GridFightEquipmentId: gear.GridFightEquipmentId, ConvertPropertyToFixpoint: maps.Clone(gear.ConvertPropertyToFixpoint)})
|
||||
}
|
||||
grid.GridGameRoleList = append(grid.GridGameRoleList, battleRole)
|
||||
}
|
||||
if len(info.BattleAvatarList) == 0 || uint32(len(seen)) > player.AFFCFLFIFPH {
|
||||
return nil, fmt.Errorf("CW active party is empty or exceeds capacity")
|
||||
@@ -171,7 +207,7 @@ func buildCurrencyWarsBattle(s *Session, catalog *common.CurrencyWarsCatalog, ru
|
||||
}
|
||||
|
||||
func init() {
|
||||
handle("GridFightEnterBattleStage", func(s *Session, _ *pb.GridFightEnterBattleStageCsReq, rsp *pb.GridFightEnterBattleStageScRsp) error {
|
||||
cwHandle("GridFightEnterBattleStage", func(s *Session, _ *pb.GridFightEnterBattleStageCsReq, rsp *pb.GridFightEnterBattleStageScRsp) error {
|
||||
rsp.Retcode = uint32(pb.Retcode_RET_GRID_FIGHT_CONF_MISS)
|
||||
catalog, data, err := cwPreparingData(s)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user