mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 07:55:33 +01:00
timestamp fixes
This commit is contained in:
@@ -1,14 +1,12 @@
|
|||||||
package channelserver
|
package channelserver
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"io"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"erupe-ce/common/byteframe"
|
"erupe-ce/common/byteframe"
|
||||||
"erupe-ce/common/stringsupport"
|
"erupe-ce/common/stringsupport"
|
||||||
"erupe-ce/network/mhfpacket"
|
"erupe-ce/network/mhfpacket"
|
||||||
|
"fmt"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
"io"
|
||||||
)
|
)
|
||||||
|
|
||||||
func handleMsgMhfPostGuildScout(s *Session, p mhfpacket.MHFPacket) {
|
func handleMsgMhfPostGuildScout(s *Session, p mhfpacket.MHFPacket) {
|
||||||
@@ -247,7 +245,7 @@ func handleMsgMhfGetGuildScoutList(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
bf.WriteUint32(charID)
|
bf.WriteUint32(charID)
|
||||||
bf.WriteUint32(actorID)
|
bf.WriteUint32(actorID)
|
||||||
bf.WriteUint32(charID)
|
bf.WriteUint32(charID)
|
||||||
bf.WriteUint32(uint32(time.Now().Unix()))
|
bf.WriteUint32(uint32(TimeAdjusted().Unix()))
|
||||||
bf.WriteUint16(0x00) // HR?
|
bf.WriteUint16(0x00) // HR?
|
||||||
bf.WriteUint16(0x00) // GR?
|
bf.WriteUint16(0x00) // GR?
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ package channelserver
|
|||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"erupe-ce/common/byteframe"
|
"erupe-ce/common/byteframe"
|
||||||
"erupe-ce/network/mhfpacket"
|
"erupe-ce/network/mhfpacket"
|
||||||
)
|
)
|
||||||
@@ -49,7 +47,6 @@ type Stage struct {
|
|||||||
host *Session
|
host *Session
|
||||||
maxPlayers uint16
|
maxPlayers uint16
|
||||||
password string
|
password string
|
||||||
createdAt string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewStage creates a new stage with intialized values.
|
// NewStage creates a new stage with intialized values.
|
||||||
@@ -62,7 +59,6 @@ func NewStage(ID string) *Stage {
|
|||||||
objectIndex: 0,
|
objectIndex: 0,
|
||||||
rawBinaryData: make(map[stageBinaryKey][]byte),
|
rawBinaryData: make(map[stageBinaryKey][]byte),
|
||||||
maxPlayers: 4,
|
maxPlayers: 4,
|
||||||
createdAt: time.Now().Format("01-02-2006 15:04:05"),
|
|
||||||
}
|
}
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func makeSignInFailureResp(respID RespID) []byte {
|
func makeSignInFailureResp(respID RespID) []byte {
|
||||||
@@ -39,10 +38,10 @@ func (s *Session) makeSignInResp(uid int) []byte {
|
|||||||
bf.WriteUint8(0)
|
bf.WriteUint8(0)
|
||||||
}
|
}
|
||||||
bf.WriteUint8(1) // entrance server count
|
bf.WriteUint8(1) // entrance server count
|
||||||
bf.WriteUint8(uint8(len(chars))) // character count
|
bf.WriteUint8(uint8(len(chars)))
|
||||||
bf.WriteUint32(0xFFFFFFFF) // login_token_number
|
bf.WriteUint32(0xFFFFFFFF) // login_token_number
|
||||||
bf.WriteBytes([]byte(sessToken)) // login_token
|
bf.WriteBytes([]byte(sessToken))
|
||||||
bf.WriteUint32(uint32(time.Now().Unix())) // current time
|
bf.WriteUint32(uint32(channelserver.TimeAdjusted().Unix()))
|
||||||
if s.server.erupeConfig.DevMode {
|
if s.server.erupeConfig.DevMode {
|
||||||
if s.server.erupeConfig.PatchServerManifest != "" && s.server.erupeConfig.PatchServerFile != "" {
|
if s.server.erupeConfig.PatchServerManifest != "" && s.server.erupeConfig.PatchServerFile != "" {
|
||||||
ps.Uint8(bf, s.server.erupeConfig.PatchServerManifest, false)
|
ps.Uint8(bf, s.server.erupeConfig.PatchServerManifest, false)
|
||||||
|
|||||||
Reference in New Issue
Block a user