L2JMobius

Free Users => Work in Progress => Topic started by: oRiGiNaL on April 15, 2021, 08:40:32 PM

Title: Item on inventory for buff time!
Post by: oRiGiNaL on April 15, 2021, 08:40:32 PM
Ello folks, i want to ask if this method added on Skill.java do what i want. What i want? A item keeped on inventory by player and for change bufftime to 2 hours in this case. If SkillDurationList it;s 1 hour, with this Item ( 2 hours ) Total i want to be 3 hours.
Here it is method. ( I don't know if it's good as method )

Code: [Select]
if (player.getInventory().getItemByItemId(17423) != null)
{
if (player.getInventory().getInventoryItemCount(17423, -1, false) < 1)
{
player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT_2);
return;
}

int duration = 7200;

abnormalTime = abnormalTime + duration;
}