diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/EffectMasterHandler.java index 5aea66d2143a793bac4a2bea6c2b02c839a00781..2c487742a58df3ce436efc6a7318d79ffaf11e86 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -76,6 +76,7 @@ public final class EffectMasterHandler DefenceTrait.class, DeleteHate.class, DeleteHateOfMe.class, + DetectHiddenObjects.class, Detection.class, Disarm.class, DispelAll.class, diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/MasterHandler.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/MasterHandler.java index b986f9942c93981386b968f249babff57a82aeae..e3bb8d80d6f91e31e1b25ef1f645a47ed112f7f5 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/MasterHandler.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/MasterHandler.java @@ -206,7 +206,6 @@ import handlers.punishmenthandlers.ChatBanHandler; import handlers.punishmenthandlers.JailHandler; import handlers.skillhandlers.DeluxeKey; import handlers.skillhandlers.Dummy; -import handlers.skillhandlers.NornilsPower; import handlers.skillhandlers.Sow; import handlers.skillhandlers.Unlock; import handlers.targethandlers.Area; @@ -493,7 +492,6 @@ public class MasterHandler // Skill Handlers DeluxeKey.class, Dummy.class, - NornilsPower.class, Sow.class, Unlock.class, }, diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/DetectHiddenObjects.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/DetectHiddenObjects.java new file mode 100644 index 0000000000000000000000000000000000000000..445c7077e39e256cdb447d755bdc9d082823b5b2 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/DetectHiddenObjects.java @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2004-2014 L2J DataPack + * + * This file is part of L2J DataPack. + * + * L2J DataPack 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. + * + * L2J DataPack 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.l2jserver.gameserver.model.StatsSet; +import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance; +import com.l2jserver.gameserver.model.conditions.Condition; +import com.l2jserver.gameserver.model.effects.AbstractEffect; +import com.l2jserver.gameserver.model.skills.BuffInfo; + +/** + * @author UnAfraid + */ +public class DetectHiddenObjects extends AbstractEffect +{ + public DetectHiddenObjects(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params) + { + super(attachCond, applyCond, set, params); + } + + @Override + public boolean isInstant() + { + return true; + } + + @Override + public void onStart(BuffInfo info) + { + super.onStart(info); + if (!info.getEffected().isDoor()) + { + return; + } + + final L2DoorInstance door = (L2DoorInstance) info.getEffected(); + if (door.getTemplate().isStealth()) + { + door.setMeshIndex(1); + door.setTargetable(door.getTemplate().getOpenType() != 0); + door.broadcastStatusUpdate(); + } + } +} diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/NornilsPower.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/NornilsPower.java deleted file mode 100644 index b2abbb52f68d05fe52e43fdaf39676df45171692..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/NornilsPower.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2004-2014 L2J DataPack - * - * This file is part of L2J DataPack. - * - * L2J DataPack 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. - * - * L2J DataPack 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.skillhandlers; - -import com.l2jserver.gameserver.handler.ISkillHandler; -import com.l2jserver.gameserver.instancemanager.InstanceManager; -import com.l2jserver.gameserver.model.L2Object; -import com.l2jserver.gameserver.model.actor.L2Character; -import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance; -import com.l2jserver.gameserver.model.instancezone.InstanceWorld; -import com.l2jserver.gameserver.model.skills.L2Skill; -import com.l2jserver.gameserver.model.skills.L2SkillType; -import com.l2jserver.gameserver.network.SystemMessageId; -import com.l2jserver.gameserver.network.serverpackets.SystemMessage; - -public class NornilsPower implements ISkillHandler -{ - private static final L2SkillType[] SKILL_IDS = - { - L2SkillType.NORNILS_POWER - }; - - @Override - public void useSkill(L2Character activeChar, L2Skill skill, L2Object[] targets) - { - if (!activeChar.isPlayer()) - { - return; - } - - InstanceWorld world = null; - final int instanceId = activeChar.getInstanceId(); - if (instanceId > 0) - { - world = InstanceManager.getInstance().getPlayerWorld(activeChar.getActingPlayer()); - } - - if ((world != null) && (world.getInstanceId() == instanceId) && (world.getTemplateId() == 11)) - { - if (activeChar.isInsideRadius(-107393, 83677, 0, 100, false, true)) - { - activeChar.destroyItemByItemId("NornilsPower", 9713, 1, activeChar, true); - L2DoorInstance door = InstanceManager.getInstance().getInstance(world.getInstanceId()).getDoor(16200010); - if (door != null) - { - door.setMeshIndex(1); - door.setTargetable(true); - door.broadcastStatusUpdate(); - } - } - else - { - SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED); - sm.addSkillName(skill); - activeChar.sendPacket(sm); - } - } - else - { - activeChar.sendPacket(SystemMessageId.NOTHING_HAPPENED); - } - } - - @Override - public L2SkillType[] getSkillIds() - { - return SKILL_IDS; - } -} \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/targethandlers/Aura.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/targethandlers/Aura.java index 56fb82d75ec1dbe79ffae1d039e5cd43f9886db0..0424465eef7f5d12a7bc096f25553af145c90e05 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/targethandlers/Aura.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/targethandlers/Aura.java @@ -25,6 +25,7 @@ import java.util.List; import com.l2jserver.gameserver.handler.ITargetTypeHandler; import com.l2jserver.gameserver.model.L2Object; import com.l2jserver.gameserver.model.actor.L2Character; +import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance; import com.l2jserver.gameserver.model.skills.L2Skill; import com.l2jserver.gameserver.model.skills.targets.L2TargetType; import com.l2jserver.gameserver.model.zone.ZoneId; @@ -42,8 +43,18 @@ public class Aura implements ITargetTypeHandler final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharactersInRadius(skill.getAffectRange()); for (L2Character obj : objs) { - if (obj.isAttackable() || obj.isPlayable()) + if (obj.isDoor() || obj.isAttackable() || obj.isPlayable()) { + // Stealth door targeting. + if (obj.isDoor()) + { + final L2DoorInstance door = (L2DoorInstance) obj; + if (!door.getTemplate().isStealth()) + { + continue; + } + } + if (!L2Skill.checkForAreaOffensiveSkills(activeChar, obj, skill, srcInArena)) { continue; diff --git a/L2J_DataPack_BETA/dist/game/data/stats/skills/02300-02399.xml b/L2J_DataPack_BETA/dist/game/data/stats/skills/02300-02399.xml index 8c2f71c2ae9f5536ee28a60dbf33d12cf9f52e6b..c34335b43adc730aa6c2e2452d9be32ee3744eb5 100644 --- a/L2J_DataPack_BETA/dist/game/data/stats/skills/02300-02399.xml +++ b/L2J_DataPack_BETA/dist/game/data/stats/skills/02300-02399.xml @@ -887,14 +887,22 @@ </cond> </skill> <skill id="2353" levels="1" name="Nornil's Power"> + <set name="affectRange" val="600" /> + <set name="itemConsumeId" val="9713" /> + <set name="itemConsumeCount" val="1" /> <set name="hitTime" val="200" /> <set name="magicLvl" val="85" /> <set name="operateType" val="A1" /> - <set name="skillType" val="NORNILS_POWER" /> - <set name="targetType" val="SELF" /> + <set name="targetType" val="AURA" /> <cond msgId="113" addName="1"> - <player insideZoneId="2353" /> + <and> + <player instanceId="11" /> + <player insideZoneId="2353" /> + </and> </cond> + <for> + <effect name="DetectHiddenObjects" /> + </for> </skill> <skill id="2354" levels="1" name="Gate Key of Darkness"> <!-- Confirmed CT2.5 -->