All mobs with routes can see silent move.

Issue #349 resolved
Milan created an issue

No description provided.

Comments (5)

  1. ShinichiYao

    NpcKnownList.java

    // Support for Walking monsters aggro
    protected class TrackingTask implements Runnable {
        @Override
        public void run() {
            if (!getActiveChar().isAttackable()) {
                return;
            }
    
            final L2Attackable monster = (L2Attackable) getActiveChar();
    +       if (monster == null) {
    +           return;
    +       }
    +       if (!monster.isAggressive()) {
    +           return;
    +       }
            if (monster.getAI().getIntention() != CtrlIntention.AI_INTENTION_MOVE_TO) {
                return;
            }
    
            for (L2PcInstance pl : getKnownPlayers().values()) {
                if (!pl.isDead() && !pl.isInvul() && pl.isInsideRadius(monster, monster.getAggroRange(), true, false) && (monster.isMonster() || (monster.isInstanceTypes(InstanceType.L2GuardInstance) && (pl.getKarma() > 0)))) {
    +               if (!monster.canSeeThroughSilentMove() && pl.isSilentMovingAffected()) {
    +                   continue;
    +               }
    
                    // Send aggroRangeEnter
                    if (monster.getHating(pl) == 0) {
                        monster.addDamageHate(pl, 0, 0);
                    }
    
                    // Skip attack for other targets, if one is already chosen for attack
                    if ((monster.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK) && !monster.isCoreAIDisabled()) {
                        WalkingManager.getInstance().stopMoving(getActiveChar(), false, true);
                        monster.addDamageHate(pl, 0, 100);
                        monster.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, pl, null);
                    }
                }
            }
        }
    }
    

  2. Log in to comment