pre cw with probe and a bunch script to read game behavior

This commit is contained in:
CAtlas0784 committed 2026-10-21 20:40:13 +07:00
1 parent 5120219ae2
commit da8a32f60d
310 files changed
+219693 -872

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
package gameserver
import (
"fmt"
"gac-hkrpg-go/internal/common"
goproto "gac-hkrpg-go/protocol/proto"
)
// Exact runtime method pointers and their baseline native consumers were
// resolved for the catalog's source assembly (see CW investigation notes).
// Factory RVA 0xdbf2340 takes the slot index separately and selects the role
// constructor for oneof tag 1403. Cost RVA 0xdbf2860 reads HDE +0x28 (tag 13).
// Source is deliberately supplied by the action processor; its obfuscated enum
// values are not assigned normal/special meanings by this converter.
func currencyWarsRoleOfferProto(catalog *common.CurrencyWarsCatalog, offer common.CurrencyWarsShopOffer,
source goproto.FKGIEPHGACD,
) (*goproto.HDEIAANGMDB, error) {
if catalog == nil {
return nil, fmt.Errorf("CW offer catalog is missing")
}
if _, valid := goproto.FKGIEPHGACD_name[int32(source)]; !valid {
return nil, fmt.Errorf("CW shop source enum is outside the protocol schema")
}
if _, err := catalog.CapturedRoleVariant(offer.RoleID, offer.Star); err != nil {
return nil, err
}
return &goproto.HDEIAANGMDB{
Source: source,
LHGIFDNPIDE: offer.Sold,
KDKPDJNMMCM: offer.Cost,
AELHFLGJMJN: &goproto.HDEIAANGMDB_BDPIMPJOJBK{
BDPIMPJOJBK: &goproto.NJBGFHDPFNO{RoleId: offer.RoleID, RoleStar: offer.Star},
},
}, nil
}