Exemple #1
0
 public Fightable getFightableNear(Area area, int uID)
 {
     for (int i = 0; i < 3; i++)
     {
         for (int u = 0; u < 3; u++)
         {
             Area nearCentral = getArea(new int[] { area.getAreaPosition()[0] - 1 + i, area.getAreaPosition()[1] - 1 + u });
             if (nearCentral == null)
             {
                 continue;
             }
             foreach (Fightable f in nearCentral.getMobs())
             {
                 if (f.getuID() == uID)
                 {
                     return(f);
                 }
             }
             foreach (Fightable f in nearCentral.getCharacters())
             {
                 if (f.getuID() == uID)
                 {
                     return(f);
                 }
             }
         }
     }
     return(null);
 }
Exemple #2
0
 public void addToSynchronizedAreas(Area area)
 {
     if (synchronizedAreas.Contains(area))
     {
         return;
     }
     if (area.getMobs().Count == 0)
     {
         return;
     }
     synchronizedAreas.Add(area);
     //MobThreadPool.run();
 }
Exemple #3
0
 public void addToSynchronizedAreas(Area area)
 {
     if(synchronizedAreas.Contains(area))
         return;
     if(area.getMobs().Count == 0)
         return;
     synchronizedAreas.Add(area);
     //MobThreadPool.run();
 }