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
+6 -2
View File
@@ -114,7 +114,9 @@ func (g *GameManager) DestroyVehicleEntity(player *model.Player, scene *Scene, v
// 如果玩家正在载具中
if g.IsPlayerInVehicle(player, gadgetEntity.GetGadgetVehicleEntity()) {
// 离开载具
g.ExitVehicle(player, entity, player.AvatarMap[player.TeamConfig.GetActiveAvatarId()].Guid)
dbTeam := player.GetDbTeam()
dbAvatar := player.GetDbAvatar()
g.ExitVehicle(player, entity, dbAvatar.AvatarMap[dbTeam.GetActiveAvatarId()].Guid)
}
// 删除已创建的载具
scene.DestroyEntity(entity.GetId())
@@ -220,7 +222,9 @@ func (g *GameManager) VehicleInteractReq(player *model.Player, payloadMsg pb.Mes
return
}
avatarGuid := player.AvatarMap[player.TeamConfig.GetActiveAvatarId()].Guid
dbTeam := player.GetDbTeam()
dbAvatar := player.GetDbAvatar()
avatarGuid := dbAvatar.AvatarMap[dbTeam.GetActiveAvatarId()].Guid
switch req.InteractType {
case proto.VehicleInteractType_VEHICLE_INTERACT_IN: