重构网关服务器

This commit is contained in:
flswld
2022-12-19 01:35:15 +08:00
parent d337799fd8
commit f773ba8df7
19 changed files with 686 additions and 1241 deletions

View File

@@ -2,8 +2,6 @@ package game
import (
pb "google.golang.org/protobuf/proto"
"hk4e/gate/entity/gm"
"hk4e/gate/kcp"
"hk4e/gs/dao"
"hk4e/gs/model"
"hk4e/pkg/alg"
@@ -156,18 +154,3 @@ func (g *GameManager) ReconnectPlayer(userId uint32) {
func (g *GameManager) DisconnectPlayer(userId uint32) {
g.SendMsg(cmd.ServerDisconnectClientNotify, userId, 0, new(proto.ServerDisconnectClientNotify))
}
// KickPlayer 踢出玩家
func (g *GameManager) KickPlayer(userId uint32) {
info := new(gm.KickPlayerInfo)
info.UserId = userId
// 客户端提示信息为服务器断开连接
info.Reason = uint32(kcp.EnetServerKick)
var result bool
ok := false
//ok := r.hk4eGatewayConsumer.CallFunction("RpcManager", "KickPlayer", &info, &result)
if ok == true && result == true {
return
}
return
}