Browse Source

【优化】塔1死亡事件

johnclot69 1 year ago
parent
commit
fb495d9e5f
1 changed files with 6 additions and 4 deletions
  1. 6 4
      DotNet/Hotfix/Scenes/Game/Map/MapEventComponentSystem.cs

+ 6 - 4
DotNet/Hotfix/Scenes/Game/Map/MapEventComponentSystem.cs

@@ -40,11 +40,11 @@ namespace ET.Server
         /// </summary>
         /// <param name="self"></param>
         /// <param name="msg"></param>
-        public static void OnMessage(this MapEventComponent self, JObject json)
+        public static void OnMessage(this MapEventComponent self, JObject msg)
         {
-            string msg = Convert.ToString(json.SelectToken("msg"));
+            string str = Convert.ToString(msg.SelectToken("msg"));
 
-            string[] parames = msg.Split(":");
+            string[] parames = str.Split(":");
 
             switch (parames[0])
             {
@@ -52,7 +52,9 @@ namespace ET.Server
                 {
                     if ("Tower1".Equals(parames[1]))
                     {
-
+                        Log.Debug($"塔1死亡事件...");
+                        self.GetParent<Map>().DeadUnits.Add(1001);
+                        self.TransferUnitsToNewTower();
                         return;
                     }
                     else if ("Tower2".Equals(parames[1]))