Esempio n. 1
0
 @Override
 protected void onEvtThink() {
   super.onEvtThink();
   if (!getActor().getAggroList().isEmpty()) {
     List<Creature> chars = World.getAroundCharacters(getActor());
     CollectionUtils.eqSort(chars, _nearestTargetComparator);
     for (Creature cha : chars) {
       if (getActor().getAggroList().get(cha) != null && checkAggression(cha)) {
         Skill sk = SkillTable.getInstance().getInfo(SKILL_ID, 1);
         if (lastCastTime + sk.getHitTime() + sk.getReuseDelay() <= System.currentTimeMillis()) {
           lastCastTime = System.currentTimeMillis();
           addTaskCast(cha, sk);
         }
       }
     }
   }
 }