diff --git a/network/mhfpacket/msg_mhf_apply_dist_item.go b/network/mhfpacket/msg_mhf_apply_dist_item.go index f98dbb19a..a68354d2b 100644 --- a/network/mhfpacket/msg_mhf_apply_dist_item.go +++ b/network/mhfpacket/msg_mhf_apply_dist_item.go @@ -3,6 +3,7 @@ package mhfpacket import ( "errors" "erupe-ce/common/byteframe" + _config "erupe-ce/config" "erupe-ce/network" "erupe-ce/network/clientctx" ) @@ -26,8 +27,12 @@ func (m *MsgMhfApplyDistItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Clie m.AckHandle = bf.ReadUint32() m.DistributionType = bf.ReadUint8() m.DistributionID = bf.ReadUint32() - m.Unk2 = bf.ReadUint32() - m.Unk3 = bf.ReadUint32() + if _config.ErupeConfig.RealClientMode >= _config.G8 { + m.Unk2 = bf.ReadUint32() + } + if _config.ErupeConfig.RealClientMode >= _config.G10 { + m.Unk3 = bf.ReadUint32() + } return nil } diff --git a/network/mhfpacket/msg_mhf_enumerate_dist_item.go b/network/mhfpacket/msg_mhf_enumerate_dist_item.go index bf5796702..d4164f1e5 100644 --- a/network/mhfpacket/msg_mhf_enumerate_dist_item.go +++ b/network/mhfpacket/msg_mhf_enumerate_dist_item.go @@ -3,6 +3,7 @@ package mhfpacket import ( "errors" "erupe-ce/common/byteframe" + _config "erupe-ce/config" "erupe-ce/network" "erupe-ce/network/clientctx" ) @@ -27,7 +28,9 @@ func (m *MsgMhfEnumerateDistItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx. m.DistType = bf.ReadUint8() m.Unk1 = bf.ReadUint8() m.Unk2 = bf.ReadUint16() // Maximum? Hardcoded to 256 - m.Unk3 = bf.ReadBytes(uint(bf.ReadUint8())) + if _config.ErupeConfig.RealClientMode >= _config.Z1 { + m.Unk3 = bf.ReadBytes(uint(bf.ReadUint8())) + } return nil } diff --git a/server/channelserver/handlers_distitem.go b/server/channelserver/handlers_distitem.go index b18961202..e376cadb9 100644 --- a/server/channelserver/handlers_distitem.go +++ b/server/channelserver/handlers_distitem.go @@ -3,6 +3,7 @@ package channelserver import ( "erupe-ce/common/byteframe" ps "erupe-ce/common/pascalstring" + _config "erupe-ce/config" "erupe-ce/network/mhfpacket" "time" @@ -128,7 +129,9 @@ func handleMsgMhfApplyDistItem(s *Session, p mhfpacket.MHFPacket) { bf.WriteUint8(item.ItemType) bf.WriteUint32(item.ItemID) bf.WriteUint32(item.Quantity) - bf.WriteUint32(item.ID) + if _config.ErupeConfig.RealClientMode >= _config.G8 { + bf.WriteUint32(item.ID) + } } doAckBufSucceed(s, pkt.AckHandle, bf.Data()) }