瀏覽代碼

删除AddUnit接口无意义的限制

大爷 1 年之前
父節點
當前提交
e205f30578
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      DotNet/Hotfix/Scenes/Game/Handler/C2G_AddUnitsToMapHandler.cs

+ 4 - 4
DotNet/Hotfix/Scenes/Game/Handler/C2G_AddUnitsToMapHandler.cs

@@ -29,7 +29,7 @@ namespace ET.Server
                 return;
             }
             // 参数判断
-            if (request.UnitId <= 0 || request.Force < 0 || request.Force > (int)AreaForce.FORCEB || request.X < 0 || request.Y < 0)
+            if (request.UnitId <= 0 || request.Force < 0 || request.Force > (int)AreaForce.FORCEB )
             {
                 Log.Debug($"参数错误...unitId={request.UnitId}, force={request.Force}");
                 response.Error = ErrorCode.ERR_ParameterError;
@@ -37,17 +37,17 @@ namespace ET.Server
                 return;
             }
             // 配置是否能找到
-            Monster prop = MonsterCategory.Instance.Get(request.UnitId);
+            /*Monster prop = MonsterCategory.Instance.Get(request.UnitId);
             if (prop == null)
             {
                 Log.Debug($"添加单位出错, 未找到配置...unitId={request.UnitId}, playerId={player.GetId()}");
                 response.Error = ErrorCode.ERR_ConfigError;
                 reply();
                 return;
-            }
+            }*/
 
             Struct.MonsterUnit unit = new Struct.MonsterUnit();
-            unit.id = prop.Id;
+            unit.id = request.UnitId;
             unit.force = request.Force;
             if (!string.IsNullOrEmpty(request.Flag))
             {