mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 15:34:38 +01:00
cover more versions with Hiden savedata
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"errors"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
_config "erupe-ce/config"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfUpdateMyhouseInfo represents the MSG_MHF_UPDATE_MYHOUSE_INFO
|
||||
type MsgMhfUpdateMyhouseInfo struct {
|
||||
AckHandle uint32
|
||||
Unk0 []byte
|
||||
Data []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -23,10 +23,15 @@ 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.F5 {
|
||||
m.Unk0 = bf.ReadBytes(0x122)
|
||||
if _config.ErupeConfig.RealClientMode >= _config.G10 {
|
||||
m.Data = bf.ReadBytes(362)
|
||||
} else if _config.ErupeConfig.RealClientMode >= _config.GG {
|
||||
m.Data = bf.ReadBytes(338)
|
||||
} else if _config.ErupeConfig.RealClientMode >= _config.F5 {
|
||||
// G1 is a guess
|
||||
m.Data = bf.ReadBytes(314)
|
||||
} else {
|
||||
m.Unk0 = bf.ReadBytes(0x16A)
|
||||
m.Data = bf.ReadBytes(290)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -240,8 +240,8 @@ func handleMsgMhfGetMyhouseInfo(s *Session, p mhfpacket.MHFPacket) {
|
||||
|
||||
func handleMsgMhfUpdateMyhouseInfo(s *Session, p mhfpacket.MHFPacket) {
|
||||
pkt := p.(*mhfpacket.MsgMhfUpdateMyhouseInfo)
|
||||
s.server.db.Exec("UPDATE user_binary SET mission=$1 WHERE id=$2", pkt.Unk0, s.charID)
|
||||
doAckSimpleSucceed(s, pkt.AckHandle, []byte{0x00, 0x00, 0x00, 0x00})
|
||||
s.server.db.Exec("UPDATE user_binary SET mission=$1 WHERE id=$2", pkt.Data, s.charID)
|
||||
doAckSimpleSucceed(s, pkt.AckHandle, make([]byte, 4))
|
||||
}
|
||||
|
||||
func handleMsgMhfLoadDecoMyset(s *Session, p mhfpacket.MHFPacket) {
|
||||
|
||||
Reference in New Issue
Block a user