mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 15:43:49 +01:00
fix(cafe): read PointCost as uint16 for G1-G5.2 clients
Cherry-picked from main (3d0114c) with conflict resolution.
Pre-G6 clients send PointCost as uint16, not uint32.
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"erupe-ce/common/byteframe"
|
"erupe-ce/common/byteframe"
|
||||||
|
_config "erupe-ce/config"
|
||||||
"erupe-ce/network"
|
"erupe-ce/network"
|
||||||
"erupe-ce/network/clientctx"
|
"erupe-ce/network/clientctx"
|
||||||
)
|
)
|
||||||
@@ -30,7 +31,11 @@ func (m *MsgMhfAcquireCafeItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cl
|
|||||||
m.ItemType = bf.ReadUint16()
|
m.ItemType = bf.ReadUint16()
|
||||||
m.ItemID = bf.ReadUint16()
|
m.ItemID = bf.ReadUint16()
|
||||||
m.Quant = bf.ReadUint16()
|
m.Quant = bf.ReadUint16()
|
||||||
|
if _config.ErupeConfig.RealClientMode >= _config.G6 {
|
||||||
m.PointCost = bf.ReadUint32()
|
m.PointCost = bf.ReadUint32()
|
||||||
|
} else {
|
||||||
|
m.PointCost = uint32(bf.ReadUint16())
|
||||||
|
}
|
||||||
m.Unk0 = bf.ReadUint16()
|
m.Unk0 = bf.ReadUint16()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user