auto target

Fern

Бессмертный
Местный
Сообщения
233
Розыгрыши
0
Решения
2
Репутация
288
Реакции
1 128
Баллы
1 683
Хроники
  1. Interlude
Исходники
Присутствуют
Сборка
aCis
После физ атаки по персонажу у него в таргете появляется атаковавший его игрок, как и где можно это убрать, подскажите плз.
 
Обратите внимание, что данный пользователь заблокирован! Не совершайте с ним никаких сделок! Перейдите в его профиль, чтобы узнать причину блокировки.
Обратите внимание, что данный пользователь заблокирован! Не совершайте с ним никаких сделок! Перейдите в его профиль, чтобы узнать причину блокировки.
ну оно так то везде так, после обычной атаки, игроку в таргет берется игрок или существо, атаковавшее его. но это только от обычной атаки.
А ну да это я затупок:Monk:
 
После физ атаки по персонажу у него в таргете появляется атаковавший его игрок, как и где можно это убрать, подскажите плз.
Это в движке клиента.

ну оно так то везде так, после обычной атаки, игроку в таргет берется игрок или существо, атаковавшее его. но это только от обычной атаки.
Когда моб кастует скилл, то он тоже берется в таргет. Про игроков не помню.
 
Это в движке клиента.


Когда моб кастует скилл, то он тоже берется в таргет. Про игроков не помню.
Странные познания=) Это AI на сервере) Такое происходит если у вас в таргете никого нет и вы получаете физ урон, возможно даже только с автоатак работает, за физ скилы не уверен.
 
А если самую малость, чуть более подробно, если можно, что именно искать в AI?
 
I m looking also in l2jmobius and I can't find it at autoattack ..
 
это в клиенте фича. Чтобы убрать надо править dll.
 
It is a server and client option, you need to modify both, although there is also a way to "skip" this with an algorithm to fool the client, I have it implemented on my h5 server.
 
Код:
    @Override

    protected void onEvtAttacked(Creature attacker, int damage)
    {
        if ((attacker instanceof Attackable) && !((Attackable) attacker).isCoreAIDisabled())
        {
            if (_actor.isPlayer())
            {
                if (_actor.getTarget() == null)
                {
                    _actor.setTarget(attacker);
                }
 
                if (_actor.isInvul())
                {
                    return;
                }
            }
            clientStartAutoAttack();
        }
    }
в CharacterAI
 
Код:
    @Override

    protected void onEvtAttacked(Creature attacker, int damage)
    {
        if ((attacker instanceof Attackable) && !((Attackable) attacker).isCoreAIDisabled())
        {
            if (_actor.isPlayer())
            {
                if (_actor.getTarget() == null)
                {
                    _actor.setTarget(attacker);
                }
 
                if(_actor.isInvul())
                {
                    return;
                }
            }
            clientStartAutoAttack();
        }
    }
in CharacterAI
Mobius has no characterAI but I thing I will find it
 
Код:
    @Override

    protected void onEvtAttacked(Creature attacker, int damage)
    {
        if ((attacker instanceof Attackable) && !((Attackable) attacker).isCoreAIDisabled())
        {
            if (_actor.isPlayer())
            {
                if (_actor.getTarget() == null)
                {
                    _actor.setTarget(attacker);
                }
 
                if(_actor.isInvul())
                {
                    return;
                }
            }
            clientStartAutoAttack();
        }
    }
in CharacterAI
well on mobius i cant find something similar to edit.
 
well on mobius i cant find something similar to edit.
Код:
    @Override
    protected void onIntentionAttack(Creature target)
    {
        if ((target == null) || !target.isTargetable())
        {
            clientActionFailed();
            return;
        }
        
        if (getIntention() == AI_INTENTION_REST)
        {
            // Cancel action client side by sending Server->Client packet ActionFailed to the Player actor
            clientActionFailed();
            return;
        }
        
        if (_actor.isAllSkillsDisabled() || _actor.isCastingNow() || _actor.isControlBlocked())
        {
            // Cancel action client side by sending Server->Client packet ActionFailed to the Player actor
            clientActionFailed();
            return;
        }
        
        // Check if the Intention is already AI_INTENTION_ATTACK
        if (getIntention() == AI_INTENTION_ATTACK)
        {
            // Check if the AI already targets the Creature
            if (getTarget() != target)
            {
                // Set the AI attack target (change target)
                setTarget(target);
                
                // stopFollow();
                
                // Launch the Think Event
                notifyEvent(CtrlEvent.EVT_THINK, null);
            }
            else
            {
                clientActionFailed(); // else client freezes until cancel target
            }
        }
        else
        {
            // Set the Intention of this AbstractAI to AI_INTENTION_ATTACK
            changeIntention(AI_INTENTION_ATTACK, target);
            
            // Set the AI attack target
            setTarget(target);
            
            // stopFollow();
            
            // Launch the Think Event
            notifyEvent(CtrlEvent.EVT_THINK, null);
        }
    }
 
Код:
 @Override
    protected void onIntentionAttack(Creature target)
    {
        if ((target == null) || !target.isTargetable())
        {
            clientActionFailed();
            return;
        }
       
        if (getIntention() == AI_INTENTION_REST)
        {
            // Cancel action client side by sending Server->Client packet ActionFailed to the Player actor
            clientActionFailed();
            return;
        }
       
        if (_actor.isAllSkillsDisabled() || _actor.isCastingNow() || _actor.isControlBlocked())
        {
            // Cancel action client side by sending Server->Client packet ActionFailed to the Player actor
            clientActionFailed();
            return;
        }
       
        // Check if the Intention is already AI_INTENTION_ATTACK
        if (getIntention() == AI_INTENTION_ATTACK)
        {
            // Check if the AI already targets the Creature
            if (getTarget() != target)
            {
                // Set the AI attack target (change target)
                settarget(target);
               
                // stopFollow();
               
                // Launch the Think Event
                notifyEvent(CtrlEvent.EVT_THINK, null);
            }
            else
            {
                clientActionFailed(); // else client freezes until cancel target
            }
        }
        else
        {
            // Set the Intention of this AbstractAI to AI_INTENTION_ATTACK
            changeIntention(AI_INTENTION_ATTACK, target);
           
            // Set the AI attack target
            settarget(target);
           
            // stopFollow();
           
            // Launch the Think Event
            notifyEvent(CtrlEvent.EVT_THINK, null);
        }
    }


oh u mean here to edit it , i thought this was the fix , lets see what i can do. btw , ty for your time <3
 
Назад
Сверху Снизу