feat 修改model名称
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/discover"
|
|
||||||
"common/log"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/discover"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
|
"git.hlsq.asia/mmorpg/service-scene/config"
|
||||||
"github.com/judwhite/go-svc"
|
"github.com/judwhite/go-svc"
|
||||||
"scene/config"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Program struct {
|
type Program struct {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/log"
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
"common/utils"
|
"git.hlsq.asia/mmorpg/service-common/utils"
|
||||||
|
"git.hlsq.asia/mmorpg/service-scene/config"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"scene/config"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// ModuleBase 基础模块,或者一些零散的模块
|
// ModuleBase 基础模块,或者一些零散的模块
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/db"
|
"git.hlsq.asia/mmorpg/service-common/db"
|
||||||
"scene/config"
|
"git.hlsq.asia/mmorpg/service-scene/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ModuleDB 数据库模块
|
// ModuleDB 数据库模块
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/net/grpc/service"
|
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
||||||
"scene/config"
|
"git.hlsq.asia/mmorpg/service-scene/config"
|
||||||
"scene/internal/grpc_server/server"
|
"git.hlsq.asia/mmorpg/service-scene/internal/grpc_server/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ModuleGrpcServer Grpc服务模块
|
// ModuleGrpcServer Grpc服务模块
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import "common/config"
|
import "git.hlsq.asia/mmorpg/service-common/config"
|
||||||
|
|
||||||
const path = "./config"
|
const path = "./config"
|
||||||
|
|
||||||
|
|||||||
4
go.mod
4
go.mod
@@ -3,7 +3,7 @@ module git.hlsq.asia/mmorpg/service-scene
|
|||||||
go 1.23.1
|
go 1.23.1
|
||||||
|
|
||||||
require (
|
require (
|
||||||
common v0.0.0-00010101000000-000000000000
|
git.hlsq.asia/mmorpg/service-common v0.0.0-20260107061047-e02e56781e78
|
||||||
github.com/judwhite/go-svc v1.2.1
|
github.com/judwhite/go-svc v1.2.1
|
||||||
go.uber.org/zap v1.27.0
|
go.uber.org/zap v1.27.0
|
||||||
google.golang.org/grpc v1.71.1
|
google.golang.org/grpc v1.71.1
|
||||||
@@ -82,5 +82,3 @@ require (
|
|||||||
gorm.io/driver/mysql v1.6.0 // indirect
|
gorm.io/driver/mysql v1.6.0 // indirect
|
||||||
gorm.io/gorm v1.31.1 // indirect
|
gorm.io/gorm v1.31.1 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
replace common => ../common
|
|
||||||
|
|||||||
2
go.sum
2
go.sum
@@ -1,5 +1,7 @@
|
|||||||
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
||||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||||
|
git.hlsq.asia/mmorpg/service-common v0.0.0-20260107061047-e02e56781e78 h1:4CP8w5jHDOdN7hym8YrtioxNDd7PS2WcZDrO6dtY344=
|
||||||
|
git.hlsq.asia/mmorpg/service-common v0.0.0-20260107061047-e02e56781e78/go.mod h1:xv6m1I2jUA6mudKVznygpnzMoshBQarthHD1QnkW4qc=
|
||||||
github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0=
|
github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0=
|
||||||
github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||||
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
|
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/log"
|
|
||||||
"common/proto/sc/sc_pb"
|
|
||||||
"common/proto/ss/grpc_pb"
|
|
||||||
"context"
|
"context"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/proto/sc/sc_pb"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/proto/ss/grpc_pb"
|
||||||
|
instance2 "git.hlsq.asia/mmorpg/service-scene/internal/instance"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
instance2 "scene/internal/instance"
|
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/discover/common"
|
"git.hlsq.asia/mmorpg/service-common/discover/common"
|
||||||
"common/net/grpc/service"
|
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
||||||
"common/proto/ss/grpc_pb"
|
"git.hlsq.asia/mmorpg/service-common/proto/ss/grpc_pb"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package stream_client
|
package stream_client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/log"
|
|
||||||
"common/net/grpc/service"
|
|
||||||
"context"
|
"context"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/net/grpc/service"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
package instance
|
package instance
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/discover"
|
|
||||||
"common/log"
|
|
||||||
"common/proto/sc/sc_pb"
|
|
||||||
"common/proto/ss/grpc_pb"
|
|
||||||
"common/utils"
|
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/discover"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/log"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/proto/sc/sc_pb"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/proto/ss/grpc_pb"
|
||||||
|
"git.hlsq.asia/mmorpg/service-common/utils"
|
||||||
|
"git.hlsq.asia/mmorpg/service-scene/internal/grpc_server/stream_client"
|
||||||
|
"git.hlsq.asia/mmorpg/service-scene/internal/npc"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
"scene/internal/grpc_server/stream_client"
|
|
||||||
"scene/internal/npc"
|
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package npc
|
package npc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/proto/ss/grpc_pb"
|
"git.hlsq.asia/mmorpg/service-common/proto/ss/grpc_pb"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NPCNode 定义NPC节点
|
// NPCNode 定义NPC节点
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package npc
|
package npc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"common/proto/sc/sc_pb"
|
"git.hlsq.asia/mmorpg/service-common/proto/sc/sc_pb"
|
||||||
"common/proto/ss/grpc_pb"
|
"git.hlsq.asia/mmorpg/service-common/proto/ss/grpc_pb"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PlayerNode 定义玩家节点结构体
|
// PlayerNode 定义玩家节点结构体
|
||||||
|
|||||||
Reference in New Issue
Block a user