add ClientMode support based on Forward.4

This commit is contained in:
wish
2023-07-22 16:47:44 +10:00
parent cc428d85d3
commit dbedab4d33
5 changed files with 18 additions and 7 deletions

View File

@@ -2,10 +2,11 @@ package mhfpacket
import (
"errors"
_config "erupe-ce/config"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/common/byteframe"
)
// MsgMhfAcquireCafeItem represents the MSG_MHF_ACQUIRE_CAFE_ITEM
@@ -30,7 +31,11 @@ func (m *MsgMhfAcquireCafeItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cl
m.ItemType = bf.ReadUint16()
m.ItemID = bf.ReadUint16()
m.Quant = bf.ReadUint16()
m.PointCost = bf.ReadUint32()
if _config.ErupeConfig.RealClientMode >= _config.G1 {
m.PointCost = bf.ReadUint32()
} else {
m.PointCost = uint32(bf.ReadUint16())
}
m.Unk0 = bf.ReadUint16()
return nil
}

View File

@@ -39,7 +39,7 @@ func (m *MsgSysTerminalLog) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Client
m.Unk0 = bf.ReadUint16()
values := 15
if _config.ErupeConfig.RealClientMode <= _config.S6 {
if _config.ErupeConfig.RealClientMode <= _config.F4 {
values = 7
}
for i := 0; i < int(m.EntryCount); i++ {