|
@@ -46,7 +46,7 @@ import com.l2jserver.gameserver.network.serverpackets.MagicSkillUse;
|
|
import com.l2jserver.gameserver.taskmanager.AttackStanceTaskManager;
|
|
import com.l2jserver.gameserver.taskmanager.AttackStanceTaskManager;
|
|
import com.l2jserver.util.Rnd;
|
|
import com.l2jserver.util.Rnd;
|
|
|
|
|
|
-public class L2CubicInstance
|
|
|
|
|
|
+public final class L2CubicInstance
|
|
{
|
|
{
|
|
protected static final Logger _log = Logger.getLogger(L2CubicInstance.class.getName());
|
|
protected static final Logger _log = Logger.getLogger(L2CubicInstance.class.getName());
|
|
|
|
|
|
@@ -470,10 +470,9 @@ public class L2CubicInstance
|
|
{
|
|
{
|
|
private final int _chance;
|
|
private final int _chance;
|
|
|
|
|
|
- Action(int chance)
|
|
|
|
|
|
+ protected Action(int chance)
|
|
{
|
|
{
|
|
_chance = chance;
|
|
_chance = chance;
|
|
- // run task
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -727,65 +726,6 @@ public class L2CubicInstance
|
|
|
|
|
|
switch (type)
|
|
switch (type)
|
|
{
|
|
{
|
|
- case STUN:
|
|
|
|
- {
|
|
|
|
- if (Formulas.calcCubicSkillSuccess(activeCubic, target, skill, shld))
|
|
|
|
- {
|
|
|
|
- // if this is a debuff let the duel manager know about it
|
|
|
|
- // so the debuff can be removed after the duel
|
|
|
|
- // (player & target must be in the same duel)
|
|
|
|
- if (target instanceof L2PcInstance
|
|
|
|
- && ((L2PcInstance) target).isInDuel()
|
|
|
|
- && skill.getSkillType() == L2SkillType.DEBUFF
|
|
|
|
- && activeCubic.getOwner().getDuelId() == ((L2PcInstance) target).getDuelId())
|
|
|
|
- {
|
|
|
|
- DuelManager dm = DuelManager.getInstance();
|
|
|
|
- for (L2Effect debuff : skill.getEffects(activeCubic.getOwner(), target))
|
|
|
|
- if (debuff != null)
|
|
|
|
- dm.onBuff(((L2PcInstance) target), debuff);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- skill.getEffects(activeCubic, target, null);
|
|
|
|
- if (Config.DEBUG)
|
|
|
|
- _log.info("Disablers: useCubicSkill() -> success");
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- if (Config.DEBUG)
|
|
|
|
- _log.info("Disablers: useCubicSkill() -> failed");
|
|
|
|
- }
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- case PARALYZE: // use same as root for now
|
|
|
|
- {
|
|
|
|
- if (Formulas.calcCubicSkillSuccess(activeCubic, target, skill, shld))
|
|
|
|
- {
|
|
|
|
- // if this is a debuff let the duel manager know about it
|
|
|
|
- // so the debuff can be removed after the duel
|
|
|
|
- // (player & target must be in the same duel)
|
|
|
|
- if (target instanceof L2PcInstance
|
|
|
|
- && ((L2PcInstance) target).isInDuel()
|
|
|
|
- && skill.getSkillType() == L2SkillType.DEBUFF
|
|
|
|
- && activeCubic.getOwner().getDuelId() == ((L2PcInstance) target).getDuelId())
|
|
|
|
- {
|
|
|
|
- DuelManager dm = DuelManager.getInstance();
|
|
|
|
- for (L2Effect debuff : skill.getEffects(activeCubic.getOwner(), target))
|
|
|
|
- if (debuff != null)
|
|
|
|
- dm.onBuff(((L2PcInstance) target), debuff);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- skill.getEffects(activeCubic, target, null);
|
|
|
|
-
|
|
|
|
- if (Config.DEBUG)
|
|
|
|
- _log.info("Disablers: useCubicSkill() -> success");
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- if (Config.DEBUG)
|
|
|
|
- _log.info("Disablers: useCubicSkill() -> failed");
|
|
|
|
- }
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
case CANCEL_DEBUFF:
|
|
case CANCEL_DEBUFF:
|
|
{
|
|
{
|
|
L2Effect[] effects = target.getAllEffects();
|
|
L2Effect[] effects = target.getAllEffects();
|
|
@@ -811,6 +751,8 @@ public class L2CubicInstance
|
|
|
|
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
+ case STUN:
|
|
|
|
+ case PARALYZE:
|
|
case ROOT:
|
|
case ROOT:
|
|
{
|
|
{
|
|
if (Formulas.calcCubicSkillSuccess(activeCubic, target, skill, shld))
|
|
if (Formulas.calcCubicSkillSuccess(activeCubic, target, skill, shld))
|
|
@@ -968,14 +910,8 @@ public class L2CubicInstance
|
|
return _givenByOther;
|
|
return _givenByOther;
|
|
}
|
|
}
|
|
|
|
|
|
- private class Heal implements Runnable
|
|
|
|
|
|
+ protected class Heal implements Runnable
|
|
{
|
|
{
|
|
-
|
|
|
|
- Heal()
|
|
|
|
- {
|
|
|
|
- // run task
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
@Override
|
|
@Override
|
|
public void run()
|
|
public void run()
|
|
{
|
|
{
|