1.修改保证logintoken 之后 一直持有Session 2. 添加chatUnit 和 添加 聊天 邮件 地图 服务器登录 列表 添加上线成功之后 自动转发 路由 自动转发 必须要 session 添加上 RouteComponent
This commit is contained in:
parent
f380af99fa
commit
3e9e2bd8af
@ -16,7 +16,7 @@ namespace GameLogic
|
||||
public class GameNetSystem : BaseSystem<GameNetSystem>
|
||||
{
|
||||
public Scene m_gameScene;
|
||||
private Session m_gameSession;
|
||||
public Session m_gameSession;
|
||||
private Action m_onConnectComplete;
|
||||
private Action m_onConnectFail;
|
||||
private Action m_onConnectDisconnect;
|
||||
@ -53,6 +53,22 @@ namespace GameLogic
|
||||
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
base.OnUpdate();
|
||||
if (Input.GetKeyDown(KeyCode.W))
|
||||
{
|
||||
Test().Forget();
|
||||
}
|
||||
}
|
||||
|
||||
public async UniTask Test()
|
||||
{
|
||||
var response = await m_gameSession.Call(new C2Chat_TestRequest()
|
||||
{
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
#region 指令
|
||||
|
||||
@ -75,7 +91,10 @@ namespace GameLogic
|
||||
public async UniTask<(uint error,object[] data)> SendRequestMultipleDataCommand(string serverAddress,ECommandType cmdKey,params object[] data)
|
||||
{
|
||||
Debug.Log("Send "+cmdKey +"指令");
|
||||
m_gameSession = HandlerGameSession(serverAddress, cmdKey);
|
||||
if (cmdKey != ECommandType.GetGameAccountInfo && cmdKey != ECommandType.UpdateGameName)
|
||||
{
|
||||
m_gameSession = HandlerGameSession(serverAddress, cmdKey);
|
||||
}
|
||||
if (m_netcommands.TryGetValue(cmdKey,out var cmd ))
|
||||
{
|
||||
var result = await cmd.ExecuteRequestMultipleDataCommand(m_gameSession, data);
|
||||
@ -86,7 +105,12 @@ namespace GameLogic
|
||||
public async UniTask<uint> SendCommand(string serverAddress,ECommandType cmdKey,params object[] data)
|
||||
{
|
||||
Debug.Log("Send "+cmdKey +"指令");
|
||||
m_gameSession = HandlerGameSession(serverAddress, cmdKey);
|
||||
|
||||
if (cmdKey != ECommandType.GetGameAccountInfo || cmdKey != ECommandType.UpdateGameName)
|
||||
{
|
||||
m_gameSession = HandlerGameSession(serverAddress, cmdKey);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (m_gameSession.IsDisposed) return GameErrorCode.Failed;
|
||||
|
@ -288,6 +288,43 @@ namespace Fantasy
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2Chat_TestRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
public static C2Chat_TestRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Chat_TestRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Chat_TestRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Chat2C_TestResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Chat_TestRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.ChatRoute;
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class Chat2C_TestResponse : AMessage, ICustomRouteResponse, IProto
|
||||
{
|
||||
public static Chat2C_TestResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Chat2C_TestResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Chat2C_TestResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Chat2C_TestResponse; }
|
||||
[ProtoMember(1)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2G_TestMessage : AMessage, IMessage, IProto
|
||||
{
|
||||
public static C2G_TestMessage Create(Scene scene)
|
||||
|
@ -14,6 +14,8 @@ namespace Fantasy
|
||||
public const uint G2C_OpenGameNameInputWindowsMessage = 134227730;
|
||||
public const uint C2G_UpdateAndSaveGameNameRequest = 268445461;
|
||||
public const uint G2C_UpdateAndSaveGameNameResponse = 402663189;
|
||||
public const uint C2Chat_TestRequest = 2281711377;
|
||||
public const uint Chat2C_TestResponse = 2415929105;
|
||||
public const uint C2G_TestMessage = 134227731;
|
||||
public const uint C2G_TestRequest = 268445462;
|
||||
public const uint G2C_TestResponse = 402663190;
|
||||
@ -27,8 +29,8 @@ namespace Fantasy
|
||||
public const uint C2G_CreateChatRouteRequest = 268445464;
|
||||
public const uint G2C_CreateChatRouteResponse = 402663192;
|
||||
public const uint C2Chat_TestMessage = 2147493649;
|
||||
public const uint C2Chat_TestMessageRequest = 2281711377;
|
||||
public const uint Chat2C_TestMessageResponse = 2415929105;
|
||||
public const uint C2Chat_TestMessageRequest = 2281711378;
|
||||
public const uint Chat2C_TestMessageResponse = 2415929106;
|
||||
public const uint C2M_MoveToMapRequest = 1476405010;
|
||||
public const uint M2C_MoveToMapResponse = 1610622738;
|
||||
public const uint C2G_SendAddressableToMap = 134227734;
|
||||
|
@ -0,0 +1,63 @@
|
||||
2025-04-02 13:41:56.4350 (OnCreateScene_InitEvent.cs:16) 初始化鉴权服务器组件
|
||||
2025-04-02 13:41:56.8252 (OnCreateScene_InitEvent.cs:16) 初始化鉴权服务器组件
|
||||
2025-04-02 13:41:57.2455 (OnCreateScene_InitEvent.cs:21) 初始网关(Gate)服务器组件
|
||||
2025-04-02 13:41:57.6834 (OnCreateScene_InitEvent.cs:21) 初始网关(Gate)服务器组件
|
||||
2025-04-02 13:42:30.5078 (AuthenticationComponentSystem.cs:130) Authentication: Login Success(登录成功),username:wangwei,password:123,source:客户端,Position:1001
|
||||
2025-04-02 13:42:31.1287 (C2G_LoginRequestHandler.cs:31) Gate校验登录成功用户116299279127281665
|
||||
2025-04-02 13:42:31.1570 (GameAccountManageComponentSystem.cs:91) Gate 当前缓存中的 SessionID 2589079498074882048
|
||||
2025-04-02 13:42:31.1570 (C2G_LoginRequestHandler.cs:43) Gate : Login 登录成功GameAccount:session2589079498074882048 AccountId:116299279127281665
|
||||
2025-04-02 13:42:31.3458 (G2C_GetGameAccountInfoHandler.cs:37) Gate: 获取账号信息 AccountId SnowShow
|
||||
2025-04-02 13:42:36.5175 (AuthenticationComponentSystem.cs:150) Authentication:Login:username:wangwei 用户移除成功 从缓存中
|
||||
2025-04-02 13:42:41.2345 (GameAccountSystem.cs:29) Gate gameAccount 下线前 保存数据到 数据库中
|
||||
2025-04-02 13:42:41.3432 (GameAccountSystem.cs:29) Gate gameAccount 下线前 保存数据到 数据库中
|
||||
2025-04-02 13:42:41.3432 (EntityTimeOutComponentSystem.cs:52) session : 0 Dispose
|
||||
2025-04-02 13:50:13.4173 (AuthenticationComponentSystem.cs:130) Authentication: Login Success(登录成功),username:wangwei,password:123,source:客户端,Position:1001
|
||||
2025-04-02 13:50:13.5916 (C2G_LoginRequestHandler.cs:31) Gate校验登录成功用户116299279127281665
|
||||
2025-04-02 13:50:13.6060 (GameAccountManageComponentSystem.cs:91) Gate 当前缓存中的 SessionID 2590097645842202624
|
||||
2025-04-02 13:50:13.6060 (C2G_LoginRequestHandler.cs:43) Gate : Login 登录成功GameAccount:session2590097645842202624 AccountId:116299279127281665
|
||||
2025-04-02 13:50:13.7916 (G2C_GetGameAccountInfoHandler.cs:37) Gate: 获取账号信息 AccountId SnowShow
|
||||
2025-04-02 13:50:19.4316 (AuthenticationComponentSystem.cs:150) Authentication:Login:username:wangwei 用户移除成功 从缓存中
|
||||
2025-04-02 13:50:23.6553 (GameAccountSystem.cs:29) Gate gameAccount 下线前 保存数据到 数据库中
|
||||
2025-04-02 13:50:23.6709 (GameAccountSystem.cs:29) Gate gameAccount 下线前 保存数据到 数据库中
|
||||
2025-04-02 13:50:23.6709 (EntityTimeOutComponentSystem.cs:52) session : 0 Dispose
|
||||
2025-04-02 13:50:55.3332 (AuthenticationComponentSystem.cs:130) Authentication: Login Success(登录成功),username:wangwei,password:123,source:客户端,Position:1001
|
||||
2025-04-02 13:50:55.4900 (C2G_LoginRequestHandler.cs:31) Gate校验登录成功用户116299279127281665
|
||||
2025-04-02 13:50:55.5046 (GameAccountManageComponentSystem.cs:91) Gate 当前缓存中的 SessionID 2590190004818935808
|
||||
2025-04-02 13:50:55.5046 (C2G_LoginRequestHandler.cs:43) Gate : Login 登录成功GameAccount:session2590190004818935808 AccountId:116299279127281665
|
||||
2025-04-02 13:50:55.6789 (G2C_GetGameAccountInfoHandler.cs:37) Gate: 获取账号信息 AccountId SnowShow
|
||||
2025-04-02 13:51:01.3336 (AuthenticationComponentSystem.cs:150) Authentication:Login:username:wangwei 用户移除成功 从缓存中
|
||||
2025-04-02 13:51:05.5539 (GameAccountSystem.cs:29) Gate gameAccount 下线前 保存数据到 数据库中
|
||||
2025-04-02 13:51:05.5693 (GameAccountSystem.cs:29) Gate gameAccount 下线前 保存数据到 数据库中
|
||||
2025-04-02 13:51:05.5693 (EntityTimeOutComponentSystem.cs:52) session : 0 Dispose
|
||||
2025-04-02 13:54:09.9398 (OnCreateScene_InitEvent.cs:16) 初始化鉴权服务器组件
|
||||
2025-04-02 13:54:10.3365 (OnCreateScene_InitEvent.cs:16) 初始化鉴权服务器组件
|
||||
2025-04-02 13:54:10.7633 (OnCreateScene_InitEvent.cs:21) 初始网关(Gate)服务器组件
|
||||
2025-04-02 13:54:11.1712 (OnCreateScene_InitEvent.cs:21) 初始网关(Gate)服务器组件
|
||||
2025-04-02 13:54:47.4816 (AuthenticationComponentSystem.cs:130) Authentication: Login Success(登录成功),username:wangwei,password:123,source:客户端,Position:1001
|
||||
2025-04-02 13:54:47.7243 (C2G_LoginRequestHandler.cs:31) Gate校验登录成功用户116299279127281665
|
||||
2025-04-02 13:54:47.7519 (GameAccountManageComponentSystem.cs:91) Gate 当前缓存中的 SessionID 2589086095144648704
|
||||
2025-04-02 13:54:47.7519 (C2G_LoginRequestHandler.cs:43) Gate : Login 登录成功GameAccount:session2589086095144648704 AccountId:116299279127281665
|
||||
2025-04-02 13:54:47.9107 (G2C_GetGameAccountInfoHandler.cs:37) Gate: 获取账号信息 AccountId SnowShow
|
||||
2025-04-02 13:54:53.4840 (AuthenticationComponentSystem.cs:150) Authentication:Login:username:wangwei 用户移除成功 从缓存中
|
||||
2025-04-02 13:54:57.7908 (GameAccountSystem.cs:29) Gate gameAccount 下线前 保存数据到 数据库中
|
||||
2025-04-02 13:54:57.8632 (GameAccountSystem.cs:29) Gate gameAccount 下线前 保存数据到 数据库中
|
||||
2025-04-02 13:54:57.8632 (EntityTimeOutComponentSystem.cs:52) session : 0 Dispose
|
||||
2025-04-02 13:56:38.1665 (OnCreateScene_InitEvent.cs:16) 初始化鉴权服务器组件
|
||||
2025-04-02 13:56:38.7117 (OnCreateScene_InitEvent.cs:16) 初始化鉴权服务器组件
|
||||
2025-04-02 13:56:39.1181 (OnCreateScene_InitEvent.cs:21) 初始网关(Gate)服务器组件
|
||||
2025-04-02 13:56:39.5632 (OnCreateScene_InitEvent.cs:21) 初始网关(Gate)服务器组件
|
||||
2025-04-02 13:56:52.6269 (AuthenticationComponentSystem.cs:130) Authentication: Login Success(登录成功),username:wangwei,password:123,source:客户端,Position:1001
|
||||
2025-04-02 13:56:52.8846 (C2G_LoginRequestHandler.cs:31) Gate校验登录成功用户116299279127281665
|
||||
2025-04-02 13:56:52.9093 (GameAccountManageComponentSystem.cs:91) Gate 当前缓存中的 SessionID 2589035517609771008
|
||||
2025-04-02 13:56:52.9093 (C2G_LoginRequestHandler.cs:43) Gate : Login 登录成功GameAccount:session2589035517609771008 AccountId:116299279127281665
|
||||
2025-04-02 13:56:53.0992 (G2C_GetGameAccountInfoHandler.cs:37) Gate: 获取账号信息 AccountId SnowShow
|
||||
2025-04-02 13:56:58.6411 (AuthenticationComponentSystem.cs:150) Authentication:Login:username:wangwei 用户移除成功 从缓存中
|
||||
2025-04-02 13:59:44.0458 (AuthenticationComponentSystem.cs:130) Authentication: Login Success(登录成功),username:wangwei,password:123,source:客户端,Position:1001
|
||||
2025-04-02 13:59:44.2333 (C2G_LoginRequestHandler.cs:31) Gate校验登录成功用户116299279127281665
|
||||
2025-04-02 13:59:44.2333 (GameAccountManageComponentSystem.cs:68) Gate account already exists(账号已存在缓存中)
|
||||
2025-04-02 13:59:44.2333 (GameAccountManageComponentSystem.cs:74) Gate 检测当前帐号和当前Session 不是同一个,2589035517609771008,$2589413749609725952
|
||||
2025-04-02 13:59:44.2333 (GameAccountManageComponentSystem.cs:91) Gate 当前缓存中的 SessionID 2589413749609725952
|
||||
2025-04-02 13:59:44.2333 (C2G_LoginRequestHandler.cs:43) Gate : Login 登录成功GameAccount:session2589413749609725952 AccountId:116299279127281665
|
||||
2025-04-02 13:59:44.2805 (GameAccountManageComponentSystem.cs:120) Gate 已经存在了销毁组件
|
||||
2025-04-02 13:59:44.4205 (G2C_GetGameAccountInfoHandler.cs:37) Gate: 获取账号信息 AccountId SnowShow
|
||||
2025-04-02 13:59:50.0590 (AuthenticationComponentSystem.cs:150) Authentication:Login:username:wangwei 用户移除成功 从缓存中
|
@ -0,0 +1,20 @@
|
||||
2025-04-02 13:42:32.9004 System.Exception: OuterMessageScheduler CustomRouteType session does not have an routeComponent component
|
||||
at Fantasy.Scheduler.OuterMessageScheduler.Scheduler(Session session, APackInfo packInfo)
|
||||
at Fantasy.Async.FTask.InnerCoroutine()
|
||||
at Fantasy.Async.FTask.InnerCoroutine()
|
||||
at Fantasy.Network.Session.Receive(APackInfo packInfo)
|
||||
2025-04-02 13:50:18.9664 System.Exception: OuterMessageScheduler CustomRouteType session does not have an routeComponent component
|
||||
at Fantasy.Scheduler.OuterMessageScheduler.Scheduler(Session session, APackInfo packInfo)
|
||||
at Fantasy.Async.FTask.InnerCoroutine()
|
||||
at Fantasy.Async.FTask.InnerCoroutine()
|
||||
at Fantasy.Network.Session.Receive(APackInfo packInfo)
|
||||
2025-04-02 13:55:01.7187 System.Exception: OuterMessageScheduler CustomRouteType session does not have an routeComponent component
|
||||
at Fantasy.Scheduler.OuterMessageScheduler.Scheduler(Session session, APackInfo packInfo)
|
||||
at Fantasy.Async.FTask.InnerCoroutine()
|
||||
at Fantasy.Async.FTask.InnerCoroutine()
|
||||
at Fantasy.Network.Session.Receive(APackInfo packInfo)
|
||||
2025-04-02 13:57:01.6086 System.Exception: OuterMessageScheduler CustomRouteType session does not have an routeComponent component
|
||||
at Fantasy.Scheduler.OuterMessageScheduler.Scheduler(Session session, APackInfo packInfo)
|
||||
at Fantasy.Async.FTask.InnerCoroutine()
|
||||
at Fantasy.Async.FTask.InnerCoroutine()
|
||||
at Fantasy.Network.Session.Receive(APackInfo packInfo)
|
@ -0,0 +1,48 @@
|
||||
2025-04-02 13:41:55.3716 初始化序列化器成功,数量为:2
|
||||
2025-04-02 13:41:56.0961 SceneConfigId = 1001 networkTarget = Inner TCPServer Listen 127.0.0.1:11001
|
||||
2025-04-02 13:41:56.3272 SceneConfigId = 1001 networkTarget = Outer KCPServer Listen 127.0.0.1:21001
|
||||
2025-04-02 13:41:56.4350 (AuthenticationJWTComponentSystem.cs:44) RSA密钥导入成功
|
||||
2025-04-02 13:41:56.5922 SceneConfigId = 1002 networkTarget = Inner TCPServer Listen 127.0.0.1:11002
|
||||
2025-04-02 13:41:56.8252 SceneConfigId = 1002 networkTarget = Outer KCPServer Listen 127.0.0.1:21002
|
||||
2025-04-02 13:41:56.8252 (AuthenticationJWTComponentSystem.cs:44) RSA密钥导入成功
|
||||
2025-04-02 13:41:57.0500 SceneConfigId = 1010 networkTarget = Inner TCPServer Listen 127.0.0.1:11010
|
||||
2025-04-02 13:41:57.2455 SceneConfigId = 1010 networkTarget = Outer KCPServer Listen 127.0.0.1:21010
|
||||
2025-04-02 13:41:57.4742 SceneConfigId = 1011 networkTarget = Inner TCPServer Listen 127.0.0.1:11011
|
||||
2025-04-02 13:41:57.6834 SceneConfigId = 1011 networkTarget = Outer KCPServer Listen 127.0.0.1:21011
|
||||
2025-04-02 13:41:57.9084 SceneConfigId = 1026 networkTarget = Inner TCPServer Listen 127.0.0.1:11026
|
||||
2025-04-02 13:41:58.1278 SceneConfigId = 1026 networkTarget = Outer TCPServer Listen 127.0.0.1:21016
|
||||
2025-04-02 13:41:58.1278 Process:1 Startup Complete SceneCount:5
|
||||
2025-04-02 13:42:31.1749 (G2Chat_LoginRequestHandler.cs:16) 登录聊天服务器成功 SnowShow AccountId 116299279127281665 GateRoutedId 2589079498074882048
|
||||
2025-04-02 13:50:13.6216 (G2Chat_LoginRequestHandler.cs:16) 登录聊天服务器成功 SnowShow AccountId 116299279127281665 GateRoutedId 2590097645842202624
|
||||
2025-04-02 13:50:55.5211 (G2Chat_LoginRequestHandler.cs:16) 登录聊天服务器成功 SnowShow AccountId 116299279127281665 GateRoutedId 2590190004818935808
|
||||
2025-04-02 13:54:09.0954 初始化序列化器成功,数量为:2
|
||||
2025-04-02 13:54:09.7432 SceneConfigId = 1001 networkTarget = Inner TCPServer Listen 127.0.0.1:11001
|
||||
2025-04-02 13:54:09.9266 SceneConfigId = 1001 networkTarget = Outer KCPServer Listen 127.0.0.1:21001
|
||||
2025-04-02 13:54:09.9398 (AuthenticationJWTComponentSystem.cs:44) RSA密钥导入成功
|
||||
2025-04-02 13:54:10.1454 SceneConfigId = 1002 networkTarget = Inner TCPServer Listen 127.0.0.1:11002
|
||||
2025-04-02 13:54:10.3365 SceneConfigId = 1002 networkTarget = Outer KCPServer Listen 127.0.0.1:21002
|
||||
2025-04-02 13:54:10.3365 (AuthenticationJWTComponentSystem.cs:44) RSA密钥导入成功
|
||||
2025-04-02 13:54:10.5651 SceneConfigId = 1010 networkTarget = Inner TCPServer Listen 127.0.0.1:11010
|
||||
2025-04-02 13:54:10.7633 SceneConfigId = 1010 networkTarget = Outer KCPServer Listen 127.0.0.1:21010
|
||||
2025-04-02 13:54:10.9782 SceneConfigId = 1011 networkTarget = Inner TCPServer Listen 127.0.0.1:11011
|
||||
2025-04-02 13:54:11.1712 SceneConfigId = 1011 networkTarget = Outer KCPServer Listen 127.0.0.1:21011
|
||||
2025-04-02 13:54:11.4010 SceneConfigId = 1026 networkTarget = Inner TCPServer Listen 127.0.0.1:11026
|
||||
2025-04-02 13:54:11.6146 SceneConfigId = 1026 networkTarget = Outer TCPServer Listen 127.0.0.1:21016
|
||||
2025-04-02 13:54:11.6146 Process:1 Startup Complete SceneCount:5
|
||||
2025-04-02 13:54:47.7636 (G2Chat_LoginRequestHandler.cs:17) 登录聊天服务器成功 SnowShow AccountId 116299279127281665 GateRoutedId 2589086095144648704
|
||||
2025-04-02 13:56:37.0646 初始化序列化器成功,数量为:2
|
||||
2025-04-02 13:56:37.8792 SceneConfigId = 1001 networkTarget = Inner TCPServer Listen 127.0.0.1:11001
|
||||
2025-04-02 13:56:38.1452 SceneConfigId = 1001 networkTarget = Outer KCPServer Listen 127.0.0.1:21001
|
||||
2025-04-02 13:56:38.1665 (AuthenticationJWTComponentSystem.cs:44) RSA密钥导入成功
|
||||
2025-04-02 13:56:38.4628 SceneConfigId = 1002 networkTarget = Inner TCPServer Listen 127.0.0.1:11002
|
||||
2025-04-02 13:56:38.7117 SceneConfigId = 1002 networkTarget = Outer KCPServer Listen 127.0.0.1:21002
|
||||
2025-04-02 13:56:38.7117 (AuthenticationJWTComponentSystem.cs:44) RSA密钥导入成功
|
||||
2025-04-02 13:56:38.9304 SceneConfigId = 1010 networkTarget = Inner TCPServer Listen 127.0.0.1:11010
|
||||
2025-04-02 13:56:39.1181 SceneConfigId = 1010 networkTarget = Outer KCPServer Listen 127.0.0.1:21010
|
||||
2025-04-02 13:56:39.3678 SceneConfigId = 1011 networkTarget = Inner TCPServer Listen 127.0.0.1:11011
|
||||
2025-04-02 13:56:39.5632 SceneConfigId = 1011 networkTarget = Outer KCPServer Listen 127.0.0.1:21011
|
||||
2025-04-02 13:56:39.7691 SceneConfigId = 1026 networkTarget = Inner TCPServer Listen 127.0.0.1:11026
|
||||
2025-04-02 13:56:39.9746 SceneConfigId = 1026 networkTarget = Outer TCPServer Listen 127.0.0.1:21016
|
||||
2025-04-02 13:56:39.9746 Process:1 Startup Complete SceneCount:5
|
||||
2025-04-02 13:56:52.9277 (G2Chat_LoginRequestHandler.cs:17) 登录聊天服务器成功 SnowShow AccountId 116299279127281665 GateRoutedId 2589035517609771008
|
||||
2025-04-02 13:59:44.2479 (G2Chat_LoginRequestHandler.cs:17) 登录聊天服务器成功 SnowShow AccountId 116299279127281665 GateRoutedId 2589413749609725952
|
@ -0,0 +1,6 @@
|
||||
2025-04-02 13:42:31.1287 (GateJWTComponentSystem.cs:47) Gate:Token签名校验成功
|
||||
2025-04-02 13:50:13.5916 (GateJWTComponentSystem.cs:47) Gate:Token签名校验成功
|
||||
2025-04-02 13:50:55.4900 (GateJWTComponentSystem.cs:47) Gate:Token签名校验成功
|
||||
2025-04-02 13:54:47.7243 (GateJWTComponentSystem.cs:47) Gate:Token签名校验成功
|
||||
2025-04-02 13:56:52.8846 (GateJWTComponentSystem.cs:47) Gate:Token签名校验成功
|
||||
2025-04-02 13:59:44.2333 (GateJWTComponentSystem.cs:47) Gate:Token签名校验成功
|
@ -0,0 +1,28 @@
|
||||
2025-04-02 14:01:52.9745 (GameAccountSystem.cs:29) Gate gameAccount 下线前 保存数据到 数据库中
|
||||
2025-04-02 14:01:53.0686 (GameAccountSystem.cs:29) Gate gameAccount 下线前 保存数据到 数据库中
|
||||
2025-04-02 14:01:53.0701 (EntityTimeOutComponentSystem.cs:52) session : 0 Dispose
|
||||
2025-04-02 14:02:25.3077 (AuthenticationComponentSystem.cs:130) Authentication: Login Success(登录成功),username:wangwei,password:123,source:客户端,Position:1001
|
||||
2025-04-02 14:02:25.4630 (C2G_LoginRequestHandler.cs:31) Gate校验登录成功用户116299279127281665
|
||||
2025-04-02 14:02:25.4630 (GameAccountManageComponentSystem.cs:91) Gate 当前缓存中的 SessionID 2589767792353869824
|
||||
2025-04-02 14:02:25.4630 (C2G_LoginRequestHandler.cs:43) Gate : Login 登录成功GameAccount:session2589767792353869824 AccountId:116299279127281665
|
||||
2025-04-02 14:02:25.6276 (G2C_GetGameAccountInfoHandler.cs:37) Gate: 获取账号信息 AccountId SnowShow
|
||||
2025-04-02 14:02:31.3079 (AuthenticationComponentSystem.cs:150) Authentication:Login:username:wangwei 用户移除成功 从缓存中
|
||||
2025-04-02 14:03:53.3827 (AuthenticationComponentSystem.cs:130) Authentication: Login Success(登录成功),username:wangwei,password:123,source:客户端,Position:1001
|
||||
2025-04-02 14:03:53.5517 (C2G_LoginRequestHandler.cs:31) Gate校验登录成功用户116299279127281665
|
||||
2025-04-02 14:03:53.5517 (GameAccountManageComponentSystem.cs:68) Gate account already exists(账号已存在缓存中)
|
||||
2025-04-02 14:03:53.5517 (GameAccountManageComponentSystem.cs:74) Gate 检测当前帐号和当前Session 不是同一个,2589767792353869824,$2589961306400358400
|
||||
2025-04-02 14:03:53.5517 (GameAccountManageComponentSystem.cs:91) Gate 当前缓存中的 SessionID 2589961306400358400
|
||||
2025-04-02 14:03:53.5517 (C2G_LoginRequestHandler.cs:43) Gate : Login 登录成功GameAccount:session2589961306400358400 AccountId:116299279127281665
|
||||
2025-04-02 14:03:53.5986 (G2C_GetGameAccountInfoHandler.cs:37) Gate: 获取账号信息 AccountId SnowShow
|
||||
2025-04-02 14:03:59.3836 (AuthenticationComponentSystem.cs:150) Authentication:Login:username:wangwei 用户移除成功 从缓存中
|
||||
2025-04-02 14:04:01.1342 (GameAccountManageComponentSystem.cs:120) Gate 已经存在了销毁组件
|
||||
2025-04-02 14:06:54.2586 (OnCreateScene_InitEvent.cs:16) 初始化鉴权服务器组件
|
||||
2025-04-02 14:06:54.6631 (OnCreateScene_InitEvent.cs:16) 初始化鉴权服务器组件
|
||||
2025-04-02 14:06:55.0707 (OnCreateScene_InitEvent.cs:21) 初始网关(Gate)服务器组件
|
||||
2025-04-02 14:06:55.4956 (OnCreateScene_InitEvent.cs:21) 初始网关(Gate)服务器组件
|
||||
2025-04-02 14:07:04.2879 (AuthenticationComponentSystem.cs:130) Authentication: Login Success(登录成功),username:wangwei,password:123,source:客户端,Position:1001
|
||||
2025-04-02 14:07:04.5229 (C2G_LoginRequestHandler.cs:31) Gate校验登录成功用户116299279127281665
|
||||
2025-04-02 14:07:04.5478 (GameAccountManageComponentSystem.cs:91) Gate 当前缓存中的 SessionID 2589026721516748800
|
||||
2025-04-02 14:07:04.5478 (C2G_LoginRequestHandler.cs:43) Gate : Login 登录成功GameAccount:session2589026721516748800 AccountId:116299279127281665
|
||||
2025-04-02 14:07:04.5848 (G2C_GetGameAccountInfoHandler.cs:37) Gate: 获取账号信息 AccountId SnowShow
|
||||
2025-04-02 14:07:10.2889 (AuthenticationComponentSystem.cs:150) Authentication:Login:username:wangwei 用户移除成功 从缓存中
|
@ -0,0 +1,24 @@
|
||||
2025-04-02 14:02:35.9291 System.Exception: OuterMessageScheduler CustomRouteType session does not have an routeComponent component
|
||||
at Fantasy.Scheduler.OuterMessageScheduler.Scheduler(Session session, APackInfo packInfo)
|
||||
at Fantasy.Async.FTask.InnerCoroutine()
|
||||
at Fantasy.Async.FTask.InnerCoroutine()
|
||||
at Fantasy.Network.Session.Receive(APackInfo packInfo)
|
||||
2025-04-02 14:04:01.1342 CallInnerRoute routeId == 0
|
||||
at Fantasy.Scheduler.NetworkMessagingComponent.CallInnerRoute(Int64 routeId, Type requestType, APackInfo packInfo)
|
||||
at Fantasy.Scheduler.NetworkMessagingComponent.CallInnerRoute(Int64 routeId, Type requestType, APackInfo packInfo)
|
||||
at Fantasy.Scheduler.OuterMessageScheduler.Scheduler(Session session, APackInfo packInfo)
|
||||
at Fantasy.Network.Session.Receive(APackInfo packInfo)
|
||||
at Fantasy.Network.KCP.KCPServerNetworkChannel.Input(ReadOnlyMemory`1 buffer)
|
||||
at Fantasy.Network.KCP.KCPServerNetwork.ReadPipeDataAsync()
|
||||
at System.IO.Pipelines.Pipe.ExecuteWithoutExecutionContext(Object state)
|
||||
at Fantasy.ThreadSynchronizationContext.Update()
|
||||
at Fantasy.MultiThreadScheduler.Loop(Scene scene, CancellationToken cancellationToken)
|
||||
at Fantasy.MultiThreadScheduler.<>c__DisplayClass5_0.<Add>b__0()
|
||||
|
||||
2025-04-02 14:04:01.1342 System.NullReferenceException: Object reference not set to an instance of an object.
|
||||
at System.Object.GetType()
|
||||
at Fantasy.Network.Session.Send(IMessage message, UInt32 rpcId, Int64 routeId)
|
||||
at Fantasy.Scheduler.OuterMessageScheduler.Scheduler(Session session, APackInfo packInfo)
|
||||
at Fantasy.Async.FTask.InnerCoroutine()
|
||||
at Fantasy.Async.FTask.InnerCoroutine()
|
||||
at Fantasy.Network.Session.Receive(APackInfo packInfo)
|
@ -0,0 +1,18 @@
|
||||
2025-04-02 14:02:25.4630 (G2Chat_LoginRequestHandler.cs:17) 登录聊天服务器成功 SnowShow AccountId 116299279127281665 GateRoutedId 2589767792353869824
|
||||
2025-04-02 14:03:53.5517 (G2Chat_LoginRequestHandler.cs:17) 登录聊天服务器成功 SnowShow AccountId 116299279127281665 GateRoutedId 2589961306400358400
|
||||
2025-04-02 14:06:53.3342 初始化序列化器成功,数量为:2
|
||||
2025-04-02 14:06:54.0008 SceneConfigId = 1001 networkTarget = Inner TCPServer Listen 127.0.0.1:11001
|
||||
2025-04-02 14:06:54.2429 SceneConfigId = 1001 networkTarget = Outer KCPServer Listen 127.0.0.1:21001
|
||||
2025-04-02 14:06:54.2586 (AuthenticationJWTComponentSystem.cs:44) RSA密钥导入成功
|
||||
2025-04-02 14:06:54.4624 SceneConfigId = 1002 networkTarget = Inner TCPServer Listen 127.0.0.1:11002
|
||||
2025-04-02 14:06:54.6609 SceneConfigId = 1002 networkTarget = Outer KCPServer Listen 127.0.0.1:21002
|
||||
2025-04-02 14:06:54.6609 (AuthenticationJWTComponentSystem.cs:44) RSA密钥导入成功
|
||||
2025-04-02 14:06:54.8813 SceneConfigId = 1010 networkTarget = Inner TCPServer Listen 127.0.0.1:11010
|
||||
2025-04-02 14:06:55.0685 SceneConfigId = 1010 networkTarget = Outer KCPServer Listen 127.0.0.1:21010
|
||||
2025-04-02 14:06:55.2964 SceneConfigId = 1011 networkTarget = Inner TCPServer Listen 127.0.0.1:11011
|
||||
2025-04-02 14:06:55.4956 SceneConfigId = 1011 networkTarget = Outer KCPServer Listen 127.0.0.1:21011
|
||||
2025-04-02 14:06:55.7100 SceneConfigId = 1026 networkTarget = Inner TCPServer Listen 127.0.0.1:11026
|
||||
2025-04-02 14:06:55.9173 SceneConfigId = 1026 networkTarget = Outer TCPServer Listen 127.0.0.1:21016
|
||||
2025-04-02 14:06:55.9173 Process:1 Startup Complete SceneCount:5
|
||||
2025-04-02 14:07:04.5595 (G2Chat_LoginRequestHandler.cs:19) 登录聊天服务器成功 SnowShow AccountId 116299279127281665 GateRoutedId 2589026721516748800
|
||||
2025-04-02 14:07:07.6648 (C2Chat_TestRequestHandler.cs:11) chatUnitSnowShow AccountId:116299279127281665
|
@ -0,0 +1,5 @@
|
||||
2025-04-02 14:01:49.4619 session timeout id:135445814507208705 timeNow:1743573709461 _session.LastReceiveTime:1743573699090 _timeOut:8000
|
||||
2025-04-02 14:02:25.4630 (GateJWTComponentSystem.cs:47) Gate:Token签名校验成功
|
||||
2025-04-02 14:03:53.5517 (GateJWTComponentSystem.cs:47) Gate:Token签名校验成功
|
||||
2025-04-02 14:07:04.5229 (GateJWTComponentSystem.cs:47) Gate:Token签名校验成功
|
||||
2025-04-02 14:07:29.4938 session timeout id:135453373649649664 timeNow:1743574049493 _session.LastReceiveTime:1743574038406 _timeOut:8000
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -10,7 +10,7 @@ message G2Chat_LoginRequest // IRouteRequest,Chat2G_LoginResponse
|
||||
}
|
||||
message Chat2G_LoginResponse // IRouteResponse
|
||||
{
|
||||
|
||||
int64 ChatUnitRunId = 1 ;
|
||||
}
|
||||
|
||||
message G2A_TestMessage // IRouteMessage
|
||||
|
@ -85,6 +85,21 @@ message G2C_UpdateAndSaveGameNameResponse //IResponse
|
||||
string Tag = 1;
|
||||
}
|
||||
|
||||
//chat
|
||||
message C2Chat_TestRequest // ICustomRouteRequest,Chat2C_TestResponse,ChatRoute
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
message Chat2C_TestResponse // ICustomRouteResponse
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
message C2G_TestMessage // IMessage
|
||||
{
|
||||
|
Binary file not shown.
Binary file not shown.
@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("APlugins")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+123743062ec7a73335ce05081e88b792f969fa1f")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f380af99fa15e1e6045b8a02edffb583f97f5687")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("APlugins")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("APlugins")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
0acf9da56919fb7f0408d5fd7e5cc66f37bc88e68b28b79387f3b33441c5552c
|
||||
663dff072fc30ff85d5379c5036bccd2b2b51c8d3c02d4ba306b5a8634571881
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
17434065930027683
|
||||
17435554619246633
|
@ -1 +1 @@
|
||||
17434103678303258
|
||||
17435661846531578
|
@ -53,12 +53,15 @@ namespace Fantasy
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
ChatUnitRunId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Chat2G_LoginResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return InnerOpcode.Chat2G_LoginResponse; }
|
||||
[ProtoMember(1)]
|
||||
public long ChatUnitRunId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
|
@ -297,6 +297,43 @@ namespace Fantasy
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2Chat_TestRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
public static C2Chat_TestRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Chat_TestRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Chat_TestRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Chat2C_TestResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Chat_TestRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.ChatRoute;
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class Chat2C_TestResponse : AMessage, ICustomRouteResponse, IProto
|
||||
{
|
||||
public static Chat2C_TestResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Chat2C_TestResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Chat2C_TestResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Chat2C_TestResponse; }
|
||||
[ProtoMember(1)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2G_TestMessage : AMessage, IMessage, IProto
|
||||
{
|
||||
public static C2G_TestMessage Create(Scene scene)
|
||||
|
@ -14,6 +14,8 @@ namespace Fantasy
|
||||
public const uint G2C_OpenGameNameInputWindowsMessage = 134227730;
|
||||
public const uint C2G_UpdateAndSaveGameNameRequest = 268445461;
|
||||
public const uint G2C_UpdateAndSaveGameNameResponse = 402663189;
|
||||
public const uint C2Chat_TestRequest = 2281711377;
|
||||
public const uint Chat2C_TestResponse = 2415929105;
|
||||
public const uint C2G_TestMessage = 134227731;
|
||||
public const uint C2G_TestRequest = 268445462;
|
||||
public const uint G2C_TestResponse = 402663190;
|
||||
@ -27,8 +29,8 @@ namespace Fantasy
|
||||
public const uint C2G_CreateChatRouteRequest = 268445464;
|
||||
public const uint G2C_CreateChatRouteResponse = 402663192;
|
||||
public const uint C2Chat_TestMessage = 2147493649;
|
||||
public const uint C2Chat_TestMessageRequest = 2281711377;
|
||||
public const uint Chat2C_TestMessageResponse = 2415929105;
|
||||
public const uint C2Chat_TestMessageRequest = 2281711378;
|
||||
public const uint Chat2C_TestMessageResponse = 2415929106;
|
||||
public const uint C2M_MoveToMapRequest = 1476405010;
|
||||
public const uint M2C_MoveToMapResponse = 1610622738;
|
||||
public const uint C2G_SendAddressableToMap = 134227734;
|
||||
|
9
GameServer/Server/Entity/Model/Chat/ChatUnit.cs
Normal file
9
GameServer/Server/Entity/Model/Chat/ChatUnit.cs
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
using Fantasy.Entitas;
|
||||
|
||||
public class ChatUnit : Entity
|
||||
{
|
||||
public string GameName;
|
||||
public long AccountId;
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Entity")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+123743062ec7a73335ce05081e88b792f969fa1f")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f380af99fa15e1e6045b8a02edffb583f97f5687")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Entity")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Entity")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
cabb422311527ba9b0078134736f402c16c7a70d80729d2726d1499148a34375
|
||||
9eb20dcf29f796e9cd950d2d315fa986c1ad3725eb1a0b291dd618e8595a36cd
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
eb3317b96ee7bc7b14fa07c646e173a2245b2bf56a8cc88a12175f6e63b7a927
|
||||
ee0f807f67c58110e55c18fb27fbe1a6fb9fb710a19dfb6c784da9d0ba2255f8
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
17434065930042755
|
||||
17435554619453727
|
@ -1 +1 @@
|
||||
17434103678241224
|
||||
17435661846531578
|
@ -5,6 +5,7 @@
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AJwtHeader_002Ecs_002Fl_003AC_0021_003FUsers_003Fqq137_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F176642ae3c77a37f58482aa52d3c51c44363712ca45861c4661aca6a942f7b_003FJwtHeader_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AJwtSecurityToken_002Ecs_002Fl_003AC_0021_003FUsers_003Fqq137_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F3ebffcd2ab98c3abdcb6c2c350fb49783e75ae2d26c32d1ab7d87c9e84e4_003FJwtSecurityToken_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMessageRPC_00602_002Ecs_002Fl_003AC_0021_003FUsers_003Fqq137_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fcecd144a08d24f2689bc8ef970d04dae84a00_003Ff7_003F1631cece_003FMessageRPC_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARouteRPC_00603_002Ecs_002Fl_003AC_0021_003FUsers_003Fqq137_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fcecd144a08d24f2689bc8ef970d04dae84a00_003Fd8_003Fcc8b8152_003FRouteRPC_00603_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARSA_002Ecs_002Fl_003AC_0021_003FUsers_003Fqq137_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fccead27d2093152bd8da21dd18eb5e398966206a6e3a4bff4dac2221dbd3352a_003FRSA_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASceneConfigData_002Ecs_002Fl_003AC_0021_003FUsers_003Fqq137_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fcecd144a08d24f2689bc8ef970d04dae84a00_003Fb6_003F76f78bbd_003FSceneConfigData_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AScene_002Ecs_002Fl_003AC_0021_003FUsers_003Fqq137_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fcecd144a08d24f2689bc8ef970d04dae84a00_003F5b_003Fc45341b2_003FScene_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
|
@ -1,5 +1,6 @@
|
||||
using Fantasy;
|
||||
using Fantasy.Async;
|
||||
using Fantasy.Entitas;
|
||||
using Fantasy.Network.Interface;
|
||||
|
||||
namespace Hotfix;
|
||||
@ -8,6 +9,13 @@ public class G2Chat_LoginRequestHandler : RouteRPC<Scene,G2Chat_LoginRequest,Cha
|
||||
{
|
||||
protected override async FTask Run(Scene scene, G2Chat_LoginRequest request, Chat2G_LoginResponse response, Action reply)
|
||||
{
|
||||
|
||||
var chatUnit = Entity.Create<ChatUnit>(scene,request.GateRoutedId,false,false);
|
||||
chatUnit.AccountId = request.AccountId;
|
||||
chatUnit.GameName = request.GameName;
|
||||
response.ErrorCode = GameErrorCode.Success;
|
||||
|
||||
response.ChatUnitRunId = chatUnit.RuntimeId;
|
||||
Log.Info($"登录聊天服务器成功 {request.GameName} AccountId {request.AccountId } GateRoutedId { request.GateRoutedId}");
|
||||
|
||||
await FTask.CompletedTask;
|
@ -0,0 +1,15 @@
|
||||
using Fantasy;
|
||||
using Fantasy.Async;
|
||||
using Fantasy.Network.Interface;
|
||||
|
||||
namespace Hotfix;
|
||||
|
||||
public class C2Chat_TestRequestHandler : RouteRPC<ChatUnit,C2Chat_TestRequest,Chat2C_TestResponse>
|
||||
{
|
||||
protected override async FTask Run(ChatUnit chatUnit, C2Chat_TestRequest request, Chat2C_TestResponse response, Action reply)
|
||||
{
|
||||
Log.Info($"chatUnit{chatUnit.GameName} AccountId:{chatUnit.AccountId}");
|
||||
await FTask.CompletedTask;
|
||||
|
||||
}
|
||||
}
|
@ -9,7 +9,7 @@ public class GameAccountFlagComponentDestroySystem : DestroySystem<GameAccountFl
|
||||
{
|
||||
if (self.AccountId != 0)
|
||||
{
|
||||
GateComponentHelper.Disconnect(self.Scene,self.AccountId,1000* 10).Coroutine();
|
||||
GateComponentHelper.Disconnect(self.Scene,self.AccountId,1000* 60 * 5).Coroutine();
|
||||
self.AccountId = 0;
|
||||
}
|
||||
self.Account = null;
|
||||
|
@ -50,8 +50,8 @@ public class C2G_LoginRequestHandler : MessageRPC<C2G_LoginRequest, G2C_LoginRes
|
||||
session.Send(new G2C_OpenGameNameInputWindowsMessage());
|
||||
}
|
||||
|
||||
await GateLoginHelper.Login(scene, result.gameAccount, session.RuntimeId);
|
||||
|
||||
await GateLoginHelper.Online(session, result.gameAccount, session.RuntimeId);
|
||||
|
||||
await FTask.CompletedTask;
|
||||
}
|
||||
}
|
@ -1,31 +1,39 @@
|
||||
using Fantasy;
|
||||
using Fantasy.Async;
|
||||
using Fantasy.Network;
|
||||
using Fantasy.Platform.Net;
|
||||
|
||||
namespace Hotfix;
|
||||
|
||||
public static class GateLoginHelper
|
||||
{
|
||||
public static async FTask Login(Scene scene, GameAccount account,long gateRouted)
|
||||
private static List<Func<Scene, GameAccount, long, FTask<(uint error, long chatUnitId,int routeType)>>> scenes =
|
||||
new List<Func<Scene, GameAccount, long, FTask<(uint error, long chatUnitId,int routeType)>>>()
|
||||
{
|
||||
OnlineChat
|
||||
};
|
||||
|
||||
public static async FTask Online(Session session, GameAccount account,long gateRouted)
|
||||
{
|
||||
await LoginChat(scene, account, gateRouted);
|
||||
foreach (var scene in scenes)
|
||||
{
|
||||
var result = await scene(session.Scene, account, gateRouted);
|
||||
if (result.error != GameErrorCode.Success) return;
|
||||
var routeComponent = session.GetOrAddComponent<RouteComponent>();
|
||||
routeComponent.AddAddress(result.routeType,result.chatUnitId);
|
||||
}
|
||||
//await OnlineChat(session.Scene, account, gateRouted);
|
||||
}
|
||||
|
||||
public static async FTask LoginChat(Scene scene, GameAccount account,long gateRouteId)
|
||||
public static async FTask<(uint error,long chatUnitId,int routeType)> OnlineChat(Scene scene, GameAccount account,long gateRouteId)
|
||||
{
|
||||
var chat = SceneConfigData.Instance.GetSceneBySceneType(scene.World.Id, SceneType.Chat)[0];
|
||||
|
||||
|
||||
var response = (Chat2G_LoginResponse)await scene.NetworkMessagingComponent.CallInnerRoute(chat.RouteId, new G2Chat_LoginRequest()
|
||||
{
|
||||
GameName = account.GameName,
|
||||
AccountId = account.Id,
|
||||
GateRoutedId = gateRouteId,
|
||||
});
|
||||
if (response.ErrorCode != 0)
|
||||
{
|
||||
|
||||
}
|
||||
Log.Debug("聊天服务器登录成功");
|
||||
return (response.ErrorCode, response.ChatUnitRunId,RouteType.ChatRoute);
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Hotfix")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+123743062ec7a73335ce05081e88b792f969fa1f")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f380af99fa15e1e6045b8a02edffb583f97f5687")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Hotfix")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Hotfix")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
855ec2332cc9a821d7058e794d2bf24c8f786ff3b44526e4643f0b3c41cd6c0a
|
||||
436c800f2a052df15750ceb976c651e98650294588601754440113fe99f0e412
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
b75eff6d6f7403fe2e161d1724c07768bce8b1dee8e5ec2371637569785b113c
|
||||
84102f23287804c2542b10262a73a70ff16869e991ab05075dc69b3ae7613bfb
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
17434065930042755
|
||||
17435554619659440
|
@ -1 +1 @@
|
||||
17434103678303258
|
||||
17435661846531578
|
@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Main")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+123743062ec7a73335ce05081e88b792f969fa1f")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f380af99fa15e1e6045b8a02edffb583f97f5687")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Main")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Main")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
23c036461387f2a47b767e394276b907c58c43af7087d612f94374c76066f36d
|
||||
b553cdeaf3cecd1b3fb8b442f83f44abb3507f4be5db3150b6d8136e84ec9e3c
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
17434065930052854
|
||||
17435554619814614
|
@ -1 +1 @@
|
||||
17434103678276970
|
||||
17435661846531578
|
Loading…
x
Reference in New Issue
Block a user