fix G1 compatibility

This commit is contained in:
wish
2024-03-17 16:35:16 +11:00
parent 76858bb111
commit d26ae4563e
4 changed files with 11 additions and 7 deletions

View File

@@ -1049,9 +1049,11 @@ func handleMsgMhfStampcardStamp(s *Session, p mhfpacket.MHFPacket) {
pkt := p.(*mhfpacket.MsgMhfStampcardStamp)
bf := byteframe.NewByteFrame()
bf.WriteUint16(pkt.HR)
bf.WriteUint16(pkt.GR)
var stamps uint16
_ = s.server.db.QueryRow(`SELECT stampcard FROM characters WHERE id = $1`, s.charID).Scan(&stamps)
if _config.ErupeConfig.RealClientMode >= _config.G1 {
bf.WriteUint16(pkt.GR)
}
bf.WriteUint16(stamps)
stamps += pkt.Stamps
bf.WriteUint16(stamps)