Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: dist/game/data/scripts/handlers/EffectMasterHandler.java
- ===================================================================
- --- dist/game/data/scripts/handlers/EffectMasterHandler.java (revision 1311)
- +++ dist/game/data/scripts/handlers/EffectMasterHandler.java (working copy)
- @@ -109,6 +109,7 @@
- HealOverTime.class,
- HealPercent.class,
- Hide.class,
- + NoTarget.class,
- HpByLevel.class,
- HpCpHeal.class,
- HpDrain.class,
- Index: dist/game/data/scripts/handlers/effecthandlers/NoTarget.java
- ===================================================================
- --- dist/game/data/scripts/handlers/effecthandlers/NoTarget.java (revision 0)
- +++ dist/game/data/scripts/handlers/effecthandlers/NoTarget.java (revision 0)
- @@ -0,0 +1,76 @@
- +/*
- + * This file is part of the L2J Mobius project.
- + *
- + * 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 version.
- + *
- + * This program is distributed in the hope that it will be useful,
- + * but WITHOUT ANY WARRANTY; without even the implied warranty of
- + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + * General Public License for more details.
- + *
- + * You should have received a copy of the GNU General Public License
- + * along with this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package handlers.effecthandlers;
- +
- +import com.l2jmobius.gameserver.ai.CtrlIntention;
- +import com.l2jmobius.gameserver.model.StatsSet;
- +import com.l2jmobius.gameserver.model.actor.L2Character;
- +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jmobius.gameserver.model.conditions.Condition;
- +import com.l2jmobius.gameserver.model.effects.AbstractEffect;
- +import com.l2jmobius.gameserver.model.skills.BuffInfo;
- +
- +/**
- + * Keep enemies from targeting you.
- + * @author hitnar
- + */
- +public final class NoTarget extends AbstractEffect
- +{
- + public NoTarget(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
- + {
- + super(attachCond, applyCond, set, params);
- + }
- +
- + @Override
- + public void onExit(BuffInfo info)
- + {
- + if (info.getEffected().isPlayer())
- + {
- + final L2PcInstance activeChar = info.getEffected().getActingPlayer();
- + if (!activeChar.inObserverMode())
- + {
- + activeChar.setTargetable(true);
- + }
- + }
- + }
- +
- + @Override
- + public void onStart(BuffInfo info)
- + {
- + if (info.getEffected().isPlayer())
- + {
- + final L2PcInstance activeChar = info.getEffected().getActingPlayer();
- + activeChar.setTargetable(false);
- +
- + if ((activeChar.getAI().getNextIntention() != null) && (activeChar.getAI().getNextIntention().getCtrlIntention() == CtrlIntention.AI_INTENTION_ATTACK))
- + {
- + activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
- + }
- +
- + for (L2Character target : activeChar.getKnownList().getKnownCharacters())
- + {
- + if ((target != null) && (target.getTarget() == activeChar))
- + {
- + target.setTarget(null);
- + target.abortAttack();
- + target.abortCast();
- + target.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
- + }
- + }
- + }
- + }
- +}
- \ No newline at end of file
- Index: dist/game/data/stats/skills/11000-11099.xml
- ===================================================================
- --- dist/game/data/stats/skills/11000-11099.xml (revision 1311)
- +++ dist/game/data/stats/skills/11000-11099.xml (working copy)
- @@ -1618,13 +1618,16 @@
- <set name="magicLvl" val="#magicLvl" />
- <set name="power" val="#power" />
- <set name="targetType" val="ONE" />
- - <set name="operateType" val="ACTIVE_CONTINUOUS" />
- + <set name="operateType" val="ACTIVE_INSTANT" />
- + <set name="rideState" val="NONE;STRIDER;WYVERN;WOLF" />
- <set name="effectRange" val="1100" />
- <enchant1 name="mpConsume" val="#ench1MpConsume" />
- <enchant1 name="mpInitialConsume" val="#ench1MpInitialConsume" />
- <enchant2 name="power" val="#ench2Power" />
- <for>
- - <effect name="MagicalAttack" />
- + <effect name="DispelByCategory">
- + <param slot="buff" rate="100" max="2" />
- + </effect>
- </for>
- </skill>
- <skill id="11050" levels="7" name="Hell Binding">
- Index: dist/game/data/stats/skills/11200-11299.xml
- ===================================================================
- --- dist/game/data/stats/skills/11200-11299.xml (revision 1311)
- +++ dist/game/data/stats/skills/11200-11299.xml (working copy)
- @@ -362,9 +362,10 @@
- <set name="hitTime" val="1200" />
- <set name="coolTime" val="500" />
- <set name="reuseDelay" val="5000" />
- + <set name="abnormalTime" val="10" />
- <set name="isMagic" val="1" />
- <set name="isDebuff" val="true" />
- - <set name="targetType" val="SELF" />
- + <set name="targetType" val="ONE" />
- <for>
- <effect name="Buff">
- <mul stat="mDef" val="1.3" />
- @@ -385,9 +386,10 @@
- <set name="hitTime" val="1490" />
- <set name="coolTime" val="300" />
- <set name="reuseDelay" val="5000" />
- + <set name="abnormalTime" val="10" />
- <set name="isMagic" val="1" />
- <set name="isDebuff" val="true" />
- - <set name="targetType" val="SELF" />
- + <set name="targetType" val="ONE" />
- </skill>
- <skill id="11261" levels="9" name="Mark of Plague">
- <!-- Source: https://l2wiki.com/Mark_of_Plague_-_Wynn_Arcana_Lord -->
- @@ -401,9 +403,10 @@
- <set name="hitTime" val="1500" />
- <set name="coolTime" val="500" />
- <set name="reuseDelay" val="5000" />
- + <set name="abnormalTime" val="10" />
- <set name="isMagic" val="1" />
- <set name="isDebuff" val="true" />
- - <set name="targetType" val="SELF" />
- + <set name="targetType" val="ONE" />
- </skill>
- <skill id="11262" levels="9" name="Mark of Trick">
- <!-- Source: https://l2wiki.com/Mark_of_Trick_-_Wynn_Spectral_Master -->
- @@ -417,9 +420,10 @@
- <set name="hitTime" val="1500" />
- <set name="coolTime" val="500" />
- <set name="reuseDelay" val="5000" />
- + <set name="abnormalTime" val="10" />
- <set name="isMagic" val="1" />
- <set name="isDebuff" val="true" />
- - <set name="targetType" val="SELF" />
- + <set name="targetType" val="ONE" />
- </skill>
- <skill id="11263" levels="10" name="Invoke">
- <!-- Source: https://l2wiki.com/Invoke_-_Wynn_Elemental_Master -->
- @@ -808,13 +812,33 @@
- <table name="#mpConsume"> 78 86 94 97 </table>
- <set name="icon" val="icon.skill11274" />
- <set name="magicLvl" val="#magicLvl" />
- + <set name="abnormalTime" val="60" />
- <set name="operateType" val="ACTIVE_CONTINUOUS" />
- <set name="mpConsume" val="#mpConsume" />
- <set name="hitTime" val="1500" />
- <set name="coolTime" val="200" />
- <set name="reuseDelay" val="300000" />
- <set name="isMagic" val="1" />
- + <set name="rideState" val="NONE;STRIDER;WYVERN;WOLF" />
- <set name="targetType" val="SELF" />
- + <for>
- + <effect name="DispelByCategory">
- + <param slot="debuff" rate="100" max="10" />
- + </effect>
- + <effect name="BlockDamage">
- + <param block="HP"/>
- + </effect>
- + <effect name="BlockDamage">
- + <param block="MP"/>
- + </effect>
- + <effect name="BlockDebuff" />
- + <effect name="Buff">
- + <sub stat="cancelVuln" val="100" />
- + </effect>
- + <effect name="Buff">
- + <add stat="regHp" val="5" /> <!-- Need Verify -->
- + </effect>
- + </for>
- </skill>
- <skill id="11275" levels="2" name="Mark Flare">
- <!-- AUTO GENERATED SKILL -->
- @@ -999,6 +1023,7 @@
- <set name="coolTime" val="#coolTime" />
- <set name="reuseDelay" val="60000" />
- <set name="isMagic" val="1" />
- + <set name="abnormalTime" val="60" />
- <cond msgId="113" addName="1">
- <and>
- <player hasServitor="true" />
- @@ -1178,12 +1203,13 @@
- <set name="icon" val="icon.skill11297" />
- <set name="magicLvl" val="#magicLvl" />
- <set name="operateType" val="ACTIVE_CONTINUOUS" />
- + <set name="abnormalTime" val="1800" />
- <set name="mpConsume" val="#mpConsume" />
- <set name="effectRange" val="900" />
- <set name="hitTime" val="3799" />
- <set name="coolTime" val="200" />
- <set name="reuseDelay" val="60000" />
- - <set name="targetType" val="SELF" />
- + <set name="targetType" val="SERVITOR" />
- <for>
- <effect name="Buff">
- <mul stat="pAtk" val="1.1" />
- Index: dist/game/data/stats/skills/11300-11399.xml
- ===================================================================
- --- dist/game/data/stats/skills/11300-11399.xml (revision 1311)
- +++ dist/game/data/stats/skills/11300-11399.xml (working copy)
- @@ -240,14 +240,14 @@
- <enchant1 name="ench1mpConsume" val="#ench1mpConsume" />
- <enchant2 name="abnormalTime" val="#ench2AbnormalTimes" />
- <for>
- - <effect name="ImmobilePetBuff">
- + <effect name="Buff">
- <add stat="mDef" val="#mDef" />
- <add stat="pDef" val="#pDef" />
- <sub stat="cancelVuln" val="80" />
- </effect>
- </for>
- <enchant3for>
- - <effect name="ImmobilePetBuff">
- + <effect name="Buff">
- <add stat="mDef" val="4212" />
- <add stat="pDef" val="4680" />
- <mul stat="runSpd" val="#ench3Spd" />
- @@ -951,6 +951,7 @@
- <set name="icon" val="icon.skill11347" />
- <set name="magicLvl" val="#magicLvl" />
- <set name="operateType" val="ACTIVE_CONTINUOUS" />
- + <set name="abnormalTime" val="1800" />
- <set name="mpConsume" val="#mpConsume" />
- <set name="effectRange" val="900" />
- <set name="hitTime" val="3500" />
- @@ -1027,7 +1028,7 @@
- <set name="coolTime" val="300" />
- <set name="reuseDelay" val="2400" />
- <set name="isMagic" val="1" />
- - <set name="targetType" val="SELF" />
- + <set name="targetType" val="ONE" />
- </skill>
- <skill id="11351" levels="5" name="Arcane Link">
- <!-- AUTO GENERATED SKILL -->
- Index: dist/game/data/stats/skills/11500-11599.xml
- ===================================================================
- --- dist/game/data/stats/skills/11500-11599.xml (revision 1311)
- +++ dist/game/data/stats/skills/11500-11599.xml (working copy)
- @@ -1613,6 +1613,7 @@
- <add stat="pDef" val="4500" />
- <add stat="mDef" val="4500" />
- </effect>
- + <effect name="NoTarget" />
- </for>
- <enchant3for>
- <effect name="Transformation">
- @@ -1621,6 +1622,7 @@
- <add stat="pDef" val="4500" />
- <add stat="mDef" val="4500" />
- </effect>
- + <effect name="NoTarget" />
- </enchant3for>
- </skill>
- <skill id="11543" levels="6" name="Disperse" enchantGroup1="10" enchantGroup2="10" enchantGroup3="10" enchantGroup4="10" enchantGroup5="10">
- Index: java/com/l2jmobius/gameserver/model/L2Object.java
- ===================================================================
- --- java/com/l2jmobius/gameserver/model/L2Object.java (revision 1311)
- +++ java/com/l2jmobius/gameserver/model/L2Object.java (working copy)
- @@ -77,6 +77,7 @@
- private final AtomicInteger _instanceId = new AtomicInteger(0);
- private boolean _isVisible;
- private boolean _isInvisible;
- + private boolean _isTargetable = true;
- private ObjectKnownList _knownList;
- public L2Object(int objectId)
- @@ -473,7 +474,15 @@
- */
- public boolean isTargetable()
- {
- - return true;
- + return _isTargetable;
- + }
- +
- + /**
- + * @set value of Targetable (isTargetable() function)
- + */
- + public void setTargetable(boolean value)
- + {
- + _isTargetable = value;
- }
- /**
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement