Quellcode durchsuchen

1.优化加入房间,准备;2.增加摸牌逻辑;3.协议字段调整

johnclot69 vor 1 Jahr
Ursprung
Commit
4aee755191
28 geänderte Dateien mit 747 neuen und 173 gelöschten Zeilen
  1. 9 8
      Config/Proto/CommonProto_CS_10001.proto
  2. 1 8
      Config/Proto/OuterMessage_C_30001.proto
  3. 5 7
      DotNet/Core/Core/Helper/RandomGenerator.cs
  4. 16 0
      DotNet/Hotfix/Helper/CardHelper.cs
  5. 384 0
      DotNet/Hotfix/Helper/HGHuangHuangHelper.cs
  6. 39 9
      DotNet/Hotfix/Helper/ProtoHelper.cs
  7. 1 1
      DotNet/Hotfix/Module/Http/HttpComponentSystem.cs
  8. 2 2
      DotNet/Hotfix/Scenes/Game/GameRoomComponentSystem.cs
  9. 2 2
      DotNet/Hotfix/Scenes/Game/Handler/C2G_CreatRoomHandler.cs
  10. 4 12
      DotNet/Hotfix/Scenes/Game/Handler/C2G_JoinRoomHandler.cs
  11. 1 1
      DotNet/Hotfix/Scenes/Game/Handler/C2G_KickHandler.cs
  12. 1 1
      DotNet/Hotfix/Scenes/Game/Handler/C2G_LoginGameHandler.cs
  13. 2 2
      DotNet/Hotfix/Scenes/Game/Handler/C2G_ReadyHandler.cs
  14. 10 3
      DotNet/Hotfix/Scenes/Game/Player/PlayerSystem.cs
  15. 110 21
      DotNet/Hotfix/Scenes/Game/Room/HGHuangHuangComponentSystem.cs
  16. 6 5
      DotNet/Hotfix/Scenes/Game/Room/RoomSystem.cs
  17. 11 8
      DotNet/Model/Generate/Message/CommonProto_CS_10001.cs
  18. 3 24
      DotNet/Model/Generate/Message/OuterMessage_C_30001.cs
  19. 1 1
      DotNet/Model/Scenes/Game/GameRoomComponent.cs
  20. 59 0
      DotNet/Model/Scenes/Game/HGHuangHuangConst.cs
  21. 11 3
      DotNet/Model/Scenes/Game/Player/Player.cs
  22. 12 2
      DotNet/Model/Scenes/Game/Room/HGHuangHuangComponent.cs
  23. 2 2
      DotNet/Model/Scenes/Game/Room/Room.cs
  24. 44 0
      DotNet/Model/Scenes/Game/Struct.cs
  25. 10 7
      Unity/Assets/Scripts/Codes/Model/Client/Generate/Message/CommonProto_CS_10001.cs
  26. 0 11
      Unity/Assets/Scripts/Codes/Model/Client/Generate/Message/CommonProto_CS_10001.cs.meta
  27. 1 22
      Unity/Assets/Scripts/Codes/Model/Client/Generate/Message/OuterMessage_C_30001.cs
  28. 0 11
      Unity/Assets/Scripts/Codes/Model/Client/Generate/Message/OuterMessage_C_30001.cs.meta

+ 9 - 8
Config/Proto/CommonProto_CS_10001.proto

@@ -30,10 +30,11 @@ message CardInfo
 {
 	repeated int32 RemainCards = 1;	// 玩家手牌
 	int32 RemainCardsNum = 2;		// 玩家手牌数量
-	repeated int32 DisCards = 3;	// 玩家打出的牌集合
-	repeated ActInfo UsedInfo = 4;	// 存储玩家吃碰杠集合
-	repeated int32 Acts = 5;		// 玩家可操作动作[吃 碰 杠 胡 过] 可操作为1 不可操作为0 eg:[1,1,1,1,1]
-	repeated ActInfo ActInfo = 6;	// 玩家可操作动作牌列表
+	int32 DrawCard = 3;				// 玩家摸的牌(只有摸牌人自己有)
+	repeated int32 DisCards = 4;	// 玩家打出的牌集合
+	repeated ActInfo UsedInfo = 5;	// 存储玩家吃碰杠集合
+	repeated int32 Acts = 6;		// 玩家可操作动作[吃 碰 杠 胡 过] 可操作为1 不可操作为0 eg:[1,1,1,1,1]
+	repeated ActInfo ActInfo = 7;	// 玩家可操作动作牌列表
 }
 
 message PlayerInfo
@@ -60,8 +61,8 @@ message RoomInfo
 	int32 Rand1 = 6;					// 骰子1
 	int32 Rand2 = 7;					// 骰子2
 	int32 CardNum = 8;					// 牌库剩余数量
-	PlayerInfo MyInfo = 9;				// 自己数据
-	repeated PlayerInfo OtherInfo = 10;	// 其他玩家数据
-	int64 OpId = 11;					// 操作玩家id
-	int32 OpPos = 12;					// 操作玩家位置
+	int64 OpId = 9;						// 当前操作玩家id
+	int32 OpPos = 10;					// 当前操作玩家位置
+	PlayerInfo MyInfo = 11;				// 自己数据
+	repeated PlayerInfo OtherInfo = 12;	// 其他玩家数据
 }

+ 1 - 8
Config/Proto/OuterMessage_C_30001.proto

@@ -239,14 +239,7 @@ message G2C_StartPush // IActorMessage
 
 message G2C_DrawCardPush // IActorMessage
 {
-	int64 PlayerId = 1;				// 摸牌玩家id
-	int32 DrawCardPos = 2;			// 摸牌玩家位置
-	repeated int32 Acts = 3;		// 玩家可操作动作[吃 碰 杠 胡 过] 可操作为1 不可操作为0 eg:[1,1,1,1,1]
-	repeated ActInfo ActInfo = 4;	// 玩家可操作动作牌列表
-	int32 DrawCardsNum = 5;			// 摸牌人手牌数量
-	int32 CardNum = 6;				// 牌库剩余数量
-	int32 DrawCard = 7;				// 摸的牌(只有摸牌人自己有)
-	int32 Time = 8;
+	RoomInfo info = 1;	// 房间信息
 }
 
 //ResponseType G2C_DisCard

+ 5 - 7
DotNet/Core/Core/Helper/RandomGenerator.cs

@@ -98,15 +98,13 @@ namespace ET
         /// 随机一个6位数房间id
         /// </summary>
         /// <returns></returns>
-        public static string RandRoomId()
+        public static int RandRoomId()
         {
             byte[] randomNumber = new byte[4];
-            using (RandomNumberGenerator rng = RandomNumberGenerator.Create())
-            {
-                rng.GetBytes(randomNumber);
-                uint value = BitConverter.ToUInt32(randomNumber, 0) % 900000 + 100000; // 确保是六位数
-                return value.ToString();
-            }
+            using RandomNumberGenerator rng = RandomNumberGenerator.Create();
+            rng.GetBytes(randomNumber);
+            uint value = BitConverter.ToUInt32(randomNumber, 0) % 900000 + 100000; // 确保是六位数
+            return int.Parse(value.ToString());
         }
         
         /// <summary>

+ 16 - 0
DotNet/Hotfix/Helper/CardHelper.cs

@@ -0,0 +1,16 @@
+using System.Collections.Generic;
+
+namespace ET.Server;
+
+/// <summary>
+/// 麻将相关工具类
+/// </summary>
+public static class CardHelper
+{
+    public static int[] Add(int[] src, int v) {
+        List<int> list = new List<int>(src);
+        list.Add(v);
+        return list.ToArray();
+    }
+
+}

+ 384 - 0
DotNet/Hotfix/Helper/HGHuangHuangHelper.cs

@@ -0,0 +1,384 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace ET.Server
+{
+    /// <summary>
+    /// 黄冈晃晃胡牌工具类
+    /// </summary>
+    public static class HGHuangHuangHelper
+    {
+        /// <summary>
+        /// 统计每个的数量
+        /// </summary>
+        /// <param name="cards"></param>
+        /// <returns></returns>
+        public static int[] CountCardsNum(int[] cards) {
+            int[] tmp = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+            foreach (int value in cards)
+            {
+                tmp[value] += 1;
+            }
+            return tmp;
+        }
+        
+        public static int CountCardNum(int[] target, int card) {
+            int i = 0;
+            foreach (int tar in target)
+            {
+                if (tar == card)
+                {
+                    i++;
+                }
+            }
+            return i;
+        }
+        
+        /// <summary>
+        /// 摸牌是否杠
+        /// </summary>
+        /// <param name="player"></param>
+        /// <returns></returns>
+        public static List<Struct.Kezi> IsDrawGang(Player player) {
+            List<Struct.Kezi> list = new List<Struct.Kezi>();
+            int[] count = CountCardsNum(player.RemainCards);
+            // 暗杠
+            for (int val = 0; val < count.Length; val++)
+            {
+                if (count[val] == 4)
+                {
+                    // 4张牌暗杠
+                    list.Add(new Struct.Kezi((int)HGHuangHuangConst.KeziType.AN_GANG, val, player.Id));
+                }
+            }
+            // 回杠
+            foreach (Struct.Kezi kz in player.KeZi)
+            {
+                if (kz.Type == (int)HGHuangHuangConst.KeziType.PENG)
+                {
+                    if (count[kz.Card] == 1)
+                    {
+                        list.Add(new Struct.Kezi((int)HGHuangHuangConst.KeziType.HUI_GANG, kz.Card, player.Id));
+                    }
+                }
+            }
+            return list;
+        }
+        
+        /// <summary>
+        /// 出牌是否杠
+        /// </summary>
+        /// <param name="player">可杠玩家</param>
+        /// <param name="card">可杠牌</param>
+        /// <param name="oth_uid">杠谁的</param>
+        /// <returns></returns>
+        public static List<Struct.Kezi> IsDiscardGang(Player player, int card, long oth_uid) {
+            List<Struct.Kezi> list = new List<Struct.Kezi>();
+            int num = CountCardNum(player.RemainCards, card);
+            if (num == 3)
+            {
+                list.Add(new Struct.Kezi((int)HGHuangHuangConst.KeziType.MING_GANG, card, oth_uid));
+            }
+            return list;
+        }
+        
+        /// <summary>
+        /// 出牌是否碰
+        /// </summary>
+        /// <param name="player">可碰玩家</param>
+        /// <param name="card">可碰牌</param>
+        /// <param name="oth_uid">碰谁的</param>
+        /// <returns></returns>
+        public static List<Struct.Kezi> IsDiscardPeng(Player player, int card, long oth_uid) {
+            List<Struct.Kezi> list = new List<Struct.Kezi>();
+            int num = CountCardNum(player.RemainCards, card);
+            if (num >= 2)
+            {
+                list.Add(new Struct.Kezi((int)HGHuangHuangConst.KeziType.PENG, card, oth_uid));
+            }
+            return list;
+        }
+        
+        /// <summary>
+        /// 出牌是否吃
+        /// </summary>
+        /// <param name="player"></param>
+        /// <param name="card"></param>
+        /// <param name="oth_uid"></param>
+        /// <returns></returns>
+        public static List<Struct.Kezi> IsDiscardChi(Player player, int card, long oth_uid) {
+            List<Struct.Kezi> list = new List<Struct.Kezi>();
+            int[] count = CountCardsNum(player.RemainCards);
+            if (card < HGHuangHuangConst.DONG_FENG)
+            {
+                if ((card - 2) >= HGHuangHuangConst.YI_WAN && count[card - 2] >= 1 && count[card - 1] >= 1)
+                {
+                    list.Add(new Struct.Kezi((int)HGHuangHuangConst.KeziType.CHI, card - 2, oth_uid));
+                }
+                if ((card - 1) >= HGHuangHuangConst.YI_WAN && count[card - 1] >= 1 && count[card + 1] >= 1)
+                {
+                    list.Add(new Struct.Kezi((int)HGHuangHuangConst.KeziType.CHI, card - 1, oth_uid));
+                }
+                if (count[card + 1] >= 1 && count[card + 2] >= 1)
+                {
+                    list.Add(new Struct.Kezi((int)HGHuangHuangConst.KeziType.CHI, card, oth_uid));
+                }
+            }
+            return list;
+        }
+        
+        /// <summary>
+        /// 检测胡牌
+        /// </summary>
+        /// <param name="cards"></param>
+        /// <returns></returns>
+        public static Struct.HuRes CheckHu(int[] cards) {
+            Struct.HuRes res = new ();
+            int[] tem = new int[cards.Length];
+            Array.Copy(cards, tem, cards.Length);
+            Array.Sort(tem);
+            if (IsHu7Dui(tem))
+            {
+                // 先检查七对
+                res.Type = HGHuangHuangConst.HU_7DUI;
+                res.Jiang = 0;
+                return res;
+            }
+            int jiang = IsHuDuiDui(tem);
+            if (jiang != 0)
+            {
+                // 再检查对对胡
+                res.Type = HGHuangHuangConst.HU_DUIDUI;
+                res.Jiang = jiang;
+                return res;
+            }
+            jiang = IsHuBase(tem);
+            if (jiang != 0)
+            {
+                // 最后检查平胡
+                res.Type = HGHuangHuangConst.HU_BASE;
+                res.Jiang = jiang;
+                return res;
+            }
+            res.Type = HGHuangHuangConst.HU_DEFAULT;
+            res.Jiang = 0;
+            return res;
+        }
+
+        
+        /// <summary>
+        /// 是否满足清一色(没有宝牌)
+        /// </summary>
+        /// <param name="list">刻子集合</param>
+        /// <param name="cards">手牌加最后摸得牌</param>
+        /// <returns></returns>
+        private static bool CheckQingYiSe(List<Struct.Kezi> list, int[] cards) {
+            int[] tempCards = new int[cards.Length];
+            Array.Copy(cards, 0, tempCards, 0, tempCards.Length);
+            tempCards = list.Aggregate(tempCards, (current, kezi) => CardHelper.Add(current, kezi.Card));
+            int tong = 0, tiao = 0, feng = 0;
+            foreach (int i in tempCards)
+            {
+                int high = i >> 4;
+                switch (high)
+                {
+                    case 1:
+                        tong = 1;
+                        break;
+                    case 2:
+                        tiao = 1;
+                        break;
+                    case 3:
+                        feng = 1;
+                        break;
+                }
+            }
+            return feng == 0 && (tong + tiao == 1);
+        }
+        
+        /// <summary>
+        /// 对对胡
+        /// </summary>
+        /// <param name="cards">手上的牌</param>
+        /// <returns></returns>
+        private static int IsHuDuiDui(int[] cards) {
+            int[] count = CountCardsNum(cards);
+            int jiang = 0;
+            for (int i = 0; i < cards.Length;)
+            {
+                int value = cards[i];
+                if (count[value] >= 3)
+                {
+                    count[value] -= 3;
+                }
+                else
+                {
+                    if (jiang == 0)
+                    {
+                        if (count[value] == 2)
+                        {
+                            count[value] -= 2;
+                            jiang = value;
+                        }
+                        else
+                        {
+                            i++;
+                        }
+                    }
+                    else
+                    {
+                        i++;
+                    }
+                }
+            }
+            foreach (int aCount in count)
+            {
+                if (aCount > 0)
+                {
+                    return 0;
+                }
+            }
+            return jiang;
+        }
+
+        
+        /// <summary>
+        /// 七对
+        /// </summary>
+        /// <param name="cards">手上的牌</param>
+        /// <returns></returns>
+        private static bool IsHu7Dui(int[] cards) {
+            if (cards.Length != 14)
+            {
+                return false;
+            }
+            int[] num = CountCardsNum(cards);
+            int count = 0;
+            foreach (int n in num)
+            {
+                if (n == 3 || n == 1)
+                {
+                    count += 1;
+                    break;
+                }
+            }
+            return count == 0;
+        }
+
+        /// <summary>
+        /// 校验基本胡(查找可胡牌的将)
+        /// </summary>
+        /// <param name="cards">升序排列</param>
+        /// <returns></returns>
+        public static int IsHuBase(int[] cards) {
+            int[] tmpCount = CountCardsNum(cards);
+            for (int i = 0; i < cards.Length; i++)
+            {
+                int card = cards[i];
+                int[] count = new int[tmpCount.Length];
+                Array.Copy(tmpCount, 0, count, 0, tmpCount.Length);
+                int jiang = 0;
+                if (count[card] >= 2)
+                {
+                    jiang = card;
+                    count[card] -= 2;
+                    int[] countDesc = new int[count.Length];
+                    Array.Copy(count, 0, countDesc, 0, count.Length);
+                    bool b = PingHuNoAnyCardAsc(cards, count);
+                    if (b)
+                    {
+                        return jiang;
+                    }
+                    else
+                    {
+                        b = PingHuNoAnyCardDesc(cards, countDesc);
+                        if (b)
+                        {
+                            return jiang;
+                        }
+                    }
+                }
+            }
+            return 0;
+        }
+        
+        private static bool PingHuNoAnyCardDesc(int[] cards, int[] count) {
+            for (int j = cards.Length - 1; j >= 0;)
+            {
+                int val = cards[j];
+                if (count[val] >= 3)
+                {
+                    count[val] = count[val] - 3;
+                }
+                else if (count[val] > 0 && val > 2)
+                {
+                    if (count[val - 1] > 0 && count[val - 2] > 0 && val >> 4 != 3)
+                    {
+                        // 顺子
+                        count[val] -= 1;
+                        count[val - 1] -= 1;
+                        count[val - 2] -= 1;
+                    }
+                    else
+                    {
+                        break;
+                    }
+                }
+                else
+                {
+                    j--;
+                }
+            }
+            bool hu = true;
+            foreach (int v in cards)
+            {
+                if (count[v] > 0)
+                {
+                    hu = false;
+                    break;
+                }
+            }
+            return hu;
+        }
+
+        private static bool PingHuNoAnyCardAsc(int[] cards, int[] count) {
+            for (int j = 0; j < cards.Length;)
+            {
+                int val = cards[j];
+                if (count[val] >= 3)
+                {
+                    count[val] = count[val] - 3;
+                }
+                else if (count[val] > 0 && val < count.Length - 2 && val >> 4 != 3)
+                {
+                    if (count[val + 1] > 0 && count[val + 2] > 0)
+                    {
+                        // 顺子
+                        count[val] -= 1;
+                        count[val + 1] -= 1;
+                        count[val + 2] -= 1;
+                    }
+                    else
+                    {
+                        break;
+                    }
+                }
+                else
+                {
+                    j++;
+                }
+            }
+            bool hu = true;
+            foreach (int v in cards)
+            {
+                if (count[v] > 0)
+                {
+                    hu = false;
+                    break;
+                }
+            }
+            return hu;
+        }
+    }
+}

+ 39 - 9
DotNet/Hotfix/Helper/ProtoHelper.cs

@@ -31,8 +31,9 @@ namespace ET.Server
         /// </summary>
         /// <param name="room"></param>
         /// <param name="player"></param>
+        /// <param name="opPlayer">当前操作玩家</param>
         /// <returns></returns>
-        public static RoomInfo RoomToProto(Room room, Player player)
+        public static RoomInfo RoomToProto(Room room, Player player, Player opPlayer)
         {
             RoomInfo info = new ();
             info.RoomId = room.RoomId;
@@ -46,16 +47,16 @@ namespace ET.Server
                 info.Rand1 = hgHuangHuangComponent.Rand[0];
                 info.Rand2 = hgHuangHuangComponent.Rand[1];
                 info.CardNum = hgHuangHuangComponent.CardList.Count;
-                info.OpId = 0;
-                info.OpPos = 0;
+                info.OpId = opPlayer?.Id ?? -1;
+                info.OpPos = opPlayer?.Pos ?? -1;
             }
             // 本人信息
-            info.MyInfo = PlayerInfoToProto(player, true);
+            info.MyInfo = PlayerInfoToProto(room, player, true);
             // 其他玩家信息
             info.OtherInfo = new List<PlayerInfo>();
             foreach (Player p in room.GetAllPlayers().Values.Where(p => p != null && p.Id != player.Id))
             {
-                info.OtherInfo.Add(PlayerInfoToProto(p, false));
+                info.OtherInfo.Add(PlayerInfoToProto(room, p, false));
             }
             return info;
         }
@@ -63,10 +64,11 @@ namespace ET.Server
         /// <summary>
         /// 房间玩家信息转proto
         /// </summary>
+        /// <param name="room">玩家</param>
         /// <param name="player">玩家</param>
         /// <param name="flag">是否本人</param>
         /// <returns></returns>
-        public static PlayerInfo PlayerInfoToProto(Player player, bool flag)
+        private static PlayerInfo PlayerInfoToProto(Room room, Player player, bool flag)
         {
             PlayerInfo info = new ();
             info.id = player.Id;
@@ -81,10 +83,38 @@ namespace ET.Server
             info.cardInfo = new CardInfo();
             if (flag)
             {
-                info.cardInfo.RemainCards = player.RemainCards;
+                info.cardInfo.RemainCards = new List<int>(player.RemainCards);
+                
+                HGHuangHuangComponent hgHuangHuangComponent = room.GetComponent<HGHuangHuangComponent>();
+                if (hgHuangHuangComponent != null)
+                {
+                    info.cardInfo.DrawCard = hgHuangHuangComponent.DrawCard;
+                }
+                
+                info.cardInfo.Acts = player.Act.ToList();
+                
+                info.cardInfo.ActInfo = new List<ActInfo>();
+                if (player.ActInfo is { Count: > 0 })
+                {
+                    foreach (Struct.Kezi kezi in player.ActInfo)
+                    {
+                        info.cardInfo.ActInfo.Add(new ActInfo(){Card = kezi.Card, Type = kezi.Type, PlayerId = kezi.PlayerId});
+                    }
+                }
+            }
+            
+            info.cardInfo.RemainCardsNum = player.RemainCards.Length;
+            
+            info.cardInfo.DisCards = new List<int>(player.DisCards);
+            
+            info.cardInfo.UsedInfo = new List<ActInfo>();
+            if (player.KeZi is {Count: > 0})
+            {
+                foreach (Struct.Kezi kezi in player.KeZi.Where(kezi => kezi != null))
+                {
+                    info.cardInfo.UsedInfo.Add(new ActInfo(){Card = kezi.Card, Type = kezi.Type, PlayerId = kezi.PlayerId});
+                }
             }
-            info.cardInfo.RemainCardsNum = player.RemainCards.Count;
-            info.cardInfo.DisCards = player.DisCards;
             
             return info;
         }

+ 1 - 1
DotNet/Hotfix/Module/Http/HttpComponentSystem.cs

@@ -32,7 +32,7 @@ namespace ET.Server
                 }
                 catch (HttpListenerException e)
                 {
-                    throw new Exception($"请先在cmd中运行: netsh http add urlacl url=http://*:你的address中的端口/ user=Everyone, address: {address}", e);
+                    throw new Exception($"请先在cmd中运行: netsh http add urlacl url=http://+:你的address中的端口/ user=Everyone, address: {address}", e);
                 }
             }
         }

+ 2 - 2
DotNet/Hotfix/Scenes/Game/GameRoomComponentSystem.cs

@@ -10,13 +10,13 @@ public static class GameRoomComponentSystem
         self.idRooms.Add(room.RoomId, room);
     }
 
-    public static Room Get(this GameRoomComponent self, string roomId)
+    public static Room Get(this GameRoomComponent self, int roomId)
     {
         self.idRooms.TryGetValue(roomId, out Room room);
         return room;
     }
 
-    public static void Remove(this GameRoomComponent self, string roomId)
+    public static void Remove(this GameRoomComponent self, int roomId)
     {
         self.idRooms.Remove(roomId);
     }

+ 2 - 2
DotNet/Hotfix/Scenes/Game/Handler/C2G_CreatRoomHandler.cs

@@ -22,7 +22,7 @@ namespace ET.Server
             }
             
             // 玩家是否有房间
-            if (!string.IsNullOrEmpty(player.RoomId))
+            if (player.RoomId > 0)
             { 
                 response.Error = ErrorCode.ERR_OperationError;
                 response.Message = "玩家已在房间,不可创建房间...";
@@ -38,7 +38,7 @@ namespace ET.Server
             player.RoomId = room.RoomId;
             
             // 返回房间数据
-            response.Info = ProtoHelper.RoomToProto(room, player);
+            response.Info = ProtoHelper.RoomToProto(room, player, null);
             reply();
             await ETTask.CompletedTask;
         }

+ 4 - 12
DotNet/Hotfix/Scenes/Game/Handler/C2G_JoinRoomHandler.cs

@@ -21,24 +21,16 @@ namespace ET.Server
                 return;
             }
             // 判断参数
-            if (string.IsNullOrEmpty(request.RoomId))
+            if (request.RoomId <= 0)
             {
                 response.Error = ErrorCode.ERR_ParameterError;
-                response.Message = "参数错误,房间号为空...";
-                reply();
-                return;
-            }
-            // 房间号格式是否正确
-            if (Regex.IsMatch(request.RoomId, @"^\d+$"))
-            {
-                response.Error = ErrorCode.ERR_ParameterError;
-                response.Message = "参数错误,格式有误...";
+                response.Message = "参数错误,房间号有误...";
                 reply();
                 return;
             }
 
             // 判断玩家是否在其他房间
-            if (!player.RoomId.Equals(request.RoomId))
+            if (player.RoomId > 0 && request.RoomId != player.RoomId)
             { 
                 response.Error = ErrorCode.ERR_OperationError;
                 response.Message = "玩家已在房间,不可加入其他房间...";
@@ -86,7 +78,7 @@ namespace ET.Server
             {
                 if (p != null)
                 {
-                    MessageHelper.SendToClient(p, new G2C_JoinRoomPush(){info = ProtoHelper.RoomToProto(room, p)});
+                    MessageHelper.SendToClient(p, new G2C_JoinRoomPush(){info = ProtoHelper.RoomToProto(room, p, null)});
                 }
             }
             

+ 1 - 1
DotNet/Hotfix/Scenes/Game/Handler/C2G_KickHandler.cs

@@ -20,7 +20,7 @@ namespace ET.Server
 			}
 			
 			// 判断参数
-			if (string.IsNullOrEmpty(request.RoomId))
+			if (request.RoomId <= 0)
 			{
 				response.Error = ErrorCode.ERR_ParameterError;
 				response.Message = "参数错误,房间号为空...";

+ 1 - 1
DotNet/Hotfix/Scenes/Game/Handler/C2G_LoginGameHandler.cs

@@ -37,7 +37,7 @@ namespace ET.Server
 			session.AddComponent<MailBoxComponent, MailboxType>(MailboxType.GameSession);
 
 			response.Player = ProtoHelper.PlayerToProto(player);
-			response.IsInRoom = !string.IsNullOrEmpty(player.RoomId);
+			response.IsInRoom = player.RoomId > 0;
 			reply();
 			await ETTask.CompletedTask;
 		}

+ 2 - 2
DotNet/Hotfix/Scenes/Game/Handler/C2G_ReadyHandler.cs

@@ -21,7 +21,7 @@ namespace ET.Server
             }
             
             // 玩家是否进入房间
-            if (string.IsNullOrEmpty(player.RoomId))
+            if (player.RoomId <= 0)
             { 
                 response.Error = ErrorCode.ERR_OperationError;
                 response.Message = "玩家不在房间,不可准备...";
@@ -60,7 +60,7 @@ namespace ET.Server
             {
                 if (p != null)
                 {
-                    MessageHelper.SendToClient(p, new G2C_ReadyPush(){info = ProtoHelper.RoomToProto(room, p)});
+                    MessageHelper.SendToClient(p, new G2C_ReadyPush(){info = ProtoHelper.RoomToProto(room, p, null)});
                 }
             }
             

+ 10 - 3
DotNet/Hotfix/Scenes/Game/Player/PlayerSystem.cs

@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
 
 namespace ET.Server
 {
@@ -15,9 +16,15 @@ namespace ET.Server
                 self.Session = session;
                 
                 // self.Account = a;
-                self.IsOnline = true;
                 self.LoginTime = TimeHelper.ServerNow();
-                self.RemainCards = new List<int>();
+                self.IsOnline = true;
+                self.IsAuto = false;
+                self.RemainCards = Array.Empty<int>();
+                self.DisCards = Array.Empty<int>();
+                self.KeZi = new List<Struct.Kezi>();
+                self.Act = new int[5];
+                self.ActInfo = new List<Struct.Kezi>();
+                self.HuCards = new List<int>();
                 // 添加本地玩家数据
                 self.DomainScene().GetComponent<GamePlayerComponent>().Add(self);
             }

+ 110 - 21
DotNet/Hotfix/Scenes/Game/Room/HGHuangHuangComponentSystem.cs

@@ -27,8 +27,13 @@ namespace ET.Server
                 self.CurrentRound = 0;
                 self.ZhuangPos = 0;
                 self.Rand = new[] { 0, 0 };
+                self.AdmitDefeatList = new List<long>();
+                self.CanHuIds = new List<Player>();
+                self.CanPgIds = new List<Player>();
+                self.OperableList = new List<Player>();
+                self.ClickHuIds = new List<Player>();
                 self.CardList = new List<int>();
-                self.NextUpdateTime = 0;
+                self.UpdateTime = 0;
                 // 初始化玩家
                 int index = 0;
                 foreach (Player player in room.GetAllPlayers().Values)
@@ -42,7 +47,7 @@ namespace ET.Server
                 // 初始化牌库
                 for (int i = 0; i < 4; i++)
                 {
-                    foreach (int value in HghhConstValue.Values)
+                    foreach (int value in HGHuangHuangConst.Values)
                     {
                         self.CardList.Add(value);
                     }
@@ -61,37 +66,43 @@ namespace ET.Server
         }
 
         [ObjectSystem]
-        public class HGHuangHuangComponentUpdateSystem: UpdateSystem<HGHuangHuangComponent>
+        [FriendOf(typeof(Room))]
+        public class HGHuangHuangComponentUpdateSystem : UpdateSystem<HGHuangHuangComponent>
         {
             protected override void Update(HGHuangHuangComponent self)
             {
                 long timeNow = TimeHelper.ClientNow();
                 // 每秒执行一次
-                if (timeNow - self.NextUpdateTime <= 1000)
+                if (timeNow - self.UpdateTime <= 1000)
                 {
                     return;
                 }
-                self.NextUpdateTime = timeNow;
-                
+                self.UpdateTime = timeNow;
+
                 Room room = self.GetParent<Room>();
                 if (room == null)
                 {
                     Log.Error($"黄冈晃晃主逻辑组件获取不到主实体...");
                     return;
                 }
-                Log.Debug($"检测: 黄冈晃晃-房间号:{room.RoomId}, 状态:{self.State}...");
-                
+
                 switch (self.State)
                 {
                     case 0:
                         // 等待状态
-                        Log.Debug($"检测: 黄冈晃晃-房间号:{room.RoomId}, 状态:检测是否可开局...");
+                        Log.Debug($"检测: 黄冈晃晃-房间号:{room.RoomId}, 房间人数:{room.Players.Count}, 状态:检测是否可开局...");
                         if (self.CheckReadyStart(room))
                         {
                             self.State = 1;
                             self.Flag = false;
                             self.Time = 0;
                         }
+                        
+                        // 120秒未开始直接解散
+                        if (self.Time >= 120)
+                        {
+                            room.Dispose();
+                        }
                         break;
                     case 1:
                         // 开局
@@ -102,7 +113,7 @@ namespace ET.Server
                                 self.Start(room);
                                 self.Flag = true;
                                 self.Time = 0;
-                                Log.Debug($"检测: 黄冈晃晃-房间号:{room.RoomId}, 状态:开局...VS动画...");
+                                Log.Debug($"检测: 黄冈晃晃-房间号:{room.RoomId}, 房间人数:{room.Players.Count}, 状态:开局...VS动画...");
                             }
                         }
                         else
@@ -129,16 +140,16 @@ namespace ET.Server
                             // 强制操作
                             if (self.Time > 30)
                             {
-                            
+
                             }
                         }
                         break;
                     case 3:
                         // 已结束
-                    
+
                         break;
                 }
-                
+
                 self.Time++;
             }
         }
@@ -183,7 +194,7 @@ namespace ET.Server
                 for (int i = 0; i < 13; i++)
                 {
                     int card = self.CardList[0];
-                    player.RemainCards.Add(card);
+                    player.RemainCards = CardHelper.Add(player.RemainCards, card);
                     self.CardList.RemoveAt(0);
                 }
             }
@@ -203,23 +214,25 @@ namespace ET.Server
             self.Rand = new[] { rand1, rand2 };
             // 定庄
             self.ZhuangPos = (rand1 + rand2) % 4;
-            // 当前操作玩家
+            // 设置当前操作玩家
             self.CurrentPlayer = room.GetAllPlayers()[self.ZhuangPos];
-            // 当前摸牌玩家
+            // 设置当前摸牌玩家
             self.DrawCardPlayer = room.GetAllPlayers()[self.ZhuangPos];
             // 发牌
             self.SendCard(room);
             // 广播
             foreach (Player player in room.GetAllPlayers().Values)
             {
-                if (player != null)
+                if (player == null)
                 {
-                    player.State = 2;
+                    continue;
+                }
+
+                player.State = 2;
                     
-                    MessageHelper.SendToClient(player, new G2C_StartPush(){info = ProtoHelper.RoomToProto(room, player)});
+                MessageHelper.SendToClient(player, new G2C_StartPush(){info = ProtoHelper.RoomToProto(room, player, null)});
                     
-                    Log.Info($"房间id={room.RoomId}, 玩家id={player.Id}, 玩家={player.Name}, 手牌信息={player.RemainCards}");
-                }
+                Log.Info($"游戏开局, 房间id={room.RoomId}, 玩家id={player.Id}, 玩家={player.Name}, 手牌信息={player.RemainCards}");
             }
         }
         
@@ -229,6 +242,82 @@ namespace ET.Server
         /// <param name="self"></param>
         /// <param name="room"></param>
         private static void DrawCard(this HGHuangHuangComponent self, Room room)
+        {
+            // 2个以上玩家认输或牌库没牌了直接结束
+            if (self.AdmitDefeatList.Count > 2 || self.CardList.Count <= 0)
+            {
+                self.GameOver(room);
+                return;
+            }
+            
+            Player drawCardPlayer = self.DrawCardPlayer;
+            if (drawCardPlayer == null)
+            {
+                Log.Error($"房间id={room.RoomId}, 摸牌玩家为空...");
+                return;
+            }
+            // 摸牌
+            int card = self.CardList[0];
+            drawCardPlayer.RemainCards = CardHelper.Add(drawCardPlayer.RemainCards, card);
+            self.CardList.RemoveAt(0);
+            // 当前摸的牌
+            self.DrawCard = card;
+            // 吃,碰,杠,胡,过
+            bool hasAct = false;
+            // 检测摸牌人动作, 校验摸牌是否胡
+            Struct.HuRes huRes = HGHuangHuangHelper.CheckHu(drawCardPlayer.RemainCards);
+            if (huRes.Type != HGHuangHuangConst.HU_DEFAULT)
+            {
+                hasAct = true;
+                drawCardPlayer.Act[3] = 1;
+                self.CanHuIds.Add(drawCardPlayer);
+                if (!self.OperableList.Contains(drawCardPlayer))
+                {
+                    self.OperableList.Add(drawCardPlayer);
+                }
+            }
+            // todo 玩家听牌状态不允许杠
+            // 检测摸牌人动作, 校验摸牌是否杠
+            List<Struct.Kezi> gang = HGHuangHuangHelper.IsDrawGang(drawCardPlayer);
+            if (gang is { Count: > 0 })
+            {
+                hasAct = true;
+                drawCardPlayer.Act[2] = 1;
+                if (!self.OperableList.Contains(drawCardPlayer))
+                {
+                    self.OperableList.Add(drawCardPlayer);
+                }
+                if (!self.CanPgIds.Contains(drawCardPlayer))
+                {
+                    self.CanPgIds.Add(drawCardPlayer);
+                }
+            }
+            // 过牌
+            drawCardPlayer.Act[4] = hasAct? 1 : 0;
+            if (drawCardPlayer.HuCards.Any(_card => _card > 0 && _card == self.DrawCard))
+            {
+                drawCardPlayer.Act[4] = 0;
+            }
+            // 推送摸牌广播
+            foreach (Player player in room.GetAllPlayers().Values)
+            {
+                if (player == null)
+                {
+                    continue;
+                }
+
+                MessageHelper.SendToClient(player, new G2C_DrawCardPush(){info = ProtoHelper.RoomToProto(room, player, drawCardPlayer)});
+                    
+                Log.Info($"摸牌, 房间id={room.RoomId}, 玩家id={player.Id}, 玩家={player.Name}, 摸牌玩家={player.Id == drawCardPlayer.Id}, 手牌信息={player.RemainCards}, 摸的牌={card}");
+            }
+        }
+
+        /// <summary>
+        /// 结束
+        /// </summary>
+        /// <param name="self"></param>
+        /// <param name="room"></param>
+        private static void GameOver(this HGHuangHuangComponent self, Room room)
         {
             
         }

+ 6 - 5
DotNet/Hotfix/Scenes/Game/Room/RoomSystem.cs

@@ -12,7 +12,8 @@ namespace ET.Server
             {
                 Log.Info($"创建房间实体...");
                 self.RoomId = RandomGenerator.RandRoomId();
-                self.MaxNum = 4;
+                // todo 暂时2个人先测试
+                self.MaxNum = 2;
                 self.Type = 1;
                 self.OwnerId = owner.Id;
                 self.CreateTime = TimeHelper.ServerNow();
@@ -124,10 +125,10 @@ namespace ET.Server
         {
             int[] nextPos = pos switch
             {
-                3 => new int[] { 0, 1, 2 },
-                2 => new int[] { 3, 0, 1 },
-                1 => new int[] { 2, 3, 0 },
-                0 => new int[] { 1, 2, 3 },
+                3 => new [] { 0, 1, 2 },
+                2 => new [] { 3, 0, 1 },
+                1 => new [] { 2, 3, 0 },
+                0 => new [] { 1, 2, 3 },
                 _ => null
             };
             return nextPos;

+ 11 - 8
DotNet/Model/Generate/Message/CommonProto_CS_10001.cs

@@ -71,15 +71,18 @@ namespace ET
 		public int RemainCardsNum { get; set; }
 
 		[ProtoMember(3)]
-		public List<int> DisCards { get; set; }
+		public int DrawCard { get; set; }
 
 		[ProtoMember(4)]
-		public List<ActInfo> UsedInfo { get; set; }
+		public List<int> DisCards { get; set; }
 
 		[ProtoMember(5)]
-		public List<int> Acts { get; set; }
+		public List<ActInfo> UsedInfo { get; set; }
 
 		[ProtoMember(6)]
+		public List<int> Acts { get; set; }
+
+		[ProtoMember(7)]
 		public List<ActInfo> ActInfo { get; set; }
 
 	}
@@ -125,7 +128,7 @@ namespace ET
 	public partial class RoomInfo: ProtoObject
 	{
 		[ProtoMember(1)]
-		public string RoomId { get; set; }
+		public int RoomId { get; set; }
 
 		[ProtoMember(2)]
 		public int Type { get; set; }
@@ -149,16 +152,16 @@ namespace ET
 		public int CardNum { get; set; }
 
 		[ProtoMember(9)]
-		public PlayerInfo MyInfo { get; set; }
+		public long OpId { get; set; }
 
 		[ProtoMember(10)]
-		public List<PlayerInfo> OtherInfo { get; set; }
+		public int OpPos { get; set; }
 
 		[ProtoMember(11)]
-		public long OpId { get; set; }
+		public PlayerInfo MyInfo { get; set; }
 
 		[ProtoMember(12)]
-		public int OpPos { get; set; }
+		public List<PlayerInfo> OtherInfo { get; set; }
 
 	}
 

+ 3 - 24
DotNet/Model/Generate/Message/OuterMessage_C_30001.cs

@@ -351,7 +351,7 @@ namespace ET
 		public int RpcId { get; set; }
 
 		[ProtoMember(2)]
-		public string RoomId { get; set; }
+		public int RoomId { get; set; }
 
 	}
 
@@ -425,7 +425,7 @@ namespace ET
 		public int RpcId { get; set; }
 
 		[ProtoMember(2)]
-		public string RoomId { get; set; }
+		public int RoomId { get; set; }
 
 		[ProtoMember(3)]
 		public long PlayerId { get; set; }
@@ -479,28 +479,7 @@ namespace ET
 	public partial class G2C_DrawCardPush: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public long PlayerId { get; set; }
-
-		[ProtoMember(2)]
-		public int DrawCardPos { get; set; }
-
-		[ProtoMember(3)]
-		public List<int> Acts { get; set; }
-
-		[ProtoMember(4)]
-		public List<ActInfo> ActInfo { get; set; }
-
-		[ProtoMember(5)]
-		public int DrawCardsNum { get; set; }
-
-		[ProtoMember(6)]
-		public int CardNum { get; set; }
-
-		[ProtoMember(7)]
-		public int DrawCard { get; set; }
-
-		[ProtoMember(8)]
-		public int Time { get; set; }
+		public RoomInfo info { get; set; }
 
 	}
 

+ 1 - 1
DotNet/Model/Scenes/Game/GameRoomComponent.cs

@@ -9,5 +9,5 @@ namespace ET.Server;
 public class GameRoomComponent : Entity, IAwake, IDestroy
 {
     /** 房间集合 [key:房间号, value:房间实例] **/
-    public readonly Dictionary<string, Room> idRooms = new Dictionary<string, Room>();
+    public readonly Dictionary<int, Room> idRooms = new ();
 }

+ 59 - 0
DotNet/Model/Scenes/Game/HGHuangHuangConst.cs

@@ -0,0 +1,59 @@
+namespace ET.Server
+{
+    /// <summary>
+    /// 晃晃静态常量
+    /// </summary>
+    public static class HGHuangHuangConst
+    {
+        /// <summary>
+        /// 麻将对应数值
+        /// 0x01-0x09 万
+        /// 0x11-0x19 筒
+        /// 0x21-0x29 条
+        /// 0x31-0x37 东南西北中发白
+        /// </summary>
+        public static readonly int[] Values =
+        {
+            0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
+            0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
+            0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29,
+            0x35, 0x36, 0x37
+        };
+        
+        public const int YI_WAN = 0x01;
+        public const int DONG_FENG = 0x31;
+        
+        /** 默认 **/
+        public const int HU_DEFAULT = 0;
+        /** 基本胡 x1 **/
+        public const int HU_BASE = 1;
+        /** 碰碰胡 x2 **/
+        public const int HU_DUIDUI = 2;
+        /** 七对 x4 **/
+        public const int HU_7DUI = 3;
+        /** 清一色 x4 **/
+        public const int HU_QING = 4;
+        /** 清一色碰碰胡 x8 **/
+        public const int HU_QING_DUIDUI = 5;
+        /** 清一色七对 x16 **/
+        public const int HU_QING_QIDUI = 6;
+        
+        /// <summary>
+        /// 刻子类型
+        /// </summary>
+        public enum KeziType
+        {
+            DEFAULT = 0,
+            /** 明杠 */
+            MING_GANG = 1,
+            /** 回杠 */
+            HUI_GANG = 2,
+            /** 暗杠 */
+            AN_GANG = 3,
+            /** 碰 */
+            PENG = 4,
+            /** 吃 **/
+            CHI = 5
+        }
+    }
+}

+ 11 - 3
DotNet/Model/Scenes/Game/Player/Player.cs

@@ -34,7 +34,7 @@ namespace ET.Server
         public int Level { get; set; }
         
         /** 房间号 **/
-        public string RoomId { get; set; }
+        public int RoomId { get; set; }
         /** 玩家位置 0东 1南 2西 3北 **/
         public int Pos { get; set; }
         /** 玩家状态 0未准备 1已准备 2游戏中 3结束 **/
@@ -42,8 +42,16 @@ namespace ET.Server
         /** 是否托管 **/
         public bool IsAuto { get; set; }
         /** 玩家手牌 **/
-        public List<int> RemainCards { get; set; }
+        public int[] RemainCards { get; set; }
         /** 玩家打出的牌 **/
-        public List<int> DisCards { get; set; }
+        public int[] DisCards { get; set; }
+        /** 玩家吃碰杠集合 **/
+        public List<Struct.Kezi> KeZi { get; set; }
+        /** 玩家可操作动作 吃、碰、杠、胡、过 **/
+        public int[] Act { get; set; }
+        /** 玩家可操作动作牌列表 **/
+        public List<Struct.Kezi> ActInfo { get; set; }
+        /** 胡牌堆 **/
+        public List<int> HuCards { get; set; }
     }
 }

+ 12 - 2
DotNet/Model/Scenes/Game/Room/HGHuangHuangComponent.cs

@@ -29,9 +29,19 @@ namespace ET.Server
         public int DrawCard { get; set; }
         /** 当前摸牌玩家 **/
         public Player DrawCardPlayer { get; set; }
+        /** 认输玩家集合 **/
+        public List<long> AdmitDefeatList { get; set; }
+        /** 可胡玩家集合 **/
+        public List<Player> CanHuIds { get; set; }
+        /** 可碰杠玩家集合 **/
+        public List<Player> CanPgIds { get; set; }
+        /** 可操作玩家集合 **/
+        public List<Player> OperableList { get; set; }
+        /** 点击胡的玩家集合 **/
+        public List<Player> ClickHuIds { get; set; }
         /** 牌库 **/
         public List<int> CardList { get; set; }
-        /** 下一次更新时间 **/
-        public long NextUpdateTime { get; set; }
+        /** 更新时间 **/
+        public long UpdateTime { get; set; }
     }
 }

+ 2 - 2
DotNet/Model/Scenes/Game/Room/Room.cs

@@ -9,11 +9,11 @@ namespace ET.Server
     public class Room : Entity, IAwake<Player>, IDestroy
     {
         /** 房间号 **/
-        public string RoomId { get; set; }
+        public int RoomId { get; set; }
         /** 房间最大人数 **/
         public int MaxNum { get; set; }
         /** 房间玩家集合 **/
-        public SortedList<long, Player> Players = new SortedList<long, Player>();
+        public SortedList<long, Player> Players = new ();
         /** 房间玩法类型 1:黄冈晃晃 **/
         public int Type { get; set; }
         /** 房主playerId **/

+ 44 - 0
DotNet/Model/Scenes/Game/Struct.cs

@@ -0,0 +1,44 @@
+namespace ET.Server
+{
+    /// <summary>
+    /// 数据结构
+    /// </summary>
+    public class Struct
+    {
+        /// <summary>
+        /// 刻子对象
+        /// </summary>
+        public class Kezi
+        {
+            /** 1.明杠 2.回杠 3.暗杠 4.碰 5.吃 **/
+            public int Type { get; set; }
+            /** 牌(吃:为顺子第一张) **/
+            public int Card { get; set; }
+            /** 操作谁家的牌 **/
+            public long PlayerId { get; set; }
+
+            public Kezi(int type, int card, long playerId)
+            {
+                this.Type = type;
+                this.Card = card;
+                this.PlayerId = playerId;
+            }
+        }
+        
+        public class HuRes
+        {
+            public int Type { get; set; }
+            public int Jiang { get; set; }
+
+            public HuRes()
+            {
+            }
+
+            public HuRes(int type, int jiang)
+            {
+                this.Type = type;
+                this.Jiang = jiang;
+            }
+        }
+    }
+}

+ 10 - 7
Unity/Assets/Scripts/Codes/Model/Client/Generate/Message/CommonProto_CS_10001.cs

@@ -71,15 +71,18 @@ namespace ET
 		public int RemainCardsNum { get; set; }
 
 		[ProtoMember(3)]
-		public List<int> DisCards { get; set; }
+		public int DrawCard { get; set; }
 
 		[ProtoMember(4)]
-		public List<ActInfo> UsedInfo { get; set; }
+		public List<int> DisCards { get; set; }
 
 		[ProtoMember(5)]
-		public List<int> Acts { get; set; }
+		public List<ActInfo> UsedInfo { get; set; }
 
 		[ProtoMember(6)]
+		public List<int> Acts { get; set; }
+
+		[ProtoMember(7)]
 		public List<ActInfo> ActInfo { get; set; }
 
 	}
@@ -149,16 +152,16 @@ namespace ET
 		public int CardNum { get; set; }
 
 		[ProtoMember(9)]
-		public PlayerInfo MyInfo { get; set; }
+		public long OpId { get; set; }
 
 		[ProtoMember(10)]
-		public List<PlayerInfo> OtherInfo { get; set; }
+		public int OpPos { get; set; }
 
 		[ProtoMember(11)]
-		public long OpId { get; set; }
+		public PlayerInfo MyInfo { get; set; }
 
 		[ProtoMember(12)]
-		public int OpPos { get; set; }
+		public List<PlayerInfo> OtherInfo { get; set; }
 
 	}
 

+ 0 - 11
Unity/Assets/Scripts/Codes/Model/Client/Generate/Message/CommonProto_CS_10001.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: f98098da3541a834d8e4dd2ca59effa5
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 1 - 22
Unity/Assets/Scripts/Codes/Model/Client/Generate/Message/OuterMessage_C_30001.cs

@@ -479,28 +479,7 @@ namespace ET
 	public partial class G2C_DrawCardPush: ProtoObject, IActorMessage
 	{
 		[ProtoMember(1)]
-		public long PlayerId { get; set; }
-
-		[ProtoMember(2)]
-		public int DrawCardPos { get; set; }
-
-		[ProtoMember(3)]
-		public List<int> Acts { get; set; }
-
-		[ProtoMember(4)]
-		public List<ActInfo> ActInfo { get; set; }
-
-		[ProtoMember(5)]
-		public int DrawCardsNum { get; set; }
-
-		[ProtoMember(6)]
-		public int CardNum { get; set; }
-
-		[ProtoMember(7)]
-		public int DrawCard { get; set; }
-
-		[ProtoMember(8)]
-		public int Time { get; set; }
+		public RoomInfo info { get; set; }
 
 	}
 

+ 0 - 11
Unity/Assets/Scripts/Codes/Model/Client/Generate/Message/OuterMessage_C_30001.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 5a37c7a9cdefe1d49a631de5b2a1da54
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: