1.MongoDB、Redis兼容集群模式

2.离线数据接口化访问
This commit is contained in:
flswld
2023-02-26 23:03:13 +08:00
parent 01cb17d4a9
commit 0395dc0bc2
60 changed files with 1298 additions and 464 deletions
+4 -3
View File
@@ -108,10 +108,11 @@ func NewGameManager(dao *dao.Dao, messageQueue *mq.MessageQueue, gsId uint32, gs
}
robot := r.CreateRobot(uid, random.GetRandomStr(8), random.GetRandomStr(10))
r.AddUserAvatar(uid, avatarId)
dbAvatar := robot.GetDbAvatar()
r.SetUpAvatarTeamReq(robot, &proto.SetUpAvatarTeamReq{
TeamId: 1,
AvatarTeamGuidList: []uint64{robot.AvatarMap[avatarId].Guid},
CurAvatarGuid: robot.AvatarMap[avatarId].Guid,
AvatarTeamGuidList: []uint64{dbAvatar.AvatarMap[avatarId].Guid},
CurAvatarGuid: dbAvatar.AvatarMap[avatarId].Guid,
})
robot.Pos.X -= random.GetRandomFloat64(25.0, 35.0)
robot.Pos.Y += 1.0
@@ -160,7 +161,7 @@ func (g *GameManager) run() {
}
func (g *GameManager) gameMainLoopD() {
for times := 1; times <= 100000; times++ {
for times := 1; times <= 10000; times++ {
logger.Warn("start game main loop, times: %v", times)
g.gameMainLoop()
logger.Warn("game main loop stop")