mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-15 08:25:09 +01:00
RealClientMode replaced for ClientID
This commit is contained in:
@@ -31,7 +31,7 @@ func (m *MsgMhfAcquireCafeItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cl
|
||||
m.ItemType = bf.ReadUint16()
|
||||
m.ItemID = bf.ReadUint16()
|
||||
m.Quant = bf.ReadUint16()
|
||||
if _config.ErupeConfig.RealClientMode >= _config.G1 {
|
||||
if _config.ErupeConfig.ClientID >= _config.G1 {
|
||||
m.PointCost = bf.ReadUint32()
|
||||
} else {
|
||||
m.PointCost = uint32(bf.ReadUint16())
|
||||
|
||||
@@ -27,10 +27,10 @@ func (m *MsgMhfApplyDistItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Clie
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.DistributionType = bf.ReadUint8()
|
||||
m.DistributionID = bf.ReadUint32()
|
||||
if _config.ErupeConfig.RealClientMode >= _config.G8 {
|
||||
if _config.ErupeConfig.ClientID >= _config.G8 {
|
||||
m.Unk2 = bf.ReadUint32()
|
||||
}
|
||||
if _config.ErupeConfig.RealClientMode >= _config.G10 {
|
||||
if _config.ErupeConfig.ClientID >= _config.G10 {
|
||||
m.Unk3 = bf.ReadUint32()
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -28,7 +28,7 @@ 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
|
||||
if _config.ErupeConfig.RealClientMode >= _config.Z1 {
|
||||
if _config.ErupeConfig.ClientID >= _config.Z1 {
|
||||
m.Unk3 = bf.ReadBytes(uint(bf.ReadUint8()))
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -30,7 +30,7 @@ func (m *MsgMhfEnumerateQuest) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cli
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
m.World = bf.ReadUint8()
|
||||
m.Counter = bf.ReadUint16()
|
||||
if _config.ErupeConfig.RealClientMode <= _config.Z1 {
|
||||
if _config.ErupeConfig.ClientID <= _config.Z1 {
|
||||
m.Offset = uint16(bf.ReadUint8())
|
||||
} else {
|
||||
m.Offset = bf.ReadUint16()
|
||||
|
||||
@@ -32,7 +32,7 @@ func (m *MsgMhfEnumerateShop) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Clie
|
||||
m.ShopID = bf.ReadUint32()
|
||||
m.Limit = bf.ReadUint16()
|
||||
m.Unk3 = bf.ReadUint8()
|
||||
if _config.ErupeConfig.RealClientMode >= _config.G2 {
|
||||
if _config.ErupeConfig.ClientID >= _config.G2 {
|
||||
m.Unk4 = bf.ReadUint8()
|
||||
m.Unk5 = bf.ReadUint32()
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ func (m *MsgMhfSavedata) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientCon
|
||||
m.AllocMemSize = bf.ReadUint32()
|
||||
m.SaveType = bf.ReadUint8()
|
||||
m.Unk1 = bf.ReadUint32()
|
||||
if _config.ErupeConfig.RealClientMode >= _config.G1 {
|
||||
if _config.ErupeConfig.ClientID >= _config.G1 {
|
||||
m.DataSize = bf.ReadUint32()
|
||||
}
|
||||
if m.DataSize == 0 { // seems to be used when DataSize = 0 rather than on savetype?
|
||||
|
||||
@@ -32,12 +32,12 @@ func (m *MsgMhfStampcardStamp) Opcode() network.PacketID {
|
||||
func (m *MsgMhfStampcardStamp) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.HR = bf.ReadUint16()
|
||||
if _config.ErupeConfig.RealClientMode >= _config.G1 {
|
||||
if _config.ErupeConfig.ClientID >= _config.G1 {
|
||||
m.GR = bf.ReadUint16()
|
||||
}
|
||||
m.Stamps = bf.ReadUint16()
|
||||
bf.ReadUint16() // Zeroed
|
||||
if _config.ErupeConfig.RealClientMode >= _config.Z2 {
|
||||
if _config.ErupeConfig.ClientID >= _config.Z2 {
|
||||
m.Reward1 = uint16(bf.ReadUint32())
|
||||
m.Reward2 = uint16(bf.ReadUint32())
|
||||
m.Item1 = uint16(bf.ReadUint32())
|
||||
|
||||
@@ -23,11 +23,11 @@ func (m *MsgMhfUpdateMyhouseInfo) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfUpdateMyhouseInfo) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
if _config.ErupeConfig.RealClientMode >= _config.G10 {
|
||||
if _config.ErupeConfig.ClientID >= _config.G10 {
|
||||
m.Data = bf.ReadBytes(362)
|
||||
} else if _config.ErupeConfig.RealClientMode >= _config.GG {
|
||||
} else if _config.ErupeConfig.ClientID >= _config.GG {
|
||||
m.Data = bf.ReadBytes(338)
|
||||
} else if _config.ErupeConfig.RealClientMode >= _config.F5 {
|
||||
} else if _config.ErupeConfig.ClientID >= _config.F5 {
|
||||
// G1 is a guess
|
||||
m.Data = bf.ReadBytes(314)
|
||||
} else {
|
||||
|
||||
@@ -25,7 +25,7 @@ func (m *MsgSysCreateAcquireSemaphore) Opcode() network.PacketID {
|
||||
func (m *MsgSysCreateAcquireSemaphore) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
if _config.ErupeConfig.RealClientMode >= _config.S7 { // Assuming this was added with Ravi?
|
||||
if _config.ErupeConfig.ClientID >= _config.S7 { // Assuming this was added with Ravi?
|
||||
m.PlayerCount = bf.ReadUint8()
|
||||
}
|
||||
bf.ReadUint8() // SemaphoreID length
|
||||
|
||||
@@ -26,7 +26,7 @@ func (m *MsgSysCreateSemaphore) Opcode() network.PacketID {
|
||||
func (m *MsgSysCreateSemaphore) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
if _config.ErupeConfig.RealClientMode >= _config.S7 { // Assuming this was added with Ravi?
|
||||
if _config.ErupeConfig.ClientID >= _config.S7 { // Assuming this was added with Ravi?
|
||||
m.PlayerCount = bf.ReadUint8()
|
||||
}
|
||||
bf.ReadUint8() // SemaphoreID length
|
||||
|
||||
@@ -49,7 +49,7 @@ func (m *MsgSysTerminalLog) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Client
|
||||
e.Unk1 = bf.ReadInt32()
|
||||
e.Unk2 = bf.ReadInt32()
|
||||
e.Unk3 = bf.ReadInt32()
|
||||
if _config.ErupeConfig.RealClientMode >= _config.G1 {
|
||||
if _config.ErupeConfig.ClientID >= _config.G1 {
|
||||
for j := 0; j < 4; j++ {
|
||||
e.Unk4 = append(e.Unk4, bf.ReadInt32())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user