mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 07:55:33 +01:00
add quest coordinate print option
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
"MezFesAlt": false,
|
||||
"DisableMailItems": true,
|
||||
"DisableTokenCheck": false,
|
||||
"PrintQuestCoordinates": false,
|
||||
"SaveDumps": {
|
||||
"Enabled": true,
|
||||
"OutputDir": "savedata"
|
||||
|
||||
@@ -44,6 +44,7 @@ type DevModeOptions struct {
|
||||
MezFesAlt bool // Swaps out Volpakkun for Tokotoko
|
||||
DisableTokenCheck bool // Disables checking login token exists in the DB (security risk!)
|
||||
DisableMailItems bool // Hack to prevent english versions of MHF from crashing
|
||||
PrintQuestCoordinates bool // Prints quest coordinates to console
|
||||
SaveDumps SaveDumpOptions
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ import (
|
||||
const (
|
||||
BinaryMessageTypeState = 0
|
||||
BinaryMessageTypeChat = 1
|
||||
BinaryMessageTypeQuest = 2
|
||||
BinaryMessageTypeData = 3
|
||||
BinaryMessageTypeMailNotify = 4
|
||||
BinaryMessageTypeEmote = 6
|
||||
@@ -89,6 +90,17 @@ func handleMsgSysCastBinary(s *Session, p mhfpacket.MHFPacket) {
|
||||
}
|
||||
}
|
||||
|
||||
if s.server.erupeConfig.DevModeOptions.PrintQuestCoordinates == true && s.server.erupeConfig.DevMode {
|
||||
if pkt.BroadcastType == 0x03 && pkt.MessageType == 0x02 && len(pkt.RawDataPayload) > 32 {
|
||||
tmp.ReadBytes(20)
|
||||
tmp.SetLE()
|
||||
x := tmp.ReadFloat32()
|
||||
y := tmp.ReadFloat32()
|
||||
z := tmp.ReadFloat32()
|
||||
s.logger.Debug("Coord", zap.Float32s("XYZ", []float32{x, y, z}))
|
||||
}
|
||||
}
|
||||
|
||||
// Parse out the real casted binary payload
|
||||
var msgBinTargeted *binpacket.MsgBinTargeted
|
||||
var authorLen, msgLen uint16
|
||||
|
||||
Reference in New Issue
Block a user