fix(shop): write gacha header for G1+ clients, not just GG+

The G1 client binary expects 8 uint32 fields (ID, rank restrictions,
MinGR, MinHR) before the name string in the gacha listing response.
PR #150 only wrote these for GG+, causing G1–G32 clients to misparse
the stream. Verified against Wii U G1 RPX decompilation of
import_gacha_list at 0x02C594FC.
This commit is contained in:
Houmgaor
2026-02-26 23:53:35 +01:00
parent d0837e779c
commit 178a008e25

View File

@@ -93,9 +93,7 @@ func handleMsgMhfEnumerateShop(s *Session, p mhfpacket.MHFPacket) {
bf.WriteUint16(uint16(len(gachas))) bf.WriteUint16(uint16(len(gachas)))
bf.WriteUint16(uint16(len(gachas))) bf.WriteUint16(uint16(len(gachas)))
for _, g := range gachas { for _, g := range gachas {
if s.server.erupeConfig.RealClientMode >= cfg.GG { if s.server.erupeConfig.RealClientMode >= cfg.G1 {
//Before GG, there was no data for G1, so there was no data for G1 except for ID and name
//But the difference between G2 and G3 still needs to be tested, and the data for G1 and GG are already clear
bf.WriteUint32(g.ID) bf.WriteUint32(g.ID)
bf.WriteUint32(0) // Unknown rank restrictions bf.WriteUint32(0) // Unknown rank restrictions
bf.WriteUint32(0) bf.WriteUint32(0)