mirror of
https://github.com/CPunch/gopenfusion.git
synced 2026-02-09 04:00:04 +00:00
removed util
- WaitWithTimeout && SelectWithTimeout have been moved to internal/testutil - GetTime has been moved to cnet/protocol
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"github.com/CPunch/gopenfusion/cnet/protocol"
|
||||
"github.com/CPunch/gopenfusion/internal/redis"
|
||||
"github.com/CPunch/gopenfusion/shard/entity"
|
||||
"github.com/CPunch/gopenfusion/util"
|
||||
)
|
||||
|
||||
func (server *ShardServer) attachPlayer(peer *cnet.Peer, meta redis.LoginMetadata) (*entity.Player, error) {
|
||||
@@ -51,7 +50,7 @@ func (server *ShardServer) RequestEnter(peer *cnet.Peer, pkt protocol.Packet) er
|
||||
resp := &protocol.SP_FE2CL_REP_PC_ENTER_SUCC{
|
||||
IID: int32(plr.PlayerID),
|
||||
PCLoadData2CL: plr.ToPCLoadData2CL(),
|
||||
UiSvrTime: util.GetTime(),
|
||||
UiSvrTime: protocol.GetTime(),
|
||||
}
|
||||
|
||||
// setup peer
|
||||
|
||||
@@ -6,7 +6,6 @@ import (
|
||||
"github.com/CPunch/gopenfusion/cnet"
|
||||
"github.com/CPunch/gopenfusion/cnet/protocol"
|
||||
"github.com/CPunch/gopenfusion/shard/entity"
|
||||
"github.com/CPunch/gopenfusion/util"
|
||||
)
|
||||
|
||||
func (server *ShardServer) updatePlayerPosition(plr *entity.Player, X, Y, Z, Angle int) {
|
||||
@@ -41,7 +40,7 @@ func (server *ShardServer) playerMove(peer *cnet.Peer, pkt protocol.Packet) erro
|
||||
CKeyValue: move.CKeyValue,
|
||||
ISpeed: move.ISpeed,
|
||||
IID: int32(plr.PlayerID),
|
||||
ISvrTime: util.GetTime(),
|
||||
ISvrTime: protocol.GetTime(),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -63,7 +62,7 @@ func (server *ShardServer) playerStop(peer *cnet.Peer, pkt protocol.Packet) erro
|
||||
IY: stop.IY,
|
||||
IZ: stop.IZ,
|
||||
IID: int32(plr.PlayerID),
|
||||
ISvrTime: util.GetTime(),
|
||||
ISvrTime: protocol.GetTime(),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -91,6 +90,6 @@ func (server *ShardServer) playerJump(peer *cnet.Peer, pkt protocol.Packet) erro
|
||||
CKeyValue: jump.CKeyValue,
|
||||
ISpeed: jump.ISpeed,
|
||||
IID: int32(plr.PlayerID),
|
||||
ISvrTime: util.GetTime(),
|
||||
ISvrTime: protocol.GetTime(),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user