Prevent raidboss exploiting by using disabling skills.
This commit is contained in:
@@ -60,6 +60,11 @@ public final class BlockActions extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill);
|
||||
effected.startParalyze();
|
||||
// Cancel running skill casters.
|
||||
|
@@ -54,10 +54,14 @@ public final class Fear extends AbstractEffect
|
||||
@Override
|
||||
public boolean canStart(L2Character effector, L2Character effected, Skill skill)
|
||||
{
|
||||
final L2Character creature = effected;
|
||||
return creature.isPlayer() || creature.isSummon() || (creature.isAttackable() && //
|
||||
!((creature instanceof L2DefenderInstance) || (creature instanceof L2FortCommanderInstance) || //
|
||||
(creature instanceof L2SiegeFlagInstance) || (creature.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return effected.isPlayer() || effected.isSummon() || (effected.isAttackable() //
|
||||
&& !((effected instanceof L2DefenderInstance) || (effected instanceof L2FortCommanderInstance) //
|
||||
|| (effected instanceof L2SiegeFlagInstance) || (effected.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -150,6 +150,11 @@ public final class KnockBack extends AbstractEffect
|
||||
|
||||
private void knockBack(L2Character effector, L2Character effected)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected));
|
||||
final int x = (int) (effected.getX() + (_distance * Math.cos(radians)));
|
||||
final int y = (int) (effected.getY() + (_distance * Math.sin(radians)));
|
||||
|
@@ -49,6 +49,11 @@ public final class Mute extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.abortCast();
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_MUTED);
|
||||
}
|
||||
|
@@ -61,6 +61,12 @@ public final class PullBack extends AbstractEffect
|
||||
@Override
|
||||
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
// Prevent pulling raids.
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent pulling NPCs.
|
||||
if (!effected.isPlayable() && !effected.isMonster())
|
||||
{
|
||||
|
@@ -59,6 +59,11 @@ public final class Root extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.stopMove(null);
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_ROOTED);
|
||||
}
|
||||
|
@@ -60,6 +60,11 @@ public final class BlockActions extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill);
|
||||
effected.startParalyze();
|
||||
// Cancel running skill casters.
|
||||
|
@@ -54,10 +54,14 @@ public final class Fear extends AbstractEffect
|
||||
@Override
|
||||
public boolean canStart(L2Character effector, L2Character effected, Skill skill)
|
||||
{
|
||||
final L2Character creature = effected;
|
||||
return creature.isPlayer() || creature.isSummon() || (creature.isAttackable() && //
|
||||
!((creature instanceof L2DefenderInstance) || (creature instanceof L2FortCommanderInstance) || //
|
||||
(creature instanceof L2SiegeFlagInstance) || (creature.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return effected.isPlayer() || effected.isSummon() || (effected.isAttackable() //
|
||||
&& !((effected instanceof L2DefenderInstance) || (effected instanceof L2FortCommanderInstance) //
|
||||
|| (effected instanceof L2SiegeFlagInstance) || (effected.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -150,6 +150,11 @@ public final class KnockBack extends AbstractEffect
|
||||
|
||||
private void knockBack(L2Character effector, L2Character effected)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected));
|
||||
final int x = (int) (effected.getX() + (_distance * Math.cos(radians)));
|
||||
final int y = (int) (effected.getY() + (_distance * Math.sin(radians)));
|
||||
|
@@ -49,6 +49,11 @@ public final class Mute extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.abortCast();
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_MUTED);
|
||||
}
|
||||
|
@@ -61,6 +61,12 @@ public final class PullBack extends AbstractEffect
|
||||
@Override
|
||||
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
// Prevent pulling raids.
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent pulling NPCs.
|
||||
if (!effected.isPlayable() && !effected.isMonster())
|
||||
{
|
||||
|
@@ -59,6 +59,11 @@ public final class Root extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.stopMove(null);
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_ROOTED);
|
||||
}
|
||||
|
@@ -60,6 +60,11 @@ public final class BlockActions extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill);
|
||||
effected.startParalyze();
|
||||
// Cancel running skill casters.
|
||||
|
@@ -54,10 +54,14 @@ public final class Fear extends AbstractEffect
|
||||
@Override
|
||||
public boolean canStart(L2Character effector, L2Character effected, Skill skill)
|
||||
{
|
||||
final L2Character creature = effected;
|
||||
return creature.isPlayer() || creature.isSummon() || (creature.isAttackable() && //
|
||||
!((creature instanceof L2DefenderInstance) || (creature instanceof L2FortCommanderInstance) || //
|
||||
(creature instanceof L2SiegeFlagInstance) || (creature.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return effected.isPlayer() || effected.isSummon() || (effected.isAttackable() //
|
||||
&& !((effected instanceof L2DefenderInstance) || (effected instanceof L2FortCommanderInstance) //
|
||||
|| (effected instanceof L2SiegeFlagInstance) || (effected.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -150,6 +150,11 @@ public final class KnockBack extends AbstractEffect
|
||||
|
||||
private void knockBack(L2Character effector, L2Character effected)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected));
|
||||
final int x = (int) (effected.getX() + (_distance * Math.cos(radians)));
|
||||
final int y = (int) (effected.getY() + (_distance * Math.sin(radians)));
|
||||
|
@@ -49,6 +49,11 @@ public final class Mute extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.abortCast();
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_MUTED);
|
||||
}
|
||||
|
@@ -61,6 +61,12 @@ public final class PullBack extends AbstractEffect
|
||||
@Override
|
||||
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
// Prevent pulling raids.
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent pulling NPCs.
|
||||
if (!effected.isPlayable() && !effected.isMonster())
|
||||
{
|
||||
|
@@ -59,6 +59,11 @@ public final class Root extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.stopMove(null);
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_ROOTED);
|
||||
}
|
||||
|
@@ -60,6 +60,11 @@ public final class BlockActions extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill);
|
||||
effected.startParalyze();
|
||||
// Cancel running skill casters.
|
||||
|
@@ -54,10 +54,14 @@ public final class Fear extends AbstractEffect
|
||||
@Override
|
||||
public boolean canStart(L2Character effector, L2Character effected, Skill skill)
|
||||
{
|
||||
final L2Character creature = effected;
|
||||
return creature.isPlayer() || creature.isSummon() || (creature.isAttackable() && //
|
||||
!((creature instanceof L2DefenderInstance) || (creature instanceof L2FortCommanderInstance) || //
|
||||
(creature instanceof L2SiegeFlagInstance) || (creature.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return effected.isPlayer() || effected.isSummon() || (effected.isAttackable() //
|
||||
&& !((effected instanceof L2DefenderInstance) || (effected instanceof L2FortCommanderInstance) //
|
||||
|| (effected instanceof L2SiegeFlagInstance) || (effected.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -150,6 +150,11 @@ public final class KnockBack extends AbstractEffect
|
||||
|
||||
private void knockBack(L2Character effector, L2Character effected)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected));
|
||||
final int x = (int) (effected.getX() + (_distance * Math.cos(radians)));
|
||||
final int y = (int) (effected.getY() + (_distance * Math.sin(radians)));
|
||||
|
@@ -49,6 +49,11 @@ public final class Mute extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.abortCast();
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_MUTED);
|
||||
}
|
||||
|
@@ -61,6 +61,12 @@ public final class PullBack extends AbstractEffect
|
||||
@Override
|
||||
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
// Prevent pulling raids.
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent pulling NPCs.
|
||||
if (!effected.isPlayable() && !effected.isMonster())
|
||||
{
|
||||
|
@@ -59,6 +59,11 @@ public final class Root extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.stopMove(null);
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_ROOTED);
|
||||
}
|
||||
|
@@ -60,6 +60,11 @@ public final class BlockActions extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill);
|
||||
effected.startParalyze();
|
||||
// Cancel running skill casters.
|
||||
|
@@ -54,10 +54,14 @@ public final class Fear extends AbstractEffect
|
||||
@Override
|
||||
public boolean canStart(L2Character effector, L2Character effected, Skill skill)
|
||||
{
|
||||
final L2Character creature = effected;
|
||||
return creature.isPlayer() || creature.isSummon() || (creature.isAttackable() && //
|
||||
!((creature instanceof L2DefenderInstance) || (creature instanceof L2FortCommanderInstance) || //
|
||||
(creature instanceof L2SiegeFlagInstance) || (creature.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return effected.isPlayer() || effected.isSummon() || (effected.isAttackable() //
|
||||
&& !((effected instanceof L2DefenderInstance) || (effected instanceof L2FortCommanderInstance) //
|
||||
|| (effected instanceof L2SiegeFlagInstance) || (effected.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -150,6 +150,11 @@ public final class KnockBack extends AbstractEffect
|
||||
|
||||
private void knockBack(L2Character effector, L2Character effected)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected));
|
||||
final int x = (int) (effected.getX() + (_distance * Math.cos(radians)));
|
||||
final int y = (int) (effected.getY() + (_distance * Math.sin(radians)));
|
||||
|
@@ -49,6 +49,11 @@ public final class Mute extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.abortCast();
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_MUTED);
|
||||
}
|
||||
|
@@ -61,6 +61,12 @@ public final class PullBack extends AbstractEffect
|
||||
@Override
|
||||
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
// Prevent pulling raids.
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent pulling NPCs.
|
||||
if (!effected.isPlayable() && !effected.isMonster())
|
||||
{
|
||||
|
@@ -59,6 +59,11 @@ public final class Root extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.stopMove(null);
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_ROOTED);
|
||||
}
|
||||
|
@@ -60,6 +60,11 @@ public final class BlockActions extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill);
|
||||
effected.startParalyze();
|
||||
// Cancel running skill casters.
|
||||
|
@@ -54,10 +54,14 @@ public final class Fear extends AbstractEffect
|
||||
@Override
|
||||
public boolean canStart(L2Character effector, L2Character effected, Skill skill)
|
||||
{
|
||||
final L2Character creature = effected;
|
||||
return creature.isPlayer() || creature.isSummon() || (creature.isAttackable() && //
|
||||
!((creature instanceof L2DefenderInstance) || (creature instanceof L2FortCommanderInstance) || //
|
||||
(creature instanceof L2SiegeFlagInstance) || (creature.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return effected.isPlayer() || effected.isSummon() || (effected.isAttackable() //
|
||||
&& !((effected instanceof L2DefenderInstance) || (effected instanceof L2FortCommanderInstance) //
|
||||
|| (effected instanceof L2SiegeFlagInstance) || (effected.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -150,6 +150,11 @@ public final class KnockBack extends AbstractEffect
|
||||
|
||||
private void knockBack(L2Character effector, L2Character effected)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected));
|
||||
final int x = (int) (effected.getX() + (_distance * Math.cos(radians)));
|
||||
final int y = (int) (effected.getY() + (_distance * Math.sin(radians)));
|
||||
|
@@ -49,6 +49,11 @@ public final class Mute extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.abortCast();
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_MUTED);
|
||||
}
|
||||
|
@@ -61,6 +61,12 @@ public final class PullBack extends AbstractEffect
|
||||
@Override
|
||||
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
// Prevent pulling raids.
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent pulling NPCs.
|
||||
if (!effected.isPlayable() && !effected.isMonster())
|
||||
{
|
||||
|
@@ -59,6 +59,11 @@ public final class Root extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.stopMove(null);
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_ROOTED);
|
||||
}
|
||||
|
@@ -60,6 +60,11 @@ public final class BlockActions extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill);
|
||||
effected.startParalyze();
|
||||
// Cancel running skill casters.
|
||||
|
@@ -54,10 +54,14 @@ public final class Fear extends AbstractEffect
|
||||
@Override
|
||||
public boolean canStart(L2Character effector, L2Character effected, Skill skill)
|
||||
{
|
||||
final L2Character creature = effected;
|
||||
return creature.isPlayer() || creature.isSummon() || (creature.isAttackable() && //
|
||||
!((creature instanceof L2DefenderInstance) || (creature instanceof L2FortCommanderInstance) || //
|
||||
(creature instanceof L2SiegeFlagInstance) || (creature.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return effected.isPlayer() || effected.isSummon() || (effected.isAttackable() //
|
||||
&& !((effected instanceof L2DefenderInstance) || (effected instanceof L2FortCommanderInstance) //
|
||||
|| (effected instanceof L2SiegeFlagInstance) || (effected.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -150,6 +150,11 @@ public final class KnockBack extends AbstractEffect
|
||||
|
||||
private void knockBack(L2Character effector, L2Character effected)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected));
|
||||
final int x = (int) (effected.getX() + (_distance * Math.cos(radians)));
|
||||
final int y = (int) (effected.getY() + (_distance * Math.sin(radians)));
|
||||
|
@@ -49,6 +49,11 @@ public final class Mute extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.abortCast();
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_MUTED);
|
||||
}
|
||||
|
@@ -61,6 +61,12 @@ public final class PullBack extends AbstractEffect
|
||||
@Override
|
||||
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
// Prevent pulling raids.
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent pulling NPCs.
|
||||
if (!effected.isPlayable() && !effected.isMonster())
|
||||
{
|
||||
|
@@ -59,6 +59,11 @@ public final class Root extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.stopMove(null);
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_ROOTED);
|
||||
}
|
||||
|
@@ -60,6 +60,11 @@ public final class BlockActions extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill);
|
||||
effected.startParalyze();
|
||||
// Cancel running skill casters.
|
||||
|
@@ -54,10 +54,14 @@ public final class Fear extends AbstractEffect
|
||||
@Override
|
||||
public boolean canStart(L2Character effector, L2Character effected, Skill skill)
|
||||
{
|
||||
final L2Character creature = effected;
|
||||
return creature.isPlayer() || creature.isSummon() || (creature.isAttackable() && //
|
||||
!((creature instanceof L2DefenderInstance) || (creature instanceof L2FortCommanderInstance) || //
|
||||
(creature instanceof L2SiegeFlagInstance) || (creature.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return effected.isPlayer() || effected.isSummon() || (effected.isAttackable() //
|
||||
&& !((effected instanceof L2DefenderInstance) || (effected instanceof L2FortCommanderInstance) //
|
||||
|| (effected instanceof L2SiegeFlagInstance) || (effected.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -102,6 +102,11 @@ public final class KnockBack extends AbstractEffect
|
||||
|
||||
private void knockBack(L2Character effector, L2Character effected)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected));
|
||||
final int x = (int) (effected.getX() + (_distance * Math.cos(radians)));
|
||||
final int y = (int) (effected.getY() + (_distance * Math.sin(radians)));
|
||||
|
@@ -49,6 +49,11 @@ public final class Mute extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.abortCast();
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_MUTED);
|
||||
}
|
||||
|
@@ -61,6 +61,12 @@ public final class PullBack extends AbstractEffect
|
||||
@Override
|
||||
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
// Prevent pulling raids.
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent pulling NPCs.
|
||||
if (!effected.isPlayable() && !effected.isMonster())
|
||||
{
|
||||
|
@@ -59,6 +59,11 @@ public final class Root extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.stopMove(null);
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_ROOTED);
|
||||
}
|
||||
|
@@ -60,6 +60,11 @@ public final class BlockActions extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill);
|
||||
effected.startParalyze();
|
||||
// Cancel running skill casters.
|
||||
|
@@ -54,10 +54,14 @@ public final class Fear extends AbstractEffect
|
||||
@Override
|
||||
public boolean canStart(L2Character effector, L2Character effected, Skill skill)
|
||||
{
|
||||
final L2Character creature = effected;
|
||||
return creature.isPlayer() || creature.isSummon() || (creature.isAttackable() && //
|
||||
!((creature instanceof L2DefenderInstance) || (creature instanceof L2FortCommanderInstance) || //
|
||||
(creature instanceof L2SiegeFlagInstance) || (creature.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return effected.isPlayer() || effected.isSummon() || (effected.isAttackable() //
|
||||
&& !((effected instanceof L2DefenderInstance) || (effected instanceof L2FortCommanderInstance) //
|
||||
|| (effected instanceof L2SiegeFlagInstance) || (effected.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -102,6 +102,11 @@ public final class KnockBack extends AbstractEffect
|
||||
|
||||
private void knockBack(L2Character effector, L2Character effected)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected));
|
||||
final int x = (int) (effected.getX() + (_distance * Math.cos(radians)));
|
||||
final int y = (int) (effected.getY() + (_distance * Math.sin(radians)));
|
||||
|
@@ -49,6 +49,11 @@ public final class Mute extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.abortCast();
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_MUTED);
|
||||
}
|
||||
|
@@ -61,6 +61,12 @@ public final class PullBack extends AbstractEffect
|
||||
@Override
|
||||
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
// Prevent pulling raids.
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent pulling NPCs.
|
||||
if (!effected.isPlayable() && !effected.isMonster())
|
||||
{
|
||||
|
@@ -59,6 +59,11 @@ public final class Root extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.stopMove(null);
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_ROOTED);
|
||||
}
|
||||
|
@@ -60,6 +60,11 @@ public final class BlockActions extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill);
|
||||
effected.startParalyze();
|
||||
// Cancel running skill casters.
|
||||
|
@@ -54,10 +54,14 @@ public final class Fear extends AbstractEffect
|
||||
@Override
|
||||
public boolean canStart(L2Character effector, L2Character effected, Skill skill)
|
||||
{
|
||||
final L2Character creature = effected;
|
||||
return creature.isPlayer() || creature.isSummon() || (creature.isAttackable() && //
|
||||
!((creature instanceof L2DefenderInstance) || (creature instanceof L2FortCommanderInstance) || //
|
||||
(creature instanceof L2SiegeFlagInstance) || (creature.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return effected.isPlayer() || effected.isSummon() || (effected.isAttackable() //
|
||||
&& !((effected instanceof L2DefenderInstance) || (effected instanceof L2FortCommanderInstance) //
|
||||
|| (effected instanceof L2SiegeFlagInstance) || (effected.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -102,6 +102,11 @@ public final class KnockBack extends AbstractEffect
|
||||
|
||||
private void knockBack(L2Character effector, L2Character effected)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected));
|
||||
final int x = (int) (effected.getX() + (_distance * Math.cos(radians)));
|
||||
final int y = (int) (effected.getY() + (_distance * Math.sin(radians)));
|
||||
|
@@ -49,6 +49,11 @@ public final class Mute extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.abortCast();
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_MUTED);
|
||||
}
|
||||
|
@@ -61,6 +61,12 @@ public final class PullBack extends AbstractEffect
|
||||
@Override
|
||||
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
// Prevent pulling raids.
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent pulling NPCs.
|
||||
if (!effected.isPlayable() && !effected.isMonster())
|
||||
{
|
||||
|
@@ -59,6 +59,11 @@ public final class Root extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.stopMove(null);
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_ROOTED);
|
||||
}
|
||||
|
@@ -60,6 +60,11 @@ public final class BlockActions extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill);
|
||||
effected.startParalyze();
|
||||
// Cancel running skill casters.
|
||||
|
@@ -54,10 +54,14 @@ public final class Fear extends AbstractEffect
|
||||
@Override
|
||||
public boolean canStart(L2Character effector, L2Character effected, Skill skill)
|
||||
{
|
||||
final L2Character creature = effected;
|
||||
return creature.isPlayer() || creature.isSummon() || (creature.isAttackable() && //
|
||||
!((creature instanceof L2DefenderInstance) || (creature instanceof L2FortCommanderInstance) || //
|
||||
(creature instanceof L2SiegeFlagInstance) || (creature.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return effected.isPlayer() || effected.isSummon() || (effected.isAttackable() //
|
||||
&& !((effected instanceof L2DefenderInstance) || (effected instanceof L2FortCommanderInstance) //
|
||||
|| (effected instanceof L2SiegeFlagInstance) || (effected.getTemplate().getRace() == Race.SIEGE_WEAPON)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -102,6 +102,11 @@ public final class KnockBack extends AbstractEffect
|
||||
|
||||
private void knockBack(L2Character effector, L2Character effected)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final double radians = Math.toRadians(Util.calculateAngleFrom(effector, effected));
|
||||
final int x = (int) (effected.getX() + (_distance * Math.cos(radians)));
|
||||
final int y = (int) (effected.getY() + (_distance * Math.sin(radians)));
|
||||
|
@@ -49,6 +49,11 @@ public final class Mute extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.abortCast();
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_MUTED);
|
||||
}
|
||||
|
@@ -61,6 +61,12 @@ public final class PullBack extends AbstractEffect
|
||||
@Override
|
||||
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
// Prevent pulling raids.
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent pulling NPCs.
|
||||
if (!effected.isPlayable() && !effected.isMonster())
|
||||
{
|
||||
|
@@ -59,6 +59,11 @@ public final class Root extends AbstractEffect
|
||||
@Override
|
||||
public void onStart(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||
{
|
||||
if ((effected == null) || effected.isRaid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
effected.stopMove(null);
|
||||
effected.getAI().notifyEvent(CtrlEvent.EVT_ROOTED);
|
||||
}
|
||||
|
Reference in New Issue
Block a user