Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/java/net/sf/l2j/gameserver/enums/skills/L2EffectType.java b/java/net/sf/l2j/gameserver/enums/skills/L2EffectType.java
- index 3df0b99..4098e89 100644
- --- a/java/net/sf/l2j/gameserver/enums/skills/L2EffectType.java
- +++ b/java/net/sf/l2j/gameserver/enums/skills/L2EffectType.java
- @@ -2,6 +2,7 @@
- public enum L2EffectType
- {
- + PREVENT_BUFF,
- BLOCK_BUFF,
- BLOCK_DEBUFF,
- diff --git a/java/net/sf/l2j/gameserver/handler/skillhandlers/Continuous.java b/java/net/sf/l2j/gameserver/handler/skillhandlers/Continuous.java
- index 0401c64..0e344d0 100644
- --- a/java/net/sf/l2j/gameserver/handler/skillhandlers/Continuous.java
- +++ b/java/net/sf/l2j/gameserver/handler/skillhandlers/Continuous.java
- @@ -71,7 +71,13 @@
- // Target under buff immunity.
- if (target.isBuffProtected() && target.getFirstEffect(L2EffectType.BLOCK_BUFF) != null)
- continue;
- -
- + if (activeChar instanceof Player && target != activeChar && target.isBuffProtected() && !skill.isHeroSkill() && !skill.isHeroSkill()
- + && (skill.getSkillType() == L2SkillType.BUFF
- + || skill.getSkillType() == L2SkillType.HEAL_PERCENT
- + || skill.getSkillType() == L2SkillType.MANAHEAL_PERCENT
- + || skill.getSkillType() == L2SkillType.COMBATPOINTHEAL
- + || skill.getSkillType() == L2SkillType.REFLECT))
- + continue;
- // Player holding a cursed weapon can't be buffed and can't buff
- if (!(activeChar instanceof ClanHallManagerNpc) && target != activeChar)
- {
- diff --git a/java/net/sf/l2j/gameserver/model/actor/Creature.java b/java/net/sf/l2j/gameserver/model/actor/Creature.java
- index 0350fcb..cbc8459 100644
- --- a/java/net/sf/l2j/gameserver/model/actor/Creature.java
- +++ b/java/net/sf/l2j/gameserver/model/actor/Creature.java
- @@ -104,6 +104,16 @@
- */
- public abstract class Creature extends WorldObject
- {
- + private boolean _isBuffProtected = false;
- + public final void setIsBuffProtected(boolean value)
- + {
- + _isBuffProtected = value;
- + }
- +
- + public boolean isBuffProtected()
- + {
- + return _isBuffProtected;
- + }
- private volatile boolean _isCastingNow = false;
- private volatile boolean _isCastingSimultaneouslyNow = false;
- private L2Skill _lastSkillCast;
- @@ -117,8 +127,7 @@
- protected boolean _isTeleporting = false;
- protected boolean _showSummonAnimation = false;
- - /** The _is buff protected. */
- - private boolean _isBuffProtected = false; // Protect From Debuffs
- +
- protected boolean _isInvul = false;
- private boolean _isMortal = true;
- @@ -4706,23 +4715,7 @@
- _isStopMov = value;
- }
- - /**
- - * Sets the checks if is buff protected.
- - * @param value the new checks if is buff protected
- - */
- - public final void setIsBuffProtected(final boolean value)
- - {
- - _isBuffProtected = value;
- - }
- -
- - /**
- - * Checks if is buff protected.
- - * @return true, if is buff protected
- - */
- - public boolean isBuffProtected()
- - {
- - return _isBuffProtected;
- - }
- +
- protected MoveData _move1;
- public final boolean isOnGeodataPath()
- {
- diff --git a/java/net/sf/l2j/gameserver/model/actor/Player.java b/java/net/sf/l2j/gameserver/model/actor/Player.java
- index 6332090..0bbb748 100644
- --- a/java/net/sf/l2j/gameserver/model/actor/Player.java
- +++ b/java/net/sf/l2j/gameserver/model/actor/Player.java
- @@ -334,7 +334,7 @@
- private boolean _isInTradeProt = false;
- private boolean _isSSDisabled = false;
- - private boolean _isBuffProtected = false;
- +
- private String _code = "";
- @@ -10367,16 +10367,7 @@
- sendPacket(new EtcStatusUpdate(this));
- }
- - @Override
- - public boolean isBuffProtected()
- - {
- - return _isBuffProtected;
- - }
- -
- - public void setisBuffProtected(boolean value)
- - {
- - _isBuffProtected = value;
- - }
- +
- private List<Integer> _ignored = new ArrayList<>();
- diff --git a/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java b/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
- index de2cc4c..4c23145 100644
- --- a/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
- +++ b/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
- @@ -117,15 +117,7 @@
- player.setMessageRefusal(true);
- Menu.sendMainWindow(player);
- }
- - else if (_command.startsWith("setbuffsRefuse"))
- - {
- - if (player.isBuffProtected())
- - player.setisBuffProtected(false);
- - else
- - player.setisBuffProtected(true);
- - player.sendMessage("Buff protection.");
- - Menu.sendMainWindow(player);
- - }
- +
- else if (_command.startsWith("setxpnot"))
- {
- if (player.cantGainXP())
- diff --git a/java/net/sf/l2j/gameserver/skills/effects/EffectDeflectBuff.java b/java/net/sf/l2j/gameserver/skills/effects/EffectDeflectBuff.java
- index 166d263..6c4fca5 100644
- --- a/java/net/sf/l2j/gameserver/skills/effects/EffectDeflectBuff.java
- +++ b/java/net/sf/l2j/gameserver/skills/effects/EffectDeflectBuff.java
- @@ -1,33 +1,11 @@
- +package net.sf.l2j.gameserver.skills.effects;
- +
- +import net.sf.l2j.gameserver.enums.skills.L2EffectType;
- +import net.sf.l2j.gameserver.enums.skills.L2SkillType;
- +import net.sf.l2j.gameserver.model.L2Effect;
- +import net.sf.l2j.gameserver.model.L2Skill;
- +import net.sf.l2j.gameserver.model.actor.Creature;
- +
- +public final class EffectDeflectBuff extends L2Effect
- +{
- + public EffectDeflectBuff(EffectTemplate template, L2Skill skill, Creature effected, Creature effector)
- + {
- + super(template, skill, effected, effector);
- + }
- +
- + @Override
- + public L2EffectType getEffectType()
- + {
- + return L2EffectType.PREVENT_BUFF;
- + }
- +
- + @Override
- + public boolean onActionTime()
- + {
- + if(getSkill().getSkillType() != L2SkillType.CONT)
- + {
- + return false;
- + }
- + return true;
- + }
- +
- + @Override
- + public boolean onStart()
- + {
- + getEffected().setIsBuffProtected(true);
- + return true;
- + }
- +
- + @Override
- + public void onExit()
- + {
- + getEffected().setIsBuffProtected(false);
- + }
- +}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement