feat 网关鉴权

This commit is contained in:
2025-12-22 18:04:36 +08:00
parent 69cc960fe5
commit 670140e7d3
68 changed files with 1424 additions and 492 deletions

View File

@@ -6,7 +6,7 @@ import (
// NPCNode 定义NPC节点
type NPCNode struct {
UID int // 用户ID
USN int64 // 用户ID
GatewaySID int64 // 网关服务ID
Position [2]float64 // 二维坐标 [x, y]
@@ -14,9 +14,9 @@ type NPCNode struct {
Action []*grpc_pb.ActionReq // 其他操作
}
func NewNPCNode(gatewaySID int64, uid int) *NPCNode {
func NewNPCNode(gatewaySID int64, usn int64) *NPCNode {
return &NPCNode{
UID: uid,
USN: usn,
GatewaySID: gatewaySID,
Position: [2]float64{0, 0},
MoveCross: 0,

View File

@@ -7,7 +7,7 @@ import (
// PlayerNode 定义玩家节点结构体
type PlayerNode struct {
UID int32 // 用户ID
USN int64 // 用户ID
GatewaySID int64 // 网关服务ID
MoveSpeed float32 // 移动速度
@@ -17,9 +17,9 @@ type PlayerNode struct {
Action []*grpc_pb.ActionReq // 其他操作
}
func NewPlayerNode(gatewaySID int64, uid int32) *PlayerNode {
func NewPlayerNode(gatewaySID int64, usn int64) *PlayerNode {
return &PlayerNode{
UID: uid,
USN: usn,
GatewaySID: gatewaySID,
MoveSpeed: 5 * 0.00001,
Position: [2]float32{0, 0},