» Find Revision
L2J Revision Number: 3472
L2JDP Revision Number:6575
Is it normal that skills use items at the end of cast, like scrolls of escape, major heal and etc?

I think it should be like:
Updated:
L2Character.java
Code: Select all
private void beginCast(L2Skill skill, boolean simultaneously) { ... if (effectWhileCasting) { ... } else {[color=#0000BF]+ // Consume Items if necessary and Send the Server->Client packet InventoryUpdate with Item modification to all the L2Character[/color][color=#0000BF]+ if (skill.getItemConsume() > 0)[/color][color=#0000BF]+ {[/color][color=#0000BF]+ if (!destroyItemByItemId("Consume", skill.getItemConsumeId(), skill.getItemConsume(), null, false))[/color][color=#0000BF]+ {[/color][color=#0000BF]+ sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_ITEMS));[/color][color=#0000BF]+ if (simultaneously)[/color][color=#0000BF]+ setIsCastingSimultaneouslyNow(false);[/color][color=#0000BF]+ else[/color][color=#0000BF]+ setIsCastingNow(false);[/color][color=#0000BF]+ if (this instanceof L2PcInstance)[/color][color=#0000BF]+ getAI().setIntention(AI_INTENTION_ACTIVE);[/color][color=#0000BF]+ return;[/color][color=#0000BF]+ }[/color][color=#0000BF]+ }[/color] } ... }...public void onMagicHitTimer(L2Object[] targets, L2Skill skill, int coolTime, boolean instant, boolean simultaneously) { ...[color=#FF0000]- // Consume Items if necessary and Send the Server->Client packet InventoryUpdate with Item modification to all the L2Character[/color][color=#FF0000]- if (skill.getItemConsume() > 0)[/color][color=#FF0000]- {[/color][color=#FF0000]- if (!destroyItemByItemId("Consume", skill.getItemConsumeId(), skill.getItemConsume(), null, false))[/color][color=#FF0000]- {[/color][color=#FF0000]- sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_ITEMS));[/color][color=#FF0000]- abortCast();[/color][color=#FF0000]- return;[/color][color=#FF0000]- }[/color][color=#FF0000]- }[/color] ... }