[en] When i play Turantom on server and at a spam abill charms should not attack by pressing "the camp" button for example, I press abill = it stuned and continues to attack, so should not be.
[ru] Когда я юзаю абилку, например нажимаю стан, он станит, а после продолжает атаковать. Как можно это отключить? Где это в AI?
http://www.l2jserver.com/trac/ticket/4005
AutoAttack AI
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- Posts: 186
- Joined: Wed Jun 24, 2009 10:01 am
Re: AutoAttack AI
L2Character
* auto-attack after casting only if the skill was a melee skill, or the target is almost inside the attack range
* for example won't start auto-attacking automatically after a sonic attack was fired from it's cast range (500+)
L2character.java
* auto-attack after casting only if the skill was a melee skill, or the target is almost inside the attack range
* for example won't start auto-attacking automatically after a sonic attack was fired from it's cast range (500+)
L2character.java
Code: Select all
final L2Object currentTarget = L2Object.getActingCharacter(getTarget()); +L2Object newTarget = null; if (originalSkillTarget != null && originalSkillTarget != this && originalSkillTarget == currentTarget) -getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, originalSkillTarget); +newTarget = originalSkillTarget; else if (originalTarget != null && originalTarget != this && originalTarget == currentTarget) -getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, originalTarget); +newTarget = originalTarget; if (//As far as I remember, you can move away after launching a skill without hitting getAI().getIntention() != AI_INTENTION_MOVE_TO //And you will not auto-attack a non-flagged player after launching a skill && newTarget != null && newTarget.isAutoAttackable(this)) { double distance = Util.calculateDistance(this, newTarget, false); // if the skill is melee, or almost in the range of a normal attack if (getMagicalAttackRange(skill) < 200 || getPhysicalAttackRange() + 200 > distance) getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, newTarget); }