예제 #1
0
  @Override
  protected boolean thinkActive() {
    NpcInstance actor = getActor();
    if (actor.isDead()) return false;

    GArray<NpcInstance> around = actor.getAroundNpc(3000, 3000);
    if (around != null && !around.isEmpty())
      for (NpcInstance npc : around)
        if (npc.isMonster()) actor.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, npc, 300);
    return true;
  }
예제 #2
0
  @Override
  protected boolean thinkActive() {
    NpcInstance actor = getActor();
    if (actor.isDead()) {
      return false;
    }

    GArray<NpcInstance> around = actor.getAroundNpc(2000, 1000);
    if (around != null && !around.isEmpty()) {
      for (NpcInstance npc : around) {
        if (npc.getNpcId() != 19153 && npc.getNpcId() != 19152) {
          actor.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, npc, 3);
        }
      }
    }
    return true;
  }