浏览代码

fixed: 开始游戏广播,添加mapid字段.

王刚 3 年之前
父节点
当前提交
314e12edfa
共有 3 个文件被更改,包括 43 次插入14 次删除
  1. 1 1
      CSserver/MultiDup/server/Room.cs
  2. 1 0
      CSserver/PBReferens/pb/MultiDup.proto
  3. 41 13
      CSserver/PBReferens/pbcs/MultiDup.cs

+ 1 - 1
CSserver/MultiDup/server/Room.cs

@@ -130,7 +130,7 @@ namespace MultiDup
                 {
                     Console.WriteLine(" 没有可用的battle服务器! ");
                 }
-                Broadcast(TargetType.All, eProtocalCommand.ScMdBeginDup, new SC_MD_BeginDup() { Battleserver = this.BattleServerIp, BattleServerPort = this.BattleServerPort });
+                Broadcast(TargetType.All, eProtocalCommand.ScMdBeginDup, new SC_MD_BeginDup() {  Mapid = this.mapId, Battleserver = this.BattleServerIp, BattleServerPort = this.BattleServerPort });
             }
         }
 

+ 1 - 0
CSserver/PBReferens/pb/MultiDup.proto

@@ -117,6 +117,7 @@ package MultiDup;
  message SC_MD_BeginDup {
     string Battleserver =1;
 	int32  BattleServerPort =2;
+	int32  Mapid=3;
  }
 
  // 战斗服务 登录

+ 41 - 13
CSserver/PBReferens/pbcs/MultiDup.cs

@@ -47,19 +47,19 @@ namespace MultiDup {
             "clBvcnQYBSABKAUiawoPU0NfTURfRW50ZXJSb29tEg4KBlpvbmVpZBgBIAEo",
             "BRILCgNVaWQYAiABKAkSDQoFTWFwaWQYAyABKAUSCgoCSXAYBCABKAkSDAoE",
             "UG9ydBgFIAEoBRISCgpQbGF5ZXJVaWRzGAYgAygJIi4KD1NDX01EX0xlYXZl",
-            "Um9vbRIOCgZab25laWQYASABKAUSCwoDVWlkGAIgASgJIkAKDlNDX01EX0Jl",
+            "Um9vbRIOCgZab25laWQYASABKAUSCwoDVWlkGAIgASgJIk8KDlNDX01EX0Jl",
             "Z2luRHVwEhQKDEJhdHRsZXNlcnZlchgBIAEoCRIYChBCYXR0bGVTZXJ2ZXJQ",
-            "b3J0GAIgASgFIjcKC1NDX0JUX0xvZ2luEg4KBlpvbmVpZBgBIAEoBRILCgNV",
-            "aWQYAiABKAkSCwoDTXNnGAMgASgJIlYKDFNDX0JUX1N0YXR1cxIOCgZab25l",
-            "aWQYASABKAUSEQoJU2VuZGVyVWlkGAIgASgJEhQKDFByb3BlcnR5TmFtZRgD",
-            "IAEoCRINCgVWYWx1ZRgEIAEoCSJUCg5TQ19CVF9Qb3NpdGlvbhIOCgZab25l",
-            "aWQYASABKAUSEQoJU2VuZGVyVWlkGAIgASgJEgkKAVgYAyABKAISCQoBWRgE",
-            "IAEoAhIJCgFaGAUgASgCIkEKD1NDX0JUX0Jyb2FkQ2FzdBIOCgZab25laWQY",
-            "ASABKAUSEQoJU2VuZGVyVWlkGAIgASgJEgsKA01zZxgDIAEoCSI8CgpTQ19C",
-            "VF9PdmVyEg4KBlpvbmVpZBgBIAEoBRIRCglTZW5kZXJVaWQYAiABKAkSCwoD",
-            "TXNnGAMgASgJIjsKFVNTX0NyZWF0ZUJhdHRsZVNlcnZlchIOCgZSb29tSWQY",
-            "ASABKAUSEgoKUGxheWVyVWlkcxgCIAMoCSIZChdTU19DcmVhdGVCYXR0bGVT",
-            "ZXJ2ZXJPS2IGcHJvdG8z"));
+            "b3J0GAIgASgFEg0KBU1hcGlkGAMgASgFIjcKC1NDX0JUX0xvZ2luEg4KBlpv",
+            "bmVpZBgBIAEoBRILCgNVaWQYAiABKAkSCwoDTXNnGAMgASgJIlYKDFNDX0JU",
+            "X1N0YXR1cxIOCgZab25laWQYASABKAUSEQoJU2VuZGVyVWlkGAIgASgJEhQK",
+            "DFByb3BlcnR5TmFtZRgDIAEoCRINCgVWYWx1ZRgEIAEoCSJUCg5TQ19CVF9Q",
+            "b3NpdGlvbhIOCgZab25laWQYASABKAUSEQoJU2VuZGVyVWlkGAIgASgJEgkK",
+            "AVgYAyABKAISCQoBWRgEIAEoAhIJCgFaGAUgASgCIkEKD1NDX0JUX0Jyb2Fk",
+            "Q2FzdBIOCgZab25laWQYASABKAUSEQoJU2VuZGVyVWlkGAIgASgJEgsKA01z",
+            "ZxgDIAEoCSI8CgpTQ19CVF9PdmVyEg4KBlpvbmVpZBgBIAEoBRIRCglTZW5k",
+            "ZXJVaWQYAiABKAkSCwoDTXNnGAMgASgJIjsKFVNTX0NyZWF0ZUJhdHRsZVNl",
+            "cnZlchIOCgZSb29tSWQYASABKAUSEgoKUGxheWVyVWlkcxgCIAMoCSIZChdT",
+            "U19DcmVhdGVCYXR0bGVTZXJ2ZXJPS2IGcHJvdG8z"));
       descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
           new pbr::FileDescriptor[] { },
           new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
@@ -79,7 +79,7 @@ namespace MultiDup {
             new pbr::GeneratedClrTypeInfo(typeof(global::MultiDup.SC_MD_GetRoomList), global::MultiDup.SC_MD_GetRoomList.Parser, new[]{ "RoomInfos" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::MultiDup.SC_MD_GetRoomList.Types.RoomInfo), global::MultiDup.SC_MD_GetRoomList.Types.RoomInfo.Parser, new[]{ "RoomId", "Mapid", "PlayerUids", "Battleserver", "BattleServerPort" }, null, null, null)}),
             new pbr::GeneratedClrTypeInfo(typeof(global::MultiDup.SC_MD_EnterRoom), global::MultiDup.SC_MD_EnterRoom.Parser, new[]{ "Zoneid", "Uid", "Mapid", "Ip", "Port", "PlayerUids" }, null, null, null),
             new pbr::GeneratedClrTypeInfo(typeof(global::MultiDup.SC_MD_LeaveRoom), global::MultiDup.SC_MD_LeaveRoom.Parser, new[]{ "Zoneid", "Uid" }, null, null, null),
-            new pbr::GeneratedClrTypeInfo(typeof(global::MultiDup.SC_MD_BeginDup), global::MultiDup.SC_MD_BeginDup.Parser, new[]{ "Battleserver", "BattleServerPort" }, null, null, null),
+            new pbr::GeneratedClrTypeInfo(typeof(global::MultiDup.SC_MD_BeginDup), global::MultiDup.SC_MD_BeginDup.Parser, new[]{ "Battleserver", "BattleServerPort", "Mapid" }, null, null, null),
             new pbr::GeneratedClrTypeInfo(typeof(global::MultiDup.SC_BT_Login), global::MultiDup.SC_BT_Login.Parser, new[]{ "Zoneid", "Uid", "Msg" }, null, null, null),
             new pbr::GeneratedClrTypeInfo(typeof(global::MultiDup.SC_BT_Status), global::MultiDup.SC_BT_Status.Parser, new[]{ "Zoneid", "SenderUid", "PropertyName", "Value" }, null, null, null),
             new pbr::GeneratedClrTypeInfo(typeof(global::MultiDup.SC_BT_Position), global::MultiDup.SC_BT_Position.Parser, new[]{ "Zoneid", "SenderUid", "X", "Y", "Z" }, null, null, null),
@@ -3092,6 +3092,7 @@ namespace MultiDup {
     public SC_MD_BeginDup(SC_MD_BeginDup other) : this() {
       battleserver_ = other.battleserver_;
       battleServerPort_ = other.battleServerPort_;
+      mapid_ = other.mapid_;
     }
 
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -3121,6 +3122,17 @@ namespace MultiDup {
       }
     }
 
+    /// <summary>Field number for the "Mapid" field.</summary>
+    public const int MapidFieldNumber = 3;
+    private int mapid_;
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public int Mapid {
+      get { return mapid_; }
+      set {
+        mapid_ = value;
+      }
+    }
+
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
     public override bool Equals(object other) {
       return Equals(other as SC_MD_BeginDup);
@@ -3136,6 +3148,7 @@ namespace MultiDup {
       }
       if (Battleserver != other.Battleserver) return false;
       if (BattleServerPort != other.BattleServerPort) return false;
+      if (Mapid != other.Mapid) return false;
       return true;
     }
 
@@ -3144,6 +3157,7 @@ namespace MultiDup {
       int hash = 1;
       if (Battleserver.Length != 0) hash ^= Battleserver.GetHashCode();
       if (BattleServerPort != 0) hash ^= BattleServerPort.GetHashCode();
+      if (Mapid != 0) hash ^= Mapid.GetHashCode();
       return hash;
     }
 
@@ -3162,6 +3176,10 @@ namespace MultiDup {
         output.WriteRawTag(16);
         output.WriteInt32(BattleServerPort);
       }
+      if (Mapid != 0) {
+        output.WriteRawTag(24);
+        output.WriteInt32(Mapid);
+      }
     }
 
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -3173,6 +3191,9 @@ namespace MultiDup {
       if (BattleServerPort != 0) {
         size += 1 + pb::CodedOutputStream.ComputeInt32Size(BattleServerPort);
       }
+      if (Mapid != 0) {
+        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Mapid);
+      }
       return size;
     }
 
@@ -3187,6 +3208,9 @@ namespace MultiDup {
       if (other.BattleServerPort != 0) {
         BattleServerPort = other.BattleServerPort;
       }
+      if (other.Mapid != 0) {
+        Mapid = other.Mapid;
+      }
     }
 
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -3205,6 +3229,10 @@ namespace MultiDup {
             BattleServerPort = input.ReadInt32();
             break;
           }
+          case 24: {
+            Mapid = input.ReadInt32();
+            break;
+          }
         }
       }
     }