Enable drop items while casting.

This commit is contained in:
MobiusDev
2018-09-11 02:24:00 +00:00
parent 727c95a665
commit 7abf95378f
9 changed files with 36 additions and 20 deletions

View File

@ -25,6 +25,7 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
import com.l2jmobius.gameserver.model.items.L2Item;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.model.items.type.ActionType;
import com.l2jmobius.gameserver.model.items.type.EtcItemType;
import com.l2jmobius.gameserver.model.zone.ZoneId;
import com.l2jmobius.gameserver.network.L2GameClient;
@ -140,8 +141,8 @@ public final class RequestDropItem implements IClientIncomingPacket
return;
}
// Cannot discard item that the skill is consuming
if (activeChar.isCastingNow(s -> s.getSkill().getItemConsumeId() == item.getId()))
// Cannot discard item that the skill is consuming.
if (activeChar.isCastingNow(s -> (s.getSkill().getItemConsumeId() == item.getId()) && (item.getItem().getDefaultAction() == ActionType.SKILL_REDUCE_ON_SKILL_SUCCESS)))
{
activeChar.sendPacket(SystemMessageId.THIS_ITEM_CANNOT_BE_DESTROYED);
return;