Пример #1
0
 public static void AddBlackListZone(WoWUnit unit)
 {
     try
     {
         var danger = new DangerousZone(unit);
         if (IsBlackListedZone(danger.Position, danger.ContinentId))
         {
             return;
         }
         DangerousZones.Add(danger);
         if (danger.ContinentId == Usefuls.ContinentNameMpq)
         {
             PathFinder.AddDangerousZone(danger);
         }
     }
     catch (Exception e)
     {
         Logging.WriteError("AddBlackListZone(WoWUnit unit): " + e);
     }
 }
Пример #2
0
 public static void AddBlackListZone(Point position, float radius, string continent = "")
 {
     try
     {
         if (string.IsNullOrEmpty(continent))
         {
             continent = Usefuls.ContinentNameMpq;
         }
         if (IsBlackListedZone(position, continent))
         {
             return;
         }
         var danger = new DangerousZone(position, radius, continent);
         DangerousZones.Add(danger);
         if (continent == Usefuls.ContinentNameMpq)
         {
             PathFinder.AddDangerousZone(danger);
         }
     }
     catch (Exception e)
     {
         Logging.WriteError("AddBlackListZone(Point position, float radius): " + e);
     }
 }