Exemple #1
0
  public synchronized void removeInvalidCharacter(L1NpcInstance npc) {
    ArrayList<L1Character> invalidChars = new ArrayList<L1Character>();
    for (L1Character cha : _hateMap.keySet()) {
      if (cha == null || cha.isDead() || !npc.getNearObjects().knownsObject(cha)) {
        invalidChars.add(cha);
      }
    }

    for (L1Character cha : invalidChars) {
      _hateMap.remove(cha);
    }
  }
 @Override
 public void run() {
   _npc.deleteMe();
   this.cancel();
 }