Browse Source

屏蔽游戏服的死亡复活功能,准备使用编辑器配置RebirthTimeMS让战斗服控制复活

大爷 1 year ago
parent
commit
a1edba9996
1 changed files with 6 additions and 6 deletions
  1. 6 6
      DotNet/Hotfix/Scenes/Game/Map/MapEventComponentSystem.cs

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

@@ -53,7 +53,7 @@ namespace ET.Server
         public static void OnUnitDead(this MapEventComponent self, Map map, JObject msg)
         {
             int unitType = Convert.ToInt32(msg.SelectToken("unitType"));
-            int objId = Convert.ToInt32(msg.SelectToken("objId"));
+            /*int objId = Convert.ToInt32(msg.SelectToken("objId"));
             int posX = Convert.ToInt32(msg.SelectToken("posX"));
             int posY = Convert.ToInt32(msg.SelectToken("posY"));
             // 攻击者
@@ -71,7 +71,7 @@ namespace ET.Server
             if (hitFinalPlayer == null && hitFinalPlayerId > 0)
             {
                 hitFinalPlayer = map.GetPlayer(hitFinalPlayerId);
-            }
+            }*/
 
             switch (unitType)
             {
@@ -94,7 +94,7 @@ namespace ET.Server
                         }
                     }
                     // 如果是单位玩家
-                    if (map.UnitObjIds.ContainsValue(objId) && !map.IsGameOver())
+                    /*if (map.UnitObjIds.ContainsValue(objId) && !map.IsGameOver())
                     {
                         Log.Debug($"单位死亡...objId={objId}, unitTemplateId={unitTemplateId}, posX={posX}, posY={posY}");
 
@@ -121,10 +121,10 @@ namespace ET.Server
 
                             map.UnitObjIds.Remove(unitOpenId);
                         }
-                    }
+                    }*/
 
                     break;
-                case 1:
+                /*case 1:
                     // 玩家死亡(主播死亡立即复活)
                     long unitPlayerId = Convert.ToInt64(msg.SelectToken("unitPlayerId"));
 
@@ -151,7 +151,7 @@ namespace ET.Server
                     break;
                 case 2:
                     // 宠物死亡
-                    break;
+                    break;*/
             }
         }