Jump to content

Recommended Posts

Posted

AntiBuff Shield for Interlude

i search on forum but i dont found

 

Index: java/com/Ovenus/gameserver/handler/skillhandlers/Continuous.java
===================================================================
--- java/com/Ovenus/gameserver/handler/skillhandlers/Continuous.java	(revision 2)
+++ java/com/Ovenus/gameserver/handler/skillhandlers/Continuous.java	(working copy)
@@ -92,6 +92,9 @@
			{
				continue;
			}
+			// With Mystic Immunity you can't be buffed/debuffed
+			if (target.isBuffShieldOn())
+				continue;
			// Player holding a cursed weapon can't be buffed and can't buff
			if (skill.getSkillType() == L2Skill.SkillType.BUFF && !(activeChar instanceof L2ClanHallManagerInstance))
			{
Index: java/com/Ovenus/gameserver/handler/skillhandlers/Disablers.java
===================================================================
--- java/com/Ovenus/gameserver/handler/skillhandlers/Disablers.java	(revision 2)
+++ java/com/Ovenus/gameserver/handler/skillhandlers/Disablers.java	(working copy)
@@ -144,6 +144,8 @@
				// or dead
				continue;
			}
+			if (target.isBuffShieldOn())
+				continue;
			switch (type)
			{
				case BETRAY:
Index: java/com/Ovenus/gameserver/model/L2Character.java
===================================================================
--- java/com/Ovenus/gameserver/model/L2Character.java	(revision 2)
+++ java/com/Ovenus/gameserver/model/L2Character.java	(working copy)
@@ -28,6 +28,7 @@
import javolution.util.FastList;
import javolution.util.FastMap;
import javolution.util.FastTable;
+
import com.Ovenus.Config;
import com.Ovenus.gameserver.GameTimeController;
import com.Ovenus.gameserver.GeoData;
@@ -144,6 +145,7 @@
	// Data Field
	private List<L2Character> _attackByList;
	private volatile boolean _isCastingNow = false;
+	private boolean _buffShield = false;
	// private L2Character _attackingChar;
	private L2Skill _lastSkillCast;
	private boolean _isAfraid = false; // Flee in a random direction
@@ -7576,6 +7578,19 @@
		return _showSummonAnimation;
	}

+	
+	public final void enableBuffShield(boolean value)
+	{
+		_buffShield = value;
+	}
+
+	public boolean isBuffShieldOn()
+	{
+
+		return (_buffShield);
+			
+	}
+	
	/**
	 * @param showSummonAnimation
	 *            The showSummonAnimation to set.
Index: java/com/Ovenus/gameserver/model/L2Effect.java
===================================================================
--- java/com/Ovenus/gameserver/model/L2Effect.java	(revision 2)
+++ java/com/Ovenus/gameserver/model/L2Effect.java	(working copy)
@@ -51,7 +51,7 @@

	public static enum EffectType
	{
-		BUFF, BUFFIMMUNITY, CHARGE, DMG_OVER_TIME, HEAL_OVER_TIME, COMBAT_POINT_HEAL_OVER_TIME, MANA_DMG_OVER_TIME, MANA_HEAL_OVER_TIME, RELAXING, STUN, ROOT, SLEEP, HATE, FAKE_DEATH, CONFUSION, CONFUSE_MOB_ONLY, MUTE, FEAR, ILENT_MOVE, SEED, PARALYZE, STUN_SELF, PSYCHICAL_MUTE, REMOVE_TARGET, TARGET_ME, SILENCE_MAGIC_PHYSICAL, BETRAY, NOBLESSE_BLESSING, SOUL_OF_THE_PHOENIX, SALVATION, PETRIFICATION, BLUFF, INVUL, INTERRUPT, CHARM_OF_LUCK, SIGNET_GROUND, SIGNET_EFFECT, SIGNET, IMMOBILEUNTILATTACKED, DEBUFF, PROTECTION_BLESSING, CHARMOFCOURAGE, SILENT_MOVE, CHANCE_SKILL_TRIGGER
+		BUFF, BUFFIMMUNITY, CHARGE, DMG_OVER_TIME, HEAL_OVER_TIME, COMBAT_POINT_HEAL_OVER_TIME, MANA_DMG_OVER_TIME, MANA_HEAL_OVER_TIME, RELAXING, STUN, ROOT, SLEEP, HATE, FAKE_DEATH, CONFUSION, CONFUSE_MOB_ONLY, MUTE, FEAR, ILENT_MOVE, SEED, PARALYZE, STUN_SELF, PSYCHICAL_MUTE, REMOVE_TARGET, TARGET_ME, SILENCE_MAGIC_PHYSICAL, BETRAY, NOBLESSE_BLESSING, SOUL_OF_THE_PHOENIX, SALVATION, PETRIFICATION, BLUFF, INVUL, INTERRUPT, CHARM_OF_LUCK, SIGNET_GROUND, SIGNET_EFFECT, SIGNET, IMMOBILEUNTILATTACKED, DEBUFF, PROTECTION_BLESSING, CHARMOFCOURAGE, SILENT_MOVE, CHANCE_SKILL_TRIGGER, PREVENT_BUFF
	}

	private static final Func[] _emptyFunctionSet = new Func[0];
Index: java/com/Ovenus/gameserver/skills/effects/EffectAntiBuffShield.java
===================================================================
--- java/com/Ovenus/gameserver/skills/effects/EffectAntiBuffShield.java	(revision 0)
+++ java/com/Ovenus/gameserver/skills/effects/EffectAntiBuffShield.java	(revision 0)
@@ -0,0 +1,71 @@
+package com.Ovenus.gameserver.skills.effects;
+
+import com.Ovenus.gameserver.model.L2Effect;
+import com.Ovenus.gameserver.model.L2Effect.EffectType;
+import com.Ovenus.gameserver.skills.Env;
+
+/**
+ * An effect that prevents player to be buffed. Doesn't work when: <LI>
+ * Self-buffing</LI> <LI>Flagged/Karma</LI> <LI>Duelling</LI>
+ * 
+ * @author Ovenus
+ */
+public final class EffectAntiBuffShield extends L2Effect
+{
+	/**
+	 * @param env
+	 * @param template
+	 */
+	public EffectAntiBuffShield(Env env, EffectTemplate template)
+	{
+		super(env, template);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.Ovenus.gameserver.model.L2Effect#getEffectType()
+	 */
+	@Override
+	public EffectType getEffectType()
+	{
+		return EffectType.PREVENT_BUFF;
+	}
+
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.Ovenus.gameserver.model.L2Effect#onActionTime()
+	 */
+	@Override
+	public boolean onActionTime()
+	{
+		return false;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.Ovenus.gameserver.model.L2Effect#onStart()
+	 */
+	@Override
+	public void onStart()
+	{
+		getEffected().enableBuffShield(true);
+		return;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.Ovenus.gameserver.model.L2Effect#onExit()
+	 */
+	@Override
+	public void onExit()
+	{
+		getEffected().enableBuffShield(false);
+	}
+
+
+}




Db side

<skill id="Your Skill Here" levels="1" name="AntiBuff Shield">
   <set name="mpConsume" val="0"/>
   <set name="target" val="TARGET_SELF"/>
   <set name="reuseDelay" val="0"/>
   <set name="hitTime" val="-1"/>
   <set name="skillType" val="CONT"/>
   <set name="operateType" val="OP_TOGGLE"/>
   <set name="castRange" val="-1"/>
   <set name="effectRange" val="-1"/>
   <for>
     <effect count="1" name="AntiBuffShield" time="600000" val="0"/>
   </for>
 </skill>

credits go to:g-hamster.com

Posted

It says the author there and u credited g-hamster? Jesus!

 

Ovenuses code got deleted before, and this is not the right section ether, so with all that said.. Locked.

Guest
This topic is now closed to further replies.
×
×
  • Create New...