Update GaCy-GO

This commit is contained in:
CAtlas0784 committed 2026-10-28 18:54:43 +07:00
1 parent da8a32f60d
commit 0cbe460e49
345 files changed
+98202 -77559

No files matched your search

@@ -68,7 +68,7 @@ func cwPreparingData(s *Session) (*common.CurrencyWarsCatalog, *pb.GridFightGetD
func init() {
// Native replay confirms HFCBOIOAECK removes an owned role. Its command
// is resolved by the current table, including the actual typed response.
handle("GridFightRecycleRole", func(s *Session, req *pb.GridFightRecycleRoleCsReq, rsp *pb.GridFightRecycleRoleScRsp) error {
cwHandle("GridFightRecycleRole", func(s *Session, req *pb.GridFightRecycleRoleCsReq, rsp *pb.GridFightRecycleRoleScRsp) error {
rsp.Retcode = uint32(pb.Retcode_RET_GRID_FIGHT_PARAM_NOT_MATCH)
catalog, data, err := cwPreparingData(s)
if err != nil {
@@ -115,7 +115,7 @@ func init() {
}
notify := cwNotify(cwGoldSync(player.Gold), &pb.KFNCAIHIHCM{MNLCHEJKDHO: &pb.KFNCAIHIHCM_HFCBOIOAECK{HFCBOIOAECK: req.UniqueId}})
notify.GCPNIHHBGGD[0].GridUpdateSrc = pb.JJDFGMMMCMI_JJDFGMMMCMI_JOMIDGFCHPH
if err = s.Send(notify); err != nil {
if err = cwSend(s, notify); err != nil {
return err
}
rsp.Retcode = 0
@@ -124,7 +124,7 @@ func init() {
})
// Current table names this response BuyGoodRsp. Controlled native capture
// confirms that name/command, including zero-based indices and sync-before-rsp.
handleNamed("GridFightBuyGoods", "BuyGoodRsp", func(s *Session, req *pb.GridFightBuyGoodsCsReq, rsp *pb.BuyGoodRsp) error {
cwHandleNamed("GridFightBuyGoods", "BuyGoodRsp", func(s *Session, req *pb.GridFightBuyGoodsCsReq, rsp *pb.BuyGoodRsp) error {
rsp.Retcode = uint32(pb.Retcode_RET_GRID_FIGHT_PARAM_NOT_MATCH)
catalog, data, err := cwPreparingData(s)
if err != nil {
@@ -173,6 +173,7 @@ func init() {
scales := team.GridGameRoleList[0].ConvertPropertyToFixpoint
for _, r := range team.GridGameRoleList {
if !maps.Equal(scales, r.ConvertPropertyToFixpoint) {
PacketLog(fmt.Sprintf("CW_BUY rejected: party property scales differ role_uid=%d", r.UniqueId))
rsp.Retcode = uint32(pb.Retcode_RET_GRID_FIGHT_CONF_MISS)
return nil
}
@@ -190,6 +191,7 @@ func init() {
offer := shop.OGDKJPDFFAI[i]
roleOffer := offer.GetBDPIMPJOJBK()
if _, e := catalog.CapturedRoleVariant(roleOffer.RoleId, roleOffer.RoleStar); e != nil {
PacketLog(fmt.Sprintf("CW_BUY rejected: missing captured role variant role=%d star=%d error=%v", roleOffer.RoleId, roleOffer.RoleStar, e))
rsp.Retcode = uint32(pb.Retcode_RET_GRID_FIGHT_CONF_MISS)
return nil
}
@@ -201,6 +203,9 @@ func init() {
for _, r := range team.KCOMPKMJCMC {
occupied[r.Pos] = true
}
for _, f := range team.PMEOPPDAMLM {
occupied[f.Pos] = true
}
for p := uint32(front+back) + 1; uint64(p) <= uint64(front+back)+uint64(player.MICEOJBAKGN); p++ {
if !occupied[p] {
pos = p
@@ -239,7 +244,7 @@ func init() {
notify.GCPNIHHBGGD[0].OOEOCGLLHFO = indices
notify.GCPNIHHBGGD = append(notify.GCPNIHHBGGD, groups...)
notify.GCPNIHHBGGD = append(notify.GCPNIHHBGGD, cwNotify(cwShopSync(shop)).GCPNIHHBGGD...)
if err = s.Send(notify); err != nil {
if err = cwSend(s, notify); err != nil {
return err
}
rsp.CGAFCMIAKLI = indices
@@ -247,7 +252,7 @@ func init() {
PacketLog(fmt.Sprintf("CW_BUY saved slots=%v gold=%d revision=%d", indices, player.Gold, s.currencyWarsRevision))
return nil
})
handle("GridFightLockShop", func(s *Session, req *pb.GridFightLockShopCsReq, rsp *pb.GridFightLockShopScRsp) error {
cwHandle("GridFightLockShop", func(s *Session, req *pb.GridFightLockShopCsReq, rsp *pb.GridFightLockShopScRsp) error {
rsp.Retcode = uint32(pb.Retcode_RET_GRID_FIGHT_PARAM_NOT_MATCH)
catalog, data, err := cwPreparingData(s)
if err != nil {
@@ -261,13 +266,13 @@ func init() {
if err = s.saveCurrencyWarsData(data, catalog); err != nil {
return nil
}
if err = s.Send(cwNotify(cwShopSync(shop))); err != nil {
if err = cwSend(s, cwNotify(cwShopSync(shop))); err != nil {
return err
}
rsp.Retcode = 0
return nil
})
handle("GridFightRefreshShop", func(s *Session, _ *pb.GridFightRefreshShopCsReq, rsp *pb.GridFightRefreshShopScRsp) error {
cwHandle("GridFightRefreshShop", func(s *Session, _ *pb.GridFightRefreshShopCsReq, rsp *pb.GridFightRefreshShopScRsp) error {
rsp.Retcode = uint32(pb.Retcode_RET_GRID_FIGHT_PARAM_NOT_MATCH)
catalog, data, err := cwPreparingData(s)
if err != nil {
@@ -353,7 +358,7 @@ func init() {
if err = s.saveCurrencyWarsData(data, catalog); err != nil {
return nil
}
if err = s.Send(cwNotify(cwGoldSync(gold), cwShopSync(shop))); err != nil {
if err = cwSend(s, cwNotify(cwGoldSync(gold), cwShopSync(shop))); err != nil {
return err
}
rsp.Retcode = 0
@@ -370,12 +375,12 @@ func init() {
if err == nil {
_, _, shop := cwComponents(data.DHFOFLFCLAH)
if shop != nil {
if err = s.Send(cwNotify(cwShopSync(shop), cwUnlock())); err != nil {
if err = cwSend(s, cwNotify(cwShopSync(shop), cwUnlock())); err != nil {
return err
}
rsp.Retcode = 0
}
}
return s.Send(rsp)
return cwSend(s, rsp)
})
}