瀏覽代碼

玩家登录接口增加玩法列表

johnclot69 1 月之前
父節點
當前提交
91d7c5fbed
共有 1 個文件被更改,包括 24 次插入2 次删除
  1. 24 2
      DotNet/Hotfix/Scenes/Game/Handler/C2G_LoginGameHandler.cs

+ 24 - 2
DotNet/Hotfix/Scenes/Game/Handler/C2G_LoginGameHandler.cs

@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Generic;
 
 namespace ET.Server
 {
@@ -64,9 +65,30 @@ namespace ET.Server
 			// 添加session组件,用于绑定角色
 			session.AddComponent<SessionPlayerComponent>().PlayerId = player.Id;
 			session.AddComponent<MailBoxComponent, MailboxType>(MailboxType.GameSession);
-
-			response.Player = ProtoHelper.PlayerToProto(player);
+			
 			response.RoomId = player.RoomId;
+			response.Player = ProtoHelper.PlayerToProto(player);
+			
+			// 玩法列表
+			response.GameplayList = new List<int>();
+			
+			switch (channel)
+			{
+				case 10000:
+					// 10000:测试渠道 全渠道
+					response.GameplayList.Add((int)RoomType.HGHH);
+					response.GameplayList.Add((int)RoomType.EzhouMahjong);
+					break;
+				case 10001:
+					// 10001:黄冈
+					response.GameplayList.Add((int)RoomType.HGHH);
+					break;
+				case 10002:
+					// 10002:鄂州
+					response.GameplayList.Add((int)RoomType.EzhouMahjong);
+					break;
+			}
+			
 			reply();
 			await ETTask.CompletedTask;
 		}