mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-16 17:05:03 +01:00
Add MsgSysReserve203/IsUpdateGuildMsgBoard
This commit is contained in:
@@ -5,8 +5,14 @@ import (
|
||||
"github.com/Andoryuuta/byteframe"
|
||||
)
|
||||
|
||||
// TODO(Andoryuuta): Make up a name for this packet, not reserved anymore. Called "Is_update_guild_msg_board"
|
||||
|
||||
// MsgSysReserve203 represents the MSG_SYS_reserve203
|
||||
type MsgSysReserve203 struct{}
|
||||
type MsgSysReserve203 struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint16 // Hardcoded 0x0000 in the binary
|
||||
Unk1 uint16 // Hardcoded 0x0500 in the binary.
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgSysReserve203) Opcode() network.PacketID {
|
||||
@@ -15,7 +21,10 @@ func (m *MsgSysReserve203) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgSysReserve203) Parse(bf *byteframe.ByteFrame) error {
|
||||
panic("Not implemented")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint16()
|
||||
m.Unk1 = bf.ReadUint16()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
@@ -46,6 +46,33 @@ func doSizedAckResp(s *Session, ackHandle uint32, data []byte) {
|
||||
s.QueueAck(ackHandle, bfw.Data())
|
||||
}
|
||||
|
||||
func updateRights(s *Session) {
|
||||
update := &mhfpacket.MsgSysUpdateRight{
|
||||
Unk0: 0,
|
||||
Unk1: 0x4E,
|
||||
Rights: []mhfpacket.ClientRight{
|
||||
{
|
||||
ID: 1,
|
||||
Timestamp: 0,
|
||||
},
|
||||
{
|
||||
ID: 2,
|
||||
Timestamp: 0x5dfa14c0,
|
||||
},
|
||||
{
|
||||
ID: 3,
|
||||
Timestamp: 0x5dfa14c0,
|
||||
},
|
||||
{
|
||||
ID: 6,
|
||||
Timestamp: 0x5de70510,
|
||||
},
|
||||
},
|
||||
UnkSize: 0,
|
||||
}
|
||||
s.QueueSendMHF(update)
|
||||
}
|
||||
|
||||
func fixedSizeShiftJIS(text string, size int) []byte {
|
||||
r := bytes.NewBuffer([]byte(text))
|
||||
encoded, err := ioutil.ReadAll(transform.NewReader(r, japanese.ShiftJIS.NewEncoder()))
|
||||
@@ -522,6 +549,9 @@ func handleMsgMhfEntryRookieGuild(s *Session, p mhfpacket.MHFPacket) {}
|
||||
func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
|
||||
pkt := p.(*mhfpacket.MsgMhfEnumerateQuest)
|
||||
stubEnumerateNoResults(s, pkt.AckHandle)
|
||||
|
||||
// Update the client's rights as well:
|
||||
updateRights(s)
|
||||
}
|
||||
|
||||
func handleMsgMhfEnumerateEvent(s *Session, p mhfpacket.MHFPacket) {
|
||||
@@ -537,6 +567,9 @@ func handleMsgMhfEnumeratePrice(s *Session, p mhfpacket.MHFPacket) {
|
||||
func handleMsgMhfEnumerateRanking(s *Session, p mhfpacket.MHFPacket) {
|
||||
pkt := p.(*mhfpacket.MsgMhfEnumerateRanking)
|
||||
stubEnumerateNoResults(s, pkt.AckHandle)
|
||||
|
||||
// Update the client's rights as well:
|
||||
updateRights(s)
|
||||
}
|
||||
|
||||
func handleMsgMhfEnumerateOrder(s *Session, p mhfpacket.MHFPacket) {
|
||||
@@ -1012,30 +1045,7 @@ func handleMsgMhfGetBoostTime(s *Session, p mhfpacket.MHFPacket) {
|
||||
doSizedAckResp(s, pkt.AckHandle, []byte{})
|
||||
|
||||
// Update the client's rights as well:
|
||||
update := &mhfpacket.MsgSysUpdateRight{
|
||||
Unk0: 0,
|
||||
Unk1: 0x4E,
|
||||
Rights: []mhfpacket.ClientRight{
|
||||
{
|
||||
ID: 1,
|
||||
Timestamp: 0,
|
||||
},
|
||||
{
|
||||
ID: 2,
|
||||
Timestamp: 0x5dfa14c0,
|
||||
},
|
||||
{
|
||||
ID: 3,
|
||||
Timestamp: 0x5dfa14c0,
|
||||
},
|
||||
{
|
||||
ID: 6,
|
||||
Timestamp: 0x5de70510,
|
||||
},
|
||||
},
|
||||
UnkSize: 0,
|
||||
}
|
||||
s.QueueSendMHF(update)
|
||||
updateRights(s)
|
||||
}
|
||||
|
||||
func handleMsgMhfPostBoostTime(s *Session, p mhfpacket.MHFPacket) {}
|
||||
@@ -1608,9 +1618,16 @@ func handleMsgMhfUpdateForceGuildRank(s *Session, p mhfpacket.MHFPacket) {}
|
||||
|
||||
func handleMsgMhfResetTitle(s *Session, p mhfpacket.MHFPacket) {}
|
||||
|
||||
func handleMsgSysReserve202(s *Session, p mhfpacket.MHFPacket) {}
|
||||
// "Enumrate_guild_msg_board"
|
||||
func handleMsgSysReserve202(s *Session, p mhfpacket.MHFPacket) {
|
||||
}
|
||||
|
||||
func handleMsgSysReserve203(s *Session, p mhfpacket.MHFPacket) {}
|
||||
// "Is_update_guild_msg_board"
|
||||
func handleMsgSysReserve203(s *Session, p mhfpacket.MHFPacket) {
|
||||
pkt := p.(*mhfpacket.MsgSysReserve203)
|
||||
resp := make([]byte, 8) // Unk resp.
|
||||
s.QueueAck(pkt.AckHandle, resp)
|
||||
}
|
||||
|
||||
func handleMsgSysReserve204(s *Session, p mhfpacket.MHFPacket) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user