L2JMobius

Free Users => General Discussion => Topic started by: realAprox on April 14, 2021, 11:58:30 PM

Title: item.getIcon() NOT WORKING [FIXED]
Post by: realAprox on April 14, 2021, 11:58:30 PM
Simple problem..
Trying to use
Code: [Select]
.getIcon();in file handlers.admincommandhandlers.AdminEnchant.java.

But whenever I add imports:
Code: [Select]
import org.l2jmobius.gameserver.data.ItemTable;
import org.l2jmobius.gameserver.model.items.Item;

Eclipse automatically removes them...

I use code:
Code: [Select]
ItemInstance Item = activeChar.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
returnHtml = returnHtml.replace("%wp_icon%", Item.getIcon());

And it returns error:
Quote
The method getIcon() is undefinde for for the type ItemInstance


Help ?
Title: Re: item.getIcon() NOT WORKING [FIXED]
Post by: realAprox on April 15, 2021, 12:36:42 AM
UPDATE:

have to use:
Code: [Select]
final Item item = ItemTable.getInstance().getTemplate(activeChar.getInventory().getPaperdollItemId(your item));