Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: java/com/l2jserver/gameserver/ai/L2AttackableAI.java
- ===================================================================
- --- java/com/l2jserver/gameserver/ai/L2AttackableAI.java (revision 5011)
- +++ java/com/l2jserver/gameserver/ai/L2AttackableAI.java (working copy)
- @@ -924,7 +924,7 @@
- {
- if (sk.getTargetType() == L2TargetType.TARGET_SELF)
- continue;
- - if ((sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.isMagic() && npc.isMuted()) || (!sk.isMagic() && npc.isPhysicalMuted())))
- + if ((sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.isMagic() && npc.isMuted() && !sk.ignoreSkillMute()) || (!sk.isMagic() && npc.isPhysicalMuted() && !sk.ignoreSkillMute())))
- {
- continue;
- }
- @@ -946,7 +946,7 @@
- if (Rnd.get(100) < (100 - percentage) / 3)
- for (L2Skill sk : _skillrender._healskills)
- {
- - if ((sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.isMagic() && npc.isMuted())) || (!sk.isMagic() && npc.isPhysicalMuted()))
- + if ((sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.isMagic() && npc.isMuted() && !sk.ignoreSkillMute())) || (!sk.isMagic() && npc.isPhysicalMuted() && !sk.ignoreSkillMute()))
- {
- continue;
- }
- @@ -957,7 +957,7 @@
- }
- for (L2Skill sk : _skillrender._healskills)
- {
- - if ((sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.isMagic() && npc.isMuted())) || (!sk.isMagic() && npc.isPhysicalMuted()))
- + if ((sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.isMagic() && npc.isMuted() && !sk.ignoreSkillMute())) || (!sk.isMagic() && npc.isPhysicalMuted() && !sk.ignoreSkillMute()))
- {
- continue;
- }
- @@ -1002,7 +1002,7 @@
- {
- if (sk.getTargetType() == L2TargetType.TARGET_SELF)
- continue;
- - if ((sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.isMagic() && npc.isMuted()) || (!sk.isMagic() && npc.isPhysicalMuted())))
- + if ((sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.isMagic() && npc.isMuted() && !sk.ignoreSkillMute()) || (!sk.isMagic() && npc.isPhysicalMuted() && !sk.ignoreSkillMute())))
- {
- continue;
- }
- @@ -1022,7 +1022,7 @@
- }
- for (L2Skill sk : _skillrender._resskills)
- {
- - if ((sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.isMagic() && npc.isMuted())) || (!sk.isMagic() && npc.isPhysicalMuted()))
- + if ((sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.isMagic() && npc.isMuted() && !sk.ignoreSkillMute())) || (!sk.isMagic() && npc.isPhysicalMuted() && !sk.ignoreSkillMute()))
- {
- continue;
- }
- @@ -1221,7 +1221,7 @@
- if (caster.isCastingNow() && !sk.isSimultaneousCast())
- return false;
- - if (sk.getMpConsume() >= caster.getCurrentMp() || caster.isSkillDisabled(sk) || (sk.isMagic() && caster.isMuted()) || (!sk.isMagic() && caster.isPhysicalMuted()))
- + if (sk.getMpConsume() >= caster.getCurrentMp() || caster.isSkillDisabled(sk) || (sk.isMagic() && caster.isMuted() && !sk.ignoreSkillMute()) || (!sk.isMagic() && caster.isPhysicalMuted() && !sk.ignoreSkillMute()))
- return false;
- if (getAttackTarget() == null)
- if (caster.getMostHated() != null)
- @@ -1757,7 +1757,7 @@
- {
- for (L2Skill sk : _skillrender._immobiliseskills)
- {
- - if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius() <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted()) || (!sk.isMagic() && npc.isPhysicalMuted()))
- + if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius() <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted() && !sk.ignoreSkillMute()) || (!sk.isMagic() && npc.isPhysicalMuted() && !sk.ignoreSkillMute()))
- {
- continue;
- }
- @@ -1780,7 +1780,7 @@
- {
- for (L2Skill sk : _skillrender._cotskills)
- {
- - if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius() <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted()) || (!sk.isMagic() && npc.isPhysicalMuted()))
- + if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius() <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted() && !sk.ignoreSkillMute()) || (!sk.isMagic() && npc.isPhysicalMuted() && !sk.ignoreSkillMute()))
- {
- continue;
- }
- @@ -1802,7 +1802,7 @@
- {
- for (L2Skill sk : _skillrender._debuffskills)
- {
- - if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius() <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted()) || (!sk.isMagic() && npc.isPhysicalMuted()))
- + if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius() <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted() && !sk.ignoreSkillMute()) || (!sk.isMagic() && npc.isPhysicalMuted() && !sk.ignoreSkillMute()))
- {
- continue;
- }
- @@ -1825,7 +1825,7 @@
- {
- for (L2Skill sk : _skillrender._negativeskills)
- {
- - if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius() <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted()) || (!sk.isMagic() && npc.isPhysicalMuted()))
- + if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius() <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted() && !sk.ignoreSkillMute()) || (!sk.isMagic() && npc.isPhysicalMuted() && !sk.ignoreSkillMute()))
- {
- continue;
- }
- @@ -1849,7 +1849,7 @@
- {
- for (L2Skill sk : _skillrender._atkskills)
- {
- - if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius() <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted()) || (!sk.isMagic() && npc.isPhysicalMuted()))
- + if (sk.getMpConsume() >= npc.getCurrentMp() || npc.isSkillDisabled(sk) || (sk.getCastRange() + npc.getTemplate().getCollisionRadius() + getAttackTarget().getTemplate().getCollisionRadius() <= dist2 && !canAura(sk)) || (sk.isMagic() && npc.isMuted() && !sk.ignoreSkillMute()) || (!sk.isMagic() && npc.isPhysicalMuted() && !sk.ignoreSkillMute()))
- {
- continue;
- }
- Index: java/com/l2jserver/gameserver/model/L2Skill.java
- ===================================================================
- --- java/com/l2jserver/gameserver/model/L2Skill.java (revision 5011)
- +++ java/com/l2jserver/gameserver/model/L2Skill.java (working copy)
- @@ -1,4 +1,5 @@
- /*
- +
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- @@ -266,9 +267,10 @@
- private final String _attribute;
- private final boolean _ignoreShield;
- + private final boolean _ignoreSkillMute;
- +
- private final boolean _isSuicideAttack;
- private final boolean _canBeReflected;
- -
- private final boolean _canBeDispeled;
- private final boolean _isClanSkill;
- @@ -453,6 +455,7 @@
- _maxChance = set.getInteger("maxChance", Config.MAX_DEBUFF_CHANCE);
- _stat = set.getEnum("stat", Stats.class, null);
- _ignoreShield = set.getBool("ignoreShld", false);
- + _ignoreSkillMute = set.getBool("ignoreSkillMute", false);
- _skillType = set.getEnum("skillType", L2SkillType.class);
- _effectType = set.getEnum("effectType", L2SkillType.class, null);
- _effectId = set.getInteger("effectId", 0);
- @@ -1985,6 +1988,11 @@
- return _ignoreShield;
- }
- + public boolean ignoreSkillMute()
- + {
- + return _ignoreShield;
- + }
- +
- public boolean canBeReflected()
- {
- return _canBeReflected;
- Index: java/com/l2jserver/gameserver/model/actor/L2Attackable.java
- ===================================================================
- --- java/com/l2jserver/gameserver/model/actor/L2Attackable.java (revision 5011)
- +++ java/com/l2jserver/gameserver/model/actor/L2Attackable.java (working copy)
- @@ -408,16 +408,19 @@
- if (getCurrentHp() <= skill.getHpConsume())
- return;
- - if (skill.isMagic())
- + if (!skill.ignoreSkillMute())
- {
- - if (isMuted())
- - return;
- + if (skill.isMagic())
- + {
- + if (isMuted())
- + return;
- + }
- + else
- + {
- + if (isPhysicalMuted())
- + return;
- + }
- }
- - else
- - {
- - if (isPhysicalMuted())
- - return;
- - }
- L2Object target = skill.getFirstOfTargetList(this);
- if (target == null)
- Index: java/com/l2jserver/gameserver/model/actor/L2Character.java
- ===================================================================
- --- java/com/l2jserver/gameserver/model/actor/L2Character.java (revision 5011)
- +++ java/com/l2jserver/gameserver/model/actor/L2Character.java (working copy)
- @@ -2078,7 +2078,7 @@
- return false;
- }
- - if (!skill.isPotion())
- + if (!skill.isPotion() || !skill.ignoreSkillMute()) // Skill mute checks.
- {
- // Check if the skill is a magic spell and if the L2Character is not muted
- if (skill.isMagic())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement