修改
This commit is contained in:
@@ -154,11 +154,17 @@ func Recv(c gnet.Conn, data TomeeHeader) {
|
|||||||
if nameField.IsValid() && nameField.CanSet() {
|
if nameField.IsValid() && nameField.CanSet() {
|
||||||
nameField.Set(reflect.ValueOf(data))
|
nameField.Set(reflect.ValueOf(data))
|
||||||
}
|
}
|
||||||
|
clientdata := c.Context().(*ClientData)
|
||||||
if cmdlister.Type().In(1) == reflect.TypeOf(&Player{}) {
|
if cmdlister.Type().In(1) == reflect.TypeOf(&Player{}) {
|
||||||
t := GetPlayer(c, data.UserID)
|
//t := GetPlayer(c, data.UserID)
|
||||||
|
|
||||||
|
if clientdata.Player == nil {
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
// fmt.Println(data.CMD, "接收 变量的地址 ", &t.Info, t.Info.UserID)
|
// fmt.Println(data.CMD, "接收 变量的地址 ", &t.Info, t.Info.UserID)
|
||||||
|
|
||||||
params = append(params, ptrValue1, reflect.ValueOf(t))
|
params = append(params, ptrValue1, reflect.ValueOf(clientdata.Player))
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
params = append(params, ptrValue1, reflect.ValueOf(c))
|
params = append(params, ptrValue1, reflect.ValueOf(c))
|
||||||
@@ -177,6 +183,9 @@ func Recv(c gnet.Conn, data TomeeHeader) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
t := GetPlayer(c, data.UserID)
|
t := GetPlayer(c, data.UserID)
|
||||||
|
if t == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
if ok && aa != 0 { //这里实现回复错误包
|
if ok && aa != 0 { //这里实现回复错误包
|
||||||
|
|
||||||
cool.Loger.Error(context.Background(), aa.Code())
|
cool.Loger.Error(context.Background(), aa.Code())
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ server:
|
|||||||
address: ":8080" #前台服务器地址
|
address: ":8080" #前台服务器地址
|
||||||
port: 53388 #后台服务器端口
|
port: 53388 #后台服务器端口
|
||||||
rpc: 56409 #rpc服务端口
|
rpc: 56409 #rpc服务端口
|
||||||
game: [55407,50876,52482]
|
game: [27777]
|
||||||
openapiPath: "/api.json"
|
openapiPath: "/api.json"
|
||||||
swaggerPath: "/swagger"
|
swaggerPath: "/swagger"
|
||||||
clientMaxBodySize:
|
clientMaxBodySize:
|
||||||
|
|||||||
Reference in New Issue
Block a user