diff --git a/trunk/dist/game/data/scripts/handlers/EffectMasterHandler.java b/trunk/dist/game/data/scripts/handlers/EffectMasterHandler.java index 91486a89f9..11264e42a9 100644 --- a/trunk/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/trunk/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -156,6 +156,7 @@ final class EffectMasterHandler RefuelAirship.class, Relax.class, RemoteControl.class, + RemoveArmor.class, RemoveTarget.class, ResistSkill.class, Restoration.class, diff --git a/trunk/dist/game/data/scripts/handlers/effecthandlers/RemoveArmor.java b/trunk/dist/game/data/scripts/handlers/effecthandlers/RemoveArmor.java new file mode 100644 index 0000000000..cf9c8b3870 --- /dev/null +++ b/trunk/dist/game/data/scripts/handlers/effecthandlers/RemoveArmor.java @@ -0,0 +1,53 @@ +/* + * 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.effecthandlers; + +import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.conditions.Condition; +import com.l2jmobius.gameserver.model.effects.AbstractEffect; +import com.l2jmobius.gameserver.model.effects.EffectFlag; +import com.l2jmobius.gameserver.model.skills.BuffInfo; + +/** + * Disarm effect implementation. + * @author hitnar + */ +public final class RemoveArmor extends AbstractEffect +{ + public RemoveArmor(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params) + { + super(attachCond, applyCond, set, params); + } + + @Override + public boolean canStart(BuffInfo info) + { + return info.getEffected().isPlayer(); + } + + @Override + public int getEffectFlags() + { + return EffectFlag.DISARMED.getMask(); + } + + @Override + public void onStart(BuffInfo info) + { + info.getEffected().getActingPlayer().disarmArmor(); + } +} diff --git a/trunk/dist/game/data/stats/skills/10500-10599.xml b/trunk/dist/game/data/stats/skills/10500-10599.xml index e76851e4e9..4b75a731bb 100644 --- a/trunk/dist/game/data/stats/skills/10500-10599.xml +++ b/trunk/dist/game/data/stats/skills/10500-10599.xml @@ -933,7 +933,7 @@ - + @@ -1877,9 +1877,15 @@ - - - + + + + + + + + + diff --git a/trunk/dist/game/data/stats/skills/10700-10799.xml b/trunk/dist/game/data/stats/skills/10700-10799.xml index 10e817846e..2719c2757a 100644 --- a/trunk/dist/game/data/stats/skills/10700-10799.xml +++ b/trunk/dist/game/data/stats/skills/10700-10799.xml @@ -50,10 +50,34 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/stats/skills/TODO.xlsx b/trunk/dist/game/data/stats/skills/TODO.xlsx index 1a79ee682d..fcdaab80af 100644 Binary files a/trunk/dist/game/data/stats/skills/TODO.xlsx and b/trunk/dist/game/data/stats/skills/TODO.xlsx differ diff --git a/trunk/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/trunk/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index bcc5718aae..16c49a2f08 100644 --- a/trunk/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/trunk/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -6607,6 +6607,47 @@ public final class L2PcInstance extends L2Playable return true; } + /** + * Disarm the player's Armor. + * @return {@code true}. + */ + public boolean disarmArmor() + { + final L2ItemInstance chest = getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST); + if (chest != null) + { + final L2ItemInstance[] unequiped = getInventory().unEquipItemInBodySlotAndRecord(chest.getItem().getBodyPart()); + final InventoryUpdate iu = new InventoryUpdate(); + for (L2ItemInstance itm : unequiped) + { + iu.addModifiedItem(itm); + } + sendPacket(iu); + + abortAttack(); + broadcastUserInfo(); + + // this can be 0 if the user pressed the right mousebutton twice very fast + if (unequiped.length > 0) + { + SystemMessage sm = null; + if (unequiped[0].getEnchantLevel() > 0) + { + sm = SystemMessage.getSystemMessage(SystemMessageId.THE_EQUIPMENT_S1_S2_HAS_BEEN_REMOVED); + sm.addInt(unequiped[0].getEnchantLevel()); + sm.addItemName(unequiped[0]); + } + else + { + sm = SystemMessage.getSystemMessage(SystemMessageId.S1_HAS_BEEN_UNEQUIPPED); + sm.addItemName(unequiped[0]); + } + sendPacket(sm); + } + } + return true; + } + public boolean mount(L2Summon pet) { if (!Config.ALLOW_MOUNTS_DURING_SIEGE && isInsideZone(ZoneId.SIEGE)) diff --git a/trunk/java/com/l2jmobius/gameserver/model/skills/AbnormalType.java b/trunk/java/com/l2jmobius/gameserver/model/skills/AbnormalType.java index 19ea9b8507..33f62f052b 100644 --- a/trunk/java/com/l2jmobius/gameserver/model/skills/AbnormalType.java +++ b/trunk/java/com/l2jmobius/gameserver/model/skills/AbnormalType.java @@ -117,6 +117,7 @@ public enum AbnormalType DERANGEMENT, DETECT_WEAKNESS, DISARM, + DISBODY, DITTY_BUFF, DMG_SHIELD, DOT_ATTR,