mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-15 08:25:09 +01:00
Quest Clear Timer
Special thanks to Hiroaki for this.
This commit is contained in:
@@ -2,6 +2,7 @@ package channelserver
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/Andoryuuta/byteframe"
|
"github.com/Andoryuuta/byteframe"
|
||||||
@@ -49,6 +50,17 @@ func sendServerChatMessage(s *Session, message string) {
|
|||||||
func handleMsgSysCastBinary(s *Session, p mhfpacket.MHFPacket) {
|
func handleMsgSysCastBinary(s *Session, p mhfpacket.MHFPacket) {
|
||||||
pkt := p.(*mhfpacket.MsgSysCastBinary)
|
pkt := p.(*mhfpacket.MsgSysCastBinary)
|
||||||
|
|
||||||
|
if pkt.BroadcastType == 0x03 && pkt.MessageType == 0x03 && len(pkt.RawDataPayload) == 0x10 {
|
||||||
|
tmp := byteframe.NewByteFrameFromBytes(pkt.RawDataPayload)
|
||||||
|
|
||||||
|
if tmp.ReadUint16() == 0x0002 && tmp.ReadUint8() == 0x18 {
|
||||||
|
_ = tmp.ReadBytes(9)
|
||||||
|
tmp.SetLE()
|
||||||
|
frame := tmp.ReadUint32()
|
||||||
|
sendServerChatMessage(s, fmt.Sprintf("TIME : %d'%d.%03d (%dframe)", frame/30/60, frame/30%60, int(math.Round(float64(frame%30*100)/3)), frame))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Parse out the real casted binary payload
|
// Parse out the real casted binary payload
|
||||||
var realPayload []byte
|
var realPayload []byte
|
||||||
var msgBinTargeted *binpacket.MsgBinTargeted
|
var msgBinTargeted *binpacket.MsgBinTargeted
|
||||||
|
|||||||
Reference in New Issue
Block a user