diff --git a/config.json b/config.json index 1e8e2ebce..bd7f46828 100644 --- a/config.json +++ b/config.json @@ -26,6 +26,7 @@ "MezFesAlt": false, "DisableTokenCheck": false, "QuestDebugTools": false, + "EarthStatusOverride": 0, "SaveDumps": { "Enabled": true, "OutputDir": "savedata" diff --git a/config/config.go b/config/config.go index 18ff33ccb..0dde81c10 100644 --- a/config/config.go +++ b/config/config.go @@ -51,6 +51,7 @@ type DevModeOptions struct { MezFesAlt bool // Swaps out Volpakkun for Tokotoko DisableTokenCheck bool // Disables checking login token exists in the DB (security risk!) QuestDebugTools bool // Enable various quest debug logs + EarthStatusOverride int32 SaveDumps SaveDumpOptions } diff --git a/server/channelserver/handlers.go b/server/channelserver/handlers.go index dc285d9aa..95b2ddde3 100644 --- a/server/channelserver/handlers.go +++ b/server/channelserver/handlers.go @@ -1608,18 +1608,16 @@ func handleMsgMhfKickExportForce(s *Session, p mhfpacket.MHFPacket) {} func handleMsgMhfGetEarthStatus(s *Session, p mhfpacket.MHFPacket) { pkt := p.(*mhfpacket.MsgMhfGetEarthStatus) - - // TODO(Andoryuuta): Track down format for this data, - // it can somehow be parsed as 8*uint32 chunks if the header is right. - /* - BEFORE ack-refactor: - resp := byteframe.NewByteFrame() - resp.WriteUint32(0) - resp.WriteUint32(0) - - s.QueueAck(pkt.AckHandle, resp.Data()) - */ - doAckBufSucceed(s, pkt.AckHandle, []byte{}) + bf := byteframe.NewByteFrame() + bf.WriteUint32(uint32(TimeWeekStart().Unix())) // Start + bf.WriteUint32(uint32(TimeWeekNext().Unix())) // End + bf.WriteInt32(s.server.erupeConfig.DevModeOptions.EarthStatusOverride) + bf.WriteInt32(21) + bf.WriteInt32(0) + bf.WriteInt32(0) + bf.WriteInt32(0) + bf.WriteInt32(0) + doAckBufSucceed(s, pkt.AckHandle, bf.Data()) } func handleMsgMhfRegistSpabiTime(s *Session, p mhfpacket.MHFPacket) {}