mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 15:34:38 +01:00
fix various packet responses
This commit is contained in:
@@ -294,13 +294,7 @@ func handleMsgMhfSaveScenarioData(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
s.logger.Error("Failed to update scenario data in db", zap.Error(err))
|
s.logger.Error("Failed to update scenario data in db", zap.Error(err))
|
||||||
}
|
}
|
||||||
// Do this ack manually because it uses a non-(0|1) error code
|
doAckSimpleSucceed(s, pkt.AckHandle, make([]byte, 4))
|
||||||
s.QueueSendMHF(&mhfpacket.MsgSysAck{
|
|
||||||
AckHandle: pkt.AckHandle,
|
|
||||||
IsBufferResponse: false,
|
|
||||||
ErrorCode: 0x40,
|
|
||||||
AckData: []byte{0x00, 0x00, 0x00, 0x40},
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleMsgMhfLoadScenarioData(s *Session, p mhfpacket.MHFPacket) {
|
func handleMsgMhfLoadScenarioData(s *Session, p mhfpacket.MHFPacket) {
|
||||||
|
|||||||
@@ -38,8 +38,21 @@ func handleMsgMhfSavePartner(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
|
|
||||||
func handleMsgMhfLoadLegendDispatch(s *Session, p mhfpacket.MHFPacket) {
|
func handleMsgMhfLoadLegendDispatch(s *Session, p mhfpacket.MHFPacket) {
|
||||||
pkt := p.(*mhfpacket.MsgMhfLoadLegendDispatch)
|
pkt := p.(*mhfpacket.MsgMhfLoadLegendDispatch)
|
||||||
data := []byte{0x03, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x01, 0x8d, 0x40, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x02, 0xde, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x04, 0x30, 0x40}
|
bf := byteframe.NewByteFrame()
|
||||||
doAckBufSucceed(s, pkt.AckHandle, data)
|
legendDispatch := []struct {
|
||||||
|
Unk uint32
|
||||||
|
Timestamp uint32
|
||||||
|
}{
|
||||||
|
{0, uint32(Time_Current_Midnight().Add(-12 * time.Hour).Unix())},
|
||||||
|
{0, uint32(Time_Current_Midnight().Add(12 * time.Hour).Unix())},
|
||||||
|
{0, uint32(Time_Current_Midnight().Add(36 * time.Hour).Unix())},
|
||||||
|
}
|
||||||
|
bf.WriteUint8(uint8(len(legendDispatch)))
|
||||||
|
for _, dispatch := range legendDispatch {
|
||||||
|
bf.WriteUint32(dispatch.Unk)
|
||||||
|
bf.WriteUint32(dispatch.Timestamp)
|
||||||
|
}
|
||||||
|
doAckBufSucceed(s, pkt.AckHandle, bf.Data())
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleMsgMhfLoadHunterNavi(s *Session, p mhfpacket.MHFPacket) {
|
func handleMsgMhfLoadHunterNavi(s *Session, p mhfpacket.MHFPacket) {
|
||||||
|
|||||||
Reference in New Issue
Block a user