From 93b107362ce464d3b55309a1d62af18cee3466c7 Mon Sep 17 00:00:00 2001 From: stratic-dev Date: Wed, 31 Jul 2024 14:23:32 +0100 Subject: [PATCH] Rename of variables and wip info --- network/mhfpacket/msg_mhf_post_tower_info.go | 6 ++++-- network/mhfpacket/msg_sys_terminal_log.go | 4 ++-- server/channelserver/handlers.go | 10 ++++++++-- server/channelserver/handlers_tower.go | 3 ++- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/network/mhfpacket/msg_mhf_post_tower_info.go b/network/mhfpacket/msg_mhf_post_tower_info.go index 73c94b9de..cc3dd6342 100644 --- a/network/mhfpacket/msg_mhf_post_tower_info.go +++ b/network/mhfpacket/msg_mhf_post_tower_info.go @@ -20,7 +20,8 @@ type MsgMhfPostTowerInfo struct { Unk6 int32 Unk7 int32 Block1 int32 - TimeTaken int64 + TimeTaken int32 + CID int32 } // Opcode returns the ID associated with this packet type. @@ -40,7 +41,8 @@ func (m *MsgMhfPostTowerInfo) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Clie m.Unk6 = bf.ReadInt32() m.Unk7 = bf.ReadInt32() m.Block1 = bf.ReadInt32() - m.TimeTaken = bf.ReadInt64() + m.TimeTaken = bf.ReadInt32() + m.CID = bf.ReadInt32() return nil } diff --git a/network/mhfpacket/msg_sys_terminal_log.go b/network/mhfpacket/msg_sys_terminal_log.go index bad160a73..8644ec2c8 100644 --- a/network/mhfpacket/msg_sys_terminal_log.go +++ b/network/mhfpacket/msg_sys_terminal_log.go @@ -17,7 +17,7 @@ type TerminalLogEntry struct { Unk0 int16 Unk1 int32 Unk2 int32 - Unk3 int32 + CID int32 Unk4 []int32 } @@ -48,7 +48,7 @@ func (m *MsgSysTerminalLog) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Client e.Unk0 = bf.ReadInt16() e.Unk1 = bf.ReadInt32() e.Unk2 = bf.ReadInt32() - e.Unk3 = bf.ReadInt32() + e.CID = bf.ReadInt32() if _config.ErupeConfig.RealClientMode >= _config.G1 { for j := 0; j < 4; j++ { e.Unk4 = append(e.Unk4, bf.ReadInt32()) diff --git a/server/channelserver/handlers.go b/server/channelserver/handlers.go index 2a6ea31bc..3e193f198 100644 --- a/server/channelserver/handlers.go +++ b/server/channelserver/handlers.go @@ -110,14 +110,20 @@ func handleMsgSysAck(s *Session, p mhfpacket.MHFPacket) {} func handleMsgSysTerminalLog(s *Session, p mhfpacket.MHFPacket) { pkt := p.(*mhfpacket.MsgSysTerminalLog) + //Type 1: 1 Type 2: 8 Quest? Unk2 Quest ID + //Type 1: 71 Type 2: 8 Quest Tower? Unk2 Quest ID + //Type 1: 79 Type 2: 99 Caravan Points (Pallone?) + //Type 1: 10 Type 2: 5 Zenny?? (Gained via Selling Items at Quest End and Quest End Reward) + //Type 1: 91 Type 2: 100 Unk0 Amount Unk2 // Tower Reward at Gal? + for i := range pkt.Entries { s.server.logger.Info("SysTerminalLog", zap.Uint8("Type1", pkt.Entries[i].Type1), zap.Uint8("Type2", pkt.Entries[i].Type2), zap.Int16("Unk0", pkt.Entries[i].Unk0), zap.Int32("Unk1", pkt.Entries[i].Unk1), - zap.Int32("Unk2", pkt.Entries[i].Unk2), - zap.Int32("Unk3", pkt.Entries[i].Unk3), + zap.Int32("Unk 2 Sometimes Quest QuestID", pkt.Entries[i].Unk2), + zap.Int32("CID", pkt.Entries[i].CID), zap.Int32s("Unk4", pkt.Entries[i].Unk4), ) } diff --git a/server/channelserver/handlers_tower.go b/server/channelserver/handlers_tower.go index 8e37d4a1d..efe6cc8d9 100644 --- a/server/channelserver/handlers_tower.go +++ b/server/channelserver/handlers_tower.go @@ -157,7 +157,8 @@ func handleMsgMhfPostTowerInfo(s *Session, p mhfpacket.MHFPacket) { zap.Int32("Unk6", pkt.Unk6), zap.Int32("Unk7", pkt.Unk7), zap.Int32("Block1", pkt.Block1), - zap.Int64("TimeTaken", pkt.TimeTaken), + zap.Int32("TimeTaken", pkt.TimeTaken), + zap.Int32("CID", pkt.CID), ) }