This commit is contained in:
2025-08-25 23:56:13 +08:00
parent 8c3be0a5bb
commit e0665aae01
15 changed files with 211 additions and 105 deletions

View File

@@ -1,6 +1,7 @@
using Fantasy;
using Fantasy.Async;
using Fantasy.Network;
using Fantasy.Platform.Net;
using NB.Chat;
using NB.Game;
@@ -67,6 +68,11 @@ public static class GateLoginHelper
routeComponent.AddAddress(RouteType.SocialRoute, chatRouteId);
gateUnit.ChatSceneRouteId = sceneRouteId;
Log.Info($"连接聊天服成功gameRouteId:{gameRouteId}");
var gameSceneConfigs = SceneConfigData.Instance.GetSceneBySceneType(SceneType.Map);
var mapSceneConfig = gameSceneConfigs.First();
routeComponent.AddAddress(RouteType.MapRoute, mapSceneConfig.RouteId);
return ErrorCode.Successful;
}

View File

@@ -13,6 +13,8 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Map\Helper\" />
<Folder Include="Map\System\" />
<Folder Include="Social\Chat\" />
<Folder Include="Social\Club\" />
<Folder Include="Social\Mail\Handler\Inner\" />

View File

@@ -0,0 +1,15 @@
using Fantasy;
using Fantasy.Async;
using Fantasy.Network.Interface;
namespace NB.Map;
public class C2Map_CreateRoomRequestHandler : RouteRPC<Scene, C2Map_CreateRoomRequest, Map2C_CreateRoomResponse>
{
protected override async FTask Run(Scene entity, C2Map_CreateRoomRequest request, Map2C_CreateRoomResponse response,
Action reply)
{
Log.Info($"创建房间=== map:{request.MapId} pass:{request.Password}");
await FTask.CompletedTask;
}
}

View File

@@ -47,6 +47,11 @@ public class OnSceneCreate_Init : AsyncEventSystem<OnCreateScene>
scene.AddComponent<MailManageComponent>();
break;
}
case SceneType.Map:
{
Log.Info("创建地图场景===");
break;
}
}
await FTask.CompletedTask;