All house facilities acessible

Likely there are missing persistent save features around the My Garden gooks and My Mission tasks.
This commit is contained in:
SirFist
2020-02-26 17:31:49 +00:00
parent c54811729f
commit 2999fb14d6
6 changed files with 73 additions and 20 deletions

View File

@@ -6,7 +6,9 @@ import (
)
// MsgMhfEnumerateGuacot represents the MSG_MHF_ENUMERATE_GUACOT
type MsgMhfEnumerateGuacot struct{}
type MsgMhfEnumerateGuacot struct{
AckHandle uint32
}
// Opcode returns the ID associated with this packet type.
func (m *MsgMhfEnumerateGuacot) Opcode() network.PacketID {
@@ -15,10 +17,11 @@ func (m *MsgMhfEnumerateGuacot) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfEnumerateGuacot) Parse(bf *byteframe.ByteFrame) error {
panic("Not implemented")
m.AckHandle = bf.ReadUint32()
return nil
}
// Build builds a binary packet from the current data.
func (m *MsgMhfEnumerateGuacot) Build(bf *byteframe.ByteFrame) error {
panic("Not implemented")
}
}

View File

@@ -6,7 +6,11 @@ import (
)
// MsgMhfGetMyhouseInfo represents the MSG_MHF_GET_MYHOUSE_INFO
type MsgMhfGetMyhouseInfo struct{}
type MsgMhfGetMyhouseInfo struct{
AckHandle uint32
Unk0 uint32
Unk1 uint16
}
// Opcode returns the ID associated with this packet type.
func (m *MsgMhfGetMyhouseInfo) Opcode() network.PacketID {
@@ -15,10 +19,13 @@ func (m *MsgMhfGetMyhouseInfo) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfGetMyhouseInfo) Parse(bf *byteframe.ByteFrame) error {
panic("Not implemented")
m.AckHandle = bf.ReadUint32()
m.Unk0 = bf.ReadUint32()
m.Unk1 = bf.ReadUint16()
return nil
}
// Build builds a binary packet from the current data.
func (m *MsgMhfGetMyhouseInfo) Build(bf *byteframe.ByteFrame) error {
panic("Not implemented")
}
}

View File

@@ -6,7 +6,13 @@ import (
)
// MsgMhfLoadHouse represents the MSG_MHF_LOAD_HOUSE
type MsgMhfLoadHouse struct{}
type MsgMhfLoadHouse struct{
AckHandle uint32
Unk0 uint8
Unk1 uint32
Unk2 uint8
Unk3 uint32
}
// Opcode returns the ID associated with this packet type.
func (m *MsgMhfLoadHouse) Opcode() network.PacketID {
@@ -15,10 +21,15 @@ func (m *MsgMhfLoadHouse) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfLoadHouse) Parse(bf *byteframe.ByteFrame) error {
panic("Not implemented")
m.AckHandle = bf.ReadUint32()
m.Unk0 = bf.ReadUint8()
m.Unk1 = bf.ReadUint32()
m.Unk2 = bf.ReadUint8()
m.Unk3 = bf.ReadUint32()
return nil
}
// Build builds a binary packet from the current data.
func (m *MsgMhfLoadHouse) Build(bf *byteframe.ByteFrame) error {
panic("Not implemented")
}
}

View File

@@ -6,7 +6,9 @@ import (
)
// MsgMhfUpdateGuacot represents the MSG_MHF_UPDATE_GUACOT
type MsgMhfUpdateGuacot struct{}
type MsgMhfUpdateGuacot struct{
AckHandle uint32
}
// Opcode returns the ID associated with this packet type.
func (m *MsgMhfUpdateGuacot) Opcode() network.PacketID {
@@ -15,10 +17,11 @@ func (m *MsgMhfUpdateGuacot) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfUpdateGuacot) Parse(bf *byteframe.ByteFrame) error {
panic("Not implemented")
m.AckHandle = bf.ReadUint32()
return nil
}
// Build builds a binary packet from the current data.
func (m *MsgMhfUpdateGuacot) Build(bf *byteframe.ByteFrame) error {
panic("Not implemented")
}
}

View File

@@ -6,7 +6,10 @@ import (
)
// MsgMhfUpdateMyhouseInfo represents the MSG_MHF_UPDATE_MYHOUSE_INFO
type MsgMhfUpdateMyhouseInfo struct{}
type MsgMhfUpdateMyhouseInfo struct{
AckHandle uint32
Unk0 []byte
}
// Opcode returns the ID associated with this packet type.
func (m *MsgMhfUpdateMyhouseInfo) Opcode() network.PacketID {
@@ -15,10 +18,12 @@ func (m *MsgMhfUpdateMyhouseInfo) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfUpdateMyhouseInfo) Parse(bf *byteframe.ByteFrame) error {
panic("Not implemented")
m.AckHandle = bf.ReadUint32()
m.Unk0 = bf.ReadBytes(0x16A)
return nil
}
// Build builds a binary packet from the current data.
func (m *MsgMhfUpdateMyhouseInfo) Build(bf *byteframe.ByteFrame) error {
panic("Not implemented")
}
}

View File

@@ -1148,7 +1148,12 @@ func handleMsgMhfEnumerateHouse(s *Session, p mhfpacket.MHFPacket) {}
func handleMsgMhfUpdateHouse(s *Session, p mhfpacket.MHFPacket) {}
func handleMsgMhfLoadHouse(s *Session, p mhfpacket.MHFPacket) {}
func handleMsgMhfLoadHouse(s *Session, p mhfpacket.MHFPacket) {
pkt := p.(*mhfpacket.MsgMhfLoadHouse)
// Seems to generate same response regardless of upgrade tier
data, _ := hex.DecodeString("0000000000000000000000000000000000000000")
doSizedAckResp(s, pkt.AckHandle, data)
}
func handleMsgMhfOperateWarehouse(s *Session, p mhfpacket.MHFPacket) {}
@@ -1263,9 +1268,15 @@ func handleMsgMhfContractMercenary(s *Session, p mhfpacket.MHFPacket) {}
func handleMsgMhfEnumerateMercenaryLog(s *Session, p mhfpacket.MHFPacket) {}
func handleMsgMhfEnumerateGuacot(s *Session, p mhfpacket.MHFPacket) {}
func handleMsgMhfEnumerateGuacot(s *Session, p mhfpacket.MHFPacket) {
pkt := p.(*mhfpacket.MsgMhfEnumerateGuacot)
doSizedAckResp(s, pkt.AckHandle, []byte{0x00, 0x00, 0x00, 0x00})
}
func handleMsgMhfUpdateGuacot(s *Session, p mhfpacket.MHFPacket) {}
func handleMsgMhfUpdateGuacot(s *Session, p mhfpacket.MHFPacket) {
pkt := p.(*mhfpacket.MsgMhfUpdateGuacot)
s.QueueAck(pkt.AckHandle, []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00})
}
func handleMsgMhfInfoTournament(s *Session, p mhfpacket.MHFPacket) {}
@@ -1366,9 +1377,22 @@ func handleMsgMhfGetEtcPoints(s *Session, p mhfpacket.MHFPacket) {
func handleMsgMhfUpdateEtcPoint(s *Session, p mhfpacket.MHFPacket) {}
func handleMsgMhfGetMyhouseInfo(s *Session, p mhfpacket.MHFPacket) {}
func handleMsgMhfGetMyhouseInfo(s *Session, p mhfpacket.MHFPacket) {
pkt := p.(*mhfpacket.MsgMhfGetMyhouseInfo)
// another save potentially since it can be updated?
// set first byte to 1 to avoid pop up every time without save
body := make([]byte, 0x16A)
// parity with the only packet capture available
//body[0] = 10;
//body[21] = 10;
doSizedAckResp(s, pkt.AckHandle, body)
}
func handleMsgMhfUpdateMyhouseInfo(s *Session, p mhfpacket.MHFPacket) {}
func handleMsgMhfUpdateMyhouseInfo(s *Session, p mhfpacket.MHFPacket) {
pkt := p.(*mhfpacket.MsgMhfUpdateMyhouseInfo)
// looks to be the sized datachunk from above without the size bytes, quite possibly intended to be persistent
s.QueueAck(pkt.AckHandle, []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00})
}
func handleMsgMhfGetWeeklySchedule(s *Session, p mhfpacket.MHFPacket) {
pkt := p.(*mhfpacket.MsgMhfGetWeeklySchedule)