From e2b465cdfdb3841dd97805e6ce693628ff588fe0 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 14 Apr 2017 15:42:43 +0000 Subject: [PATCH] Target door skill condition. --- .../handlers/SkillConditionMasterHandler.java | 1 + .../OpTargetDoorSkillCondition.java | 44 +++++++++ .../game/data/stats/skills/02200-02299.xml | 42 +++++++++ .../game/data/stats/skills/02300-02399.xml | 92 +++++++++++++++++++ .../game/data/stats/skills/02600-02699.xml | 23 +++++ .../game/data/stats/skills/05100-05199.xml | 82 +++++++++++++++++ .../game/data/stats/skills/09000-09099.xml | 6 ++ .../handlers/SkillConditionMasterHandler.java | 1 + .../OpTargetDoorSkillCondition.java | 44 +++++++++ .../game/data/stats/skills/02200-02299.xml | 42 +++++++++ .../game/data/stats/skills/02300-02399.xml | 92 +++++++++++++++++++ .../game/data/stats/skills/02600-02699.xml | 23 +++++ .../game/data/stats/skills/05100-05199.xml | 82 +++++++++++++++++ .../game/data/stats/skills/09000-09099.xml | 6 ++ 14 files changed, 580 insertions(+) create mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/handlers/skillconditionhandlers/OpTargetDoorSkillCondition.java create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/handlers/skillconditionhandlers/OpTargetDoorSkillCondition.java diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java b/L2J_Mobius_Helios/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java index 3c88643a9e..530295c9dd 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java +++ b/L2J_Mobius_Helios/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java @@ -70,6 +70,7 @@ public class SkillConditionMasterHandler SkillConditionHandler.getInstance().registerHandler("CanUntransform", CanUntransformSkillCondition::new); SkillConditionHandler.getInstance().registerHandler("BuildAdvanceBase", BuildAdvanceBaseSkillCondition::new); SkillConditionHandler.getInstance().registerHandler("CanTransformInDominion", CanTransformInDominionSkillCondition::new); + SkillConditionHandler.getInstance().registerHandler("OpTargetDoor", OpTargetDoorSkillCondition::new); SkillConditionHandler.getInstance().registerHandler("OpTargetNpc", OpTargetNpcSkillCondition::new); SkillConditionHandler.getInstance().registerHandler("OpHaveSummon", OpHaveSummonSkillCondition::new); SkillConditionHandler.getInstance().registerHandler("OpNotInstantzone", OpNotInstantzoneSkillCondition::new); diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/handlers/skillconditionhandlers/OpTargetDoorSkillCondition.java b/L2J_Mobius_Helios/dist/game/data/scripts/handlers/skillconditionhandlers/OpTargetDoorSkillCondition.java new file mode 100644 index 0000000000..06f377a51f --- /dev/null +++ b/L2J_Mobius_Helios/dist/game/data/scripts/handlers/skillconditionhandlers/OpTargetDoorSkillCondition.java @@ -0,0 +1,44 @@ +/* + * 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 . + */ +package handlers.skillconditionhandlers; + +import java.util.List; + +import com.l2jmobius.gameserver.model.L2Object; +import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; +import com.l2jmobius.gameserver.model.skills.ISkillCondition; +import com.l2jmobius.gameserver.model.skills.Skill; + +/** + * @author Mobius + */ +public class OpTargetDoorSkillCondition implements ISkillCondition +{ + private final List _doorIds; + + public OpTargetDoorSkillCondition(StatsSet params) + { + _doorIds = params.getList("doorIds", Integer.class); + } + + @Override + public boolean canUse(L2Character caster, Skill skill, L2Object target) + { + return (target != null) && target.isDoor() && _doorIds.contains(target.getId()); + } +} diff --git a/L2J_Mobius_Helios/dist/game/data/stats/skills/02200-02299.xml b/L2J_Mobius_Helios/dist/game/data/stats/skills/02200-02299.xml index 9b7b2f096e..0a2695faac 100644 --- a/L2J_Mobius_Helios/dist/game/data/stats/skills/02200-02299.xml +++ b/L2J_Mobius_Helios/dist/game/data/stats/skills/02200-02299.xml @@ -2037,6 +2037,18 @@ SINGLE + + + 19160002 + 19160003 + 19160004 + 19160005 + 19160006 + 19160007 + 19160008 + 19160009 + + @@ -2057,6 +2069,20 @@ SINGLE + + + 19160002 + 19160003 + 19160004 + 19160005 + 19160006 + 19160007 + 19160008 + 19160009 + 19160010 + 19160011 + + @@ -2083,6 +2109,16 @@ SINGLE + + + 19160012 + 19160013 + 19160014 + 19160015 + 19160016 + 19160017 + + @@ -2109,6 +2145,12 @@ SINGLE + + + 23150003 + 23150004 + + diff --git a/L2J_Mobius_Helios/dist/game/data/stats/skills/02300-02399.xml b/L2J_Mobius_Helios/dist/game/data/stats/skills/02300-02399.xml index 0146659ffd..881c75376e 100644 --- a/L2J_Mobius_Helios/dist/game/data/stats/skills/02300-02399.xml +++ b/L2J_Mobius_Helios/dist/game/data/stats/skills/02300-02399.xml @@ -1470,6 +1470,11 @@ SINGLE + + + 16200002 + + @@ -1496,6 +1501,11 @@ SINGLE + + + 16200005 + + @@ -1522,6 +1532,11 @@ SINGLE + + + 16200009 + + @@ -1548,6 +1563,11 @@ SINGLE + + + 16200003 + + @@ -1574,6 +1594,11 @@ SINGLE + + + 16200007 + + @@ -1600,6 +1625,11 @@ SINGLE + + + 16200008 + + @@ -1626,6 +1656,11 @@ SINGLE + + + 16200010 + + @@ -1652,6 +1687,11 @@ SINGLE + + + 16200006 + + @@ -1678,6 +1718,11 @@ SINGLE + + + 16200011 + + @@ -1704,6 +1749,11 @@ SINGLE + + + 16200012 + + @@ -1752,6 +1802,11 @@ SINGLE + + + 20260001 + + @@ -1778,6 +1833,11 @@ SINGLE + + + 20260006 + + @@ -1804,6 +1864,11 @@ SINGLE + + + 20260002 + + @@ -1918,6 +1983,18 @@ SINGLE + + + 24220009 + 24220011 + 24220012 + 24220014 + 24220015 + 24220016 + 24220017 + 24220019 + + @@ -1947,6 +2024,11 @@ SINGLE + + + 24220040 + + @@ -2017,6 +2099,11 @@ SINGLE + + + 24220020 + + @@ -2043,6 +2130,11 @@ SINGLE + + + 24220022 + + diff --git a/L2J_Mobius_Helios/dist/game/data/stats/skills/02600-02699.xml b/L2J_Mobius_Helios/dist/game/data/stats/skills/02600-02699.xml index f507262954..50bc71e33b 100644 --- a/L2J_Mobius_Helios/dist/game/data/stats/skills/02600-02699.xml +++ b/L2J_Mobius_Helios/dist/game/data/stats/skills/02600-02699.xml @@ -145,6 +145,16 @@ SINGLE + + + 22110100 + 22110101 + 22110102 + 22110103 + 22110104 + 22110105 + + @@ -720,6 +730,13 @@ SINGLE + + + 17240101 + 17240105 + 17240109 + + @@ -744,6 +761,12 @@ SINGLE + + + 17240103 + 17240107 + + diff --git a/L2J_Mobius_Helios/dist/game/data/stats/skills/05100-05199.xml b/L2J_Mobius_Helios/dist/game/data/stats/skills/05100-05199.xml index 70d3b4b936..77b8d42fa0 100644 --- a/L2J_Mobius_Helios/dist/game/data/stats/skills/05100-05199.xml +++ b/L2J_Mobius_Helios/dist/game/data/stats/skills/05100-05199.xml @@ -214,6 +214,47 @@ RANGE + + + 19210001 + 19210002 + 19210003 + 19210004 + 20160001 + 20160002 + 20160007 + 20160008 + 20160009 + 20220001 + 20220002 + 20220003 + 20220004 + 22130001 + 22130002 + 22130004 + 22130005 + 22190001 + 22190002 + 22190003 + 22190004 + 23220001 + 23220002 + 23220003 + 23220004 + 23250001 + 23250002 + 23250003 + 23250004 + 24160009 + 24160010 + 24160021 + 24160022 + 24180001 + 24180002 + 24180006 + 24180011 + + @@ -240,6 +281,47 @@ RANGE + + + 19210001 + 19210002 + 19210003 + 19210004 + 20160001 + 20160002 + 20160007 + 20160008 + 20160009 + 20220001 + 20220002 + 20220003 + 20220004 + 22130001 + 22130002 + 22130004 + 22130005 + 22190001 + 22190002 + 22190003 + 22190004 + 23220001 + 23220002 + 23220003 + 23220004 + 23250001 + 23250002 + 23250003 + 23250004 + 24160009 + 24160010 + 24160021 + 24160022 + 24180001 + 24180002 + 24180006 + 24180011 + + diff --git a/L2J_Mobius_Helios/dist/game/data/stats/skills/09000-09099.xml b/L2J_Mobius_Helios/dist/game/data/stats/skills/09000-09099.xml index eb131157f3..4bc87efd51 100644 --- a/L2J_Mobius_Helios/dist/game/data/stats/skills/09000-09099.xml +++ b/L2J_Mobius_Helios/dist/game/data/stats/skills/09000-09099.xml @@ -4508,6 +4508,12 @@ SINGLE + + + 23150001 + 23150002 + + diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java index 3c88643a9e..530295c9dd 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/SkillConditionMasterHandler.java @@ -70,6 +70,7 @@ public class SkillConditionMasterHandler SkillConditionHandler.getInstance().registerHandler("CanUntransform", CanUntransformSkillCondition::new); SkillConditionHandler.getInstance().registerHandler("BuildAdvanceBase", BuildAdvanceBaseSkillCondition::new); SkillConditionHandler.getInstance().registerHandler("CanTransformInDominion", CanTransformInDominionSkillCondition::new); + SkillConditionHandler.getInstance().registerHandler("OpTargetDoor", OpTargetDoorSkillCondition::new); SkillConditionHandler.getInstance().registerHandler("OpTargetNpc", OpTargetNpcSkillCondition::new); SkillConditionHandler.getInstance().registerHandler("OpHaveSummon", OpHaveSummonSkillCondition::new); SkillConditionHandler.getInstance().registerHandler("OpNotInstantzone", OpNotInstantzoneSkillCondition::new); diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/skillconditionhandlers/OpTargetDoorSkillCondition.java b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/skillconditionhandlers/OpTargetDoorSkillCondition.java new file mode 100644 index 0000000000..46e0fdaa4a --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/skillconditionhandlers/OpTargetDoorSkillCondition.java @@ -0,0 +1,44 @@ +/* + * 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 . + */ +package handlers.skillconditionhandlers; + +import java.util.List; + +import com.l2jmobius.gameserver.model.L2Object; +import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.actor.L2Character; +import com.l2jmobius.gameserver.model.skills.ISkillCondition; +import com.l2jmobius.gameserver.model.skills.Skill; + +/** + * @author Mobius + */ +public class OpTargetDoorSkillCondition implements ISkillCondition +{ + private final List _doorIds; + + public OpTargetDoorSkillCondition(StatsSet params) + { + _doorIds = params.getList("doorIds", Integer.class); + } + + @Override + public boolean canUse(L2Character caster, Skill skill, L2Object target) + { + return (target != null) && target.isDoor() && _doorIds.contains(target.getId()); + } +} diff --git a/L2J_Mobius_Underground/dist/game/data/stats/skills/02200-02299.xml b/L2J_Mobius_Underground/dist/game/data/stats/skills/02200-02299.xml index 9b7b2f096e..0a2695faac 100644 --- a/L2J_Mobius_Underground/dist/game/data/stats/skills/02200-02299.xml +++ b/L2J_Mobius_Underground/dist/game/data/stats/skills/02200-02299.xml @@ -2037,6 +2037,18 @@ SINGLE + + + 19160002 + 19160003 + 19160004 + 19160005 + 19160006 + 19160007 + 19160008 + 19160009 + + @@ -2057,6 +2069,20 @@ SINGLE + + + 19160002 + 19160003 + 19160004 + 19160005 + 19160006 + 19160007 + 19160008 + 19160009 + 19160010 + 19160011 + + @@ -2083,6 +2109,16 @@ SINGLE + + + 19160012 + 19160013 + 19160014 + 19160015 + 19160016 + 19160017 + + @@ -2109,6 +2145,12 @@ SINGLE + + + 23150003 + 23150004 + + diff --git a/L2J_Mobius_Underground/dist/game/data/stats/skills/02300-02399.xml b/L2J_Mobius_Underground/dist/game/data/stats/skills/02300-02399.xml index 0146659ffd..881c75376e 100644 --- a/L2J_Mobius_Underground/dist/game/data/stats/skills/02300-02399.xml +++ b/L2J_Mobius_Underground/dist/game/data/stats/skills/02300-02399.xml @@ -1470,6 +1470,11 @@ SINGLE + + + 16200002 + + @@ -1496,6 +1501,11 @@ SINGLE + + + 16200005 + + @@ -1522,6 +1532,11 @@ SINGLE + + + 16200009 + + @@ -1548,6 +1563,11 @@ SINGLE + + + 16200003 + + @@ -1574,6 +1594,11 @@ SINGLE + + + 16200007 + + @@ -1600,6 +1625,11 @@ SINGLE + + + 16200008 + + @@ -1626,6 +1656,11 @@ SINGLE + + + 16200010 + + @@ -1652,6 +1687,11 @@ SINGLE + + + 16200006 + + @@ -1678,6 +1718,11 @@ SINGLE + + + 16200011 + + @@ -1704,6 +1749,11 @@ SINGLE + + + 16200012 + + @@ -1752,6 +1802,11 @@ SINGLE + + + 20260001 + + @@ -1778,6 +1833,11 @@ SINGLE + + + 20260006 + + @@ -1804,6 +1864,11 @@ SINGLE + + + 20260002 + + @@ -1918,6 +1983,18 @@ SINGLE + + + 24220009 + 24220011 + 24220012 + 24220014 + 24220015 + 24220016 + 24220017 + 24220019 + + @@ -1947,6 +2024,11 @@ SINGLE + + + 24220040 + + @@ -2017,6 +2099,11 @@ SINGLE + + + 24220020 + + @@ -2043,6 +2130,11 @@ SINGLE + + + 24220022 + + diff --git a/L2J_Mobius_Underground/dist/game/data/stats/skills/02600-02699.xml b/L2J_Mobius_Underground/dist/game/data/stats/skills/02600-02699.xml index f507262954..50bc71e33b 100644 --- a/L2J_Mobius_Underground/dist/game/data/stats/skills/02600-02699.xml +++ b/L2J_Mobius_Underground/dist/game/data/stats/skills/02600-02699.xml @@ -145,6 +145,16 @@ SINGLE + + + 22110100 + 22110101 + 22110102 + 22110103 + 22110104 + 22110105 + + @@ -720,6 +730,13 @@ SINGLE + + + 17240101 + 17240105 + 17240109 + + @@ -744,6 +761,12 @@ SINGLE + + + 17240103 + 17240107 + + diff --git a/L2J_Mobius_Underground/dist/game/data/stats/skills/05100-05199.xml b/L2J_Mobius_Underground/dist/game/data/stats/skills/05100-05199.xml index 70d3b4b936..77b8d42fa0 100644 --- a/L2J_Mobius_Underground/dist/game/data/stats/skills/05100-05199.xml +++ b/L2J_Mobius_Underground/dist/game/data/stats/skills/05100-05199.xml @@ -214,6 +214,47 @@ RANGE + + + 19210001 + 19210002 + 19210003 + 19210004 + 20160001 + 20160002 + 20160007 + 20160008 + 20160009 + 20220001 + 20220002 + 20220003 + 20220004 + 22130001 + 22130002 + 22130004 + 22130005 + 22190001 + 22190002 + 22190003 + 22190004 + 23220001 + 23220002 + 23220003 + 23220004 + 23250001 + 23250002 + 23250003 + 23250004 + 24160009 + 24160010 + 24160021 + 24160022 + 24180001 + 24180002 + 24180006 + 24180011 + + @@ -240,6 +281,47 @@ RANGE + + + 19210001 + 19210002 + 19210003 + 19210004 + 20160001 + 20160002 + 20160007 + 20160008 + 20160009 + 20220001 + 20220002 + 20220003 + 20220004 + 22130001 + 22130002 + 22130004 + 22130005 + 22190001 + 22190002 + 22190003 + 22190004 + 23220001 + 23220002 + 23220003 + 23220004 + 23250001 + 23250002 + 23250003 + 23250004 + 24160009 + 24160010 + 24160021 + 24160022 + 24180001 + 24180002 + 24180006 + 24180011 + + diff --git a/L2J_Mobius_Underground/dist/game/data/stats/skills/09000-09099.xml b/L2J_Mobius_Underground/dist/game/data/stats/skills/09000-09099.xml index eb131157f3..4bc87efd51 100644 --- a/L2J_Mobius_Underground/dist/game/data/stats/skills/09000-09099.xml +++ b/L2J_Mobius_Underground/dist/game/data/stats/skills/09000-09099.xml @@ -4508,6 +4508,12 @@ SINGLE + + + 23150001 + 23150002 + +