From c4036daebc41cedfe09246cc1f0bb8206efaddaf Mon Sep 17 00:00:00 2001 From: Houmgaor Date: Fri, 30 Jan 2026 01:09:48 +0100 Subject: [PATCH] fix(guild): conditionally write GR field in InfoGuild for G10+ only Cherry-picked from main (8c219be) with conflict resolution. Pre-G10 clients don't have the GR field in the applicant list, so only write it when RealClientMode >= G10. Also optimizes two consecutive uint16(0) writes to single uint32(0). --- server/channelserver/handlers_guild.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/channelserver/handlers_guild.go b/server/channelserver/handlers_guild.go index 6091c5949..b882ee699 100644 --- a/server/channelserver/handlers_guild.go +++ b/server/channelserver/handlers_guild.go @@ -15,6 +15,7 @@ import ( "erupe-ce/common/byteframe" ps "erupe-ce/common/pascalstring" "erupe-ce/common/stringsupport" + _config "erupe-ce/config" "erupe-ce/network/mhfpacket" "github.com/jmoiron/sqlx" "go.uber.org/zap" @@ -1041,10 +1042,11 @@ func handleMsgMhfInfoGuild(s *Session, p mhfpacket.MHFPacket) { bf.WriteUint16(uint16(len(applicants))) for _, applicant := range applicants { bf.WriteUint32(applicant.CharID) - bf.WriteUint16(0) - bf.WriteUint16(0) + bf.WriteUint32(0) bf.WriteUint16(applicant.HRP) - bf.WriteUint16(applicant.GR) + if s.server.erupeConfig.RealClientMode >= _config.G10 { + bf.WriteUint16(applicant.GR) + } ps.Uint8(bf, applicant.Name, true) } }