新增逻辑

This commit is contained in:
2025-12-15 12:30:45 +08:00
parent a4c2bb021b
commit 240bee00c3
56 changed files with 649 additions and 526 deletions

View File

@@ -3,7 +3,7 @@ using Fantasy.Async;
using Fantasy.Network;
using Fantasy.Network.Interface;
using Fantasy.Platform.Net;
using NB.Map;
using NB.Game;
namespace NB.Gate;
@@ -55,7 +55,7 @@ public class C2G_EnterMapRequestHandler : MessageRPC<C2G_EnterMapRequest, G2C_En
if (serviceId == 0)
{
var mapScenes = SceneConfigData.Instance.GetSceneBySceneType(SceneType.Map);
var mapScenes = SceneConfigData.Instance.GetSceneBySceneType(SceneType.Game);
serviceId = mapScenes.First().Id;
}
@@ -71,7 +71,7 @@ public class C2G_EnterMapRequestHandler : MessageRPC<C2G_EnterMapRequest, G2C_En
if (oldServerRouteId != sceneConfig.RouteId)
{
//先退出旧的服务
var ret = await gateUnit.Offline(session.RuntimeId, RouteType.MapRoute);
var ret = await gateUnit.Offline(session.RuntimeId, RouteType.GameRoute);
if (ret != 0)
{
response.ErrorCode = ErrorCode.MapRoomIdError;
@@ -79,7 +79,7 @@ public class C2G_EnterMapRequestHandler : MessageRPC<C2G_EnterMapRequest, G2C_En
}
//再进入新的服务
ret = await gateUnit.Online(RouteType.MapRoute, sceneConfig);
ret = await gateUnit.Online(RouteType.GameRoute, sceneConfig);
if (ret != 0)
{
response.ErrorCode = ErrorCode.MapRoomIdError;

View File

@@ -3,7 +3,7 @@ using Fantasy.Async;
using Fantasy.Network;
using Fantasy.Network.Interface;
using Fantasy.Platform.Net;
using NB.Map;
using NB.Game;
namespace NB.Gate;