Ejemplo n.º 1
0
 public static boolean moveSpot(NPC npc) {
   int key = npc.getTileHash();
   Integer spot = moveSpots.get(key);
   if (spot == null && moveSpots.containsValue(key)) {
     for (Integer k : moveSpots.keySet()) {
       Integer v = moveSpots.get(k);
       if (v == key) {
         spot = k;
         break;
       }
     }
   }
   if (spot == null) return false;
   npc.setNextWorldTile(new WorldTile(spot));
   return true;
 }