Pārlūkot izejas kodu

BETA: L2Item now implements IIdentifiable interface.

Suggested by: u3games
Zoey76 11 gadi atpakaļ
vecāks
revīzija
032e8071c9
21 mainītis faili ar 68 papildinājumiem un 66 dzēšanām
  1. 8 8
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/ItemTable.java
  2. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/OfflineTradersTable.java
  3. 6 6
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/TradeList.java
  4. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/buylist/Product.java
  5. 3 3
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/itemcontainer/PcInventory.java
  6. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/items/L2EtcItem.java
  7. 5 3
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/items/L2Item.java
  8. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/items/L2WarehouseItem.java
  9. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/items/enchant/EnchantRateItem.java
  10. 3 3
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/items/instance/L2ItemInstance.java
  11. 22 22
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/quest/Quest.java
  12. 5 5
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/quest/QuestTimer.java
  13. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/RequestConfirmRefinerItem.java
  14. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/RequestCrystallizeItem.java
  15. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/RequestRefundItem.java
  16. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/UseItem.java
  17. 2 2
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/ConfirmDlg.java
  18. 2 2
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/ExItemAuctionInfoPacket.java
  19. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/PrivateStoreManageListBuy.java
  20. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/PrivateStoreManageListSell.java
  21. 1 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/SystemMessage.java

+ 8 - 8
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/ItemTable.java

@@ -204,21 +204,21 @@ public class ItemTable
 		_weapons.clear();
 		for (L2Item item : DocumentEngine.getInstance().loadItems())
 		{
-			if (highest < item.getItemId())
+			if (highest < item.getId())
 			{
-				highest = item.getItemId();
+				highest = item.getId();
 			}
 			if (item instanceof L2EtcItem)
 			{
-				_etcItems.put(item.getItemId(), (L2EtcItem) item);
+				_etcItems.put(item.getId(), (L2EtcItem) item);
 			}
 			else if (item instanceof L2Armor)
 			{
-				_armors.put(item.getItemId(), (L2Armor) item);
+				_armors.put(item.getId(), (L2Armor) item);
 			}
 			else
 			{
-				_weapons.put(item.getItemId(), (L2Weapon) item);
+				_weapons.put(item.getId(), (L2Weapon) item);
 			}
 		}
 		buildFastLookupTable(highest);
@@ -241,19 +241,19 @@ public class ItemTable
 		// Insert armor item in Fast Look Up Table
 		for (L2Armor item : _armors.values())
 		{
-			_allTemplates[item.getItemId()] = item;
+			_allTemplates[item.getId()] = item;
 		}
 		
 		// Insert weapon item in Fast Look Up Table
 		for (L2Weapon item : _weapons.values())
 		{
-			_allTemplates[item.getItemId()] = item;
+			_allTemplates[item.getId()] = item;
 		}
 		
 		// Insert etcItem item in Fast Look Up Table
 		for (L2EtcItem item : _etcItems.values())
 		{
-			_allTemplates[item.getItemId()] = item;
+			_allTemplates[item.getId()] = item;
 		}
 	}
 	

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/OfflineTradersTable.java

@@ -83,7 +83,7 @@ public class OfflineTradersTable
 								for (TradeItem i : pc.getBuyList().getItems())
 								{
 									stm_items.setInt(1, pc.getObjectId());
-									stm_items.setInt(2, i.getItem().getItemId());
+									stm_items.setInt(2, i.getItem().getId());
 									stm_items.setLong(3, i.getCount());
 									stm_items.setLong(4, i.getPrice());
 									stm_items.executeUpdate();

+ 6 - 6
L2J_Server_BETA/java/com/l2jserver/gameserver/model/TradeList.java

@@ -152,7 +152,7 @@ public class TradeList
 		{
 			for (TradeItem exclItem : _items)
 			{
-				if (exclItem.getItem().getItemId() == item.getId())
+				if (exclItem.getItem().getId() == item.getId())
 				{
 					if (item.getCount() <= exclItem.getCount())
 					{
@@ -330,7 +330,7 @@ public class TradeList
 		
 		for (TradeItem titem : _items)
 		{
-			if ((titem.getObjectId() == objectId) || (titem.getItem().getItemId() == itemId))
+			if ((titem.getObjectId() == objectId) || (titem.getItem().getId() == itemId))
 			{
 				// If Partner has already confirmed this trade, invalidate the confirmation
 				if (_partner != null)
@@ -564,7 +564,7 @@ public class TradeList
 			{
 				continue;
 			}
-			L2Item template = ItemTable.getInstance().getTemplate(item.getItem().getItemId());
+			L2Item template = ItemTable.getInstance().getTemplate(item.getItem().getId());
 			if (template == null)
 			{
 				continue;
@@ -573,7 +573,7 @@ public class TradeList
 			{
 				slots += item.getCount();
 			}
-			else if (partner.getInventory().getItemByItemId(item.getItem().getItemId()) == null)
+			else if (partner.getInventory().getItemByItemId(item.getItem().getId()) == null)
 			{
 				slots++;
 			}
@@ -595,7 +595,7 @@ public class TradeList
 			{
 				continue;
 			}
-			L2Item template = ItemTable.getInstance().getTemplate(item.getItem().getItemId());
+			L2Item template = ItemTable.getInstance().getTemplate(item.getItem().getId());
 			if (template == null)
 			{
 				continue;
@@ -928,7 +928,7 @@ public class TradeList
 			
 			for (TradeItem ti : _items)
 			{
-				if (ti.getItem().getItemId() == item.getItemId())
+				if (ti.getItem().getId() == item.getItemId())
 				{
 					// price should be the same
 					if (ti.getPrice() == item.getPrice())

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/buylist/Product.java

@@ -70,7 +70,7 @@ public final class Product
 	
 	public int getItemId()
 	{
-		return getItem().getItemId();
+		return getItem().getId();
 	}
 	
 	public long getPrice()

+ 3 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/model/itemcontainer/PcInventory.java

@@ -407,7 +407,7 @@ public class PcInventory extends Inventory
 	public void adjustAvailableItem(TradeItem item)
 	{
 		boolean notAllEquipped = false;
-		for (L2ItemInstance adjItem : getItemsByItemId(item.getItem().getItemId()))
+		for (L2ItemInstance adjItem : getItemsByItemId(item.getItem().getId()))
 		{
 			if (adjItem.isEquipable())
 			{
@@ -424,7 +424,7 @@ public class PcInventory extends Inventory
 		}
 		if (notAllEquipped)
 		{
-			L2ItemInstance adjItem = getItemByItemId(item.getItem().getItemId());
+			L2ItemInstance adjItem = getItemByItemId(item.getItem().getId());
 			item.setObjectId(adjItem.getObjectId());
 			item.setEnchant(adjItem.getEnchantLevel());
 			
@@ -848,7 +848,7 @@ public class PcInventory extends Inventory
 			for (L2Item item : itemList)
 			{
 				// If the item is not stackable or is stackable and not present in inventory, will need a slot.
-				if (!item.isStackable() || (getInventoryItemCount(item.getItemId(), -1) <= 0))
+				if (!item.isStackable() || (getInventoryItemCount(item.getId(), -1) <= 0))
 				{
 					requiredSlots++;
 				}

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/items/L2EtcItem.java

@@ -71,7 +71,7 @@ public final class L2EtcItem extends L2Item
 		{
 			_type2 = L2Item.TYPE2_QUEST;
 		}
-		else if ((getItemId() == PcInventory.ADENA_ID) || (getItemId() == PcInventory.ANCIENT_ADENA_ID))
+		else if ((getId() == PcInventory.ADENA_ID) || (getId() == PcInventory.ANCIENT_ADENA_ID))
 		{
 			_type2 = L2Item.TYPE2_MONEY;
 		}

+ 5 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/model/items/L2Item.java

@@ -39,6 +39,7 @@ import com.l2jserver.gameserver.model.conditions.ConditionPetType;
 import com.l2jserver.gameserver.model.effects.EffectTemplate;
 import com.l2jserver.gameserver.model.effects.L2Effect;
 import com.l2jserver.gameserver.model.holders.SkillHolder;
+import com.l2jserver.gameserver.model.interfaces.IIdentifiable;
 import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
 import com.l2jserver.gameserver.model.items.type.L2ActionType;
 import com.l2jserver.gameserver.model.items.type.L2EtcItemType;
@@ -62,7 +63,7 @@ import com.l2jserver.util.StringUtil;
  * </ul>
  * @version $Revision: 1.7.2.2.2.5 $ $Date: 2005/04/06 18:25:18 $
  */
-public abstract class L2Item
+public abstract class L2Item implements IIdentifiable
 {
 	protected static final Logger _log = Logger.getLogger(L2Item.class.getName());
 	
@@ -451,7 +452,8 @@ public abstract class L2Item
 	 * Returns the ID of the item
 	 * @return int
 	 */
-	public final int getItemId()
+	@Override
+	public final int getId()
 	{
 		return _itemId;
 	}
@@ -746,7 +748,7 @@ public abstract class L2Item
 	 */
 	public final int isEnchantable()
 	{
-		return Arrays.binarySearch(Config.ENCHANT_BLACKLIST, getItemId()) < 0 ? _enchantable : 0;
+		return Arrays.binarySearch(Config.ENCHANT_BLACKLIST, getId()) < 0 ? _enchantable : 0;
 	}
 	
 	/**

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/items/L2WarehouseItem.java

@@ -164,7 +164,7 @@ public class L2WarehouseItem
 	 */
 	public final int getItemId()
 	{
-		return _item.getItemId();
+		return _item.getId();
 	}
 	
 	/**

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/items/enchant/EnchantRateItem.java

@@ -76,7 +76,7 @@ public final class EnchantRateItem
 	 */
 	public boolean validate(L2Item item)
 	{
-		if ((_itemId != 0) && (_itemId != item.getItemId()))
+		if ((_itemId != 0) && (_itemId != item.getId()))
 		{
 			return false;
 		}

+ 3 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/model/items/instance/L2ItemInstance.java

@@ -227,7 +227,7 @@ public final class L2ItemInstance extends L2Object
 	{
 		super(objectId);
 		setInstanceType(InstanceType.L2ItemInstance);
-		_itemId = item.getItemId();
+		_itemId = item.getId();
 		_item = item;
 		if (_itemId == 0)
 		{
@@ -327,7 +327,7 @@ public final class L2ItemInstance extends L2Object
 		
 		if (Config.LOG_ITEMS)
 		{
-			if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (getItem().isEquipable() || (getItem().getItemId() == ADENA_ID))))
+			if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (getItem().isEquipable() || (getItem().getId() == ADENA_ID))))
 			{
 				LogRecord record = new LogRecord(Level.INFO, "SETOWNER:" + process);
 				record.setLoggerName("item");
@@ -494,7 +494,7 @@ public final class L2ItemInstance extends L2Object
 		
 		if (Config.LOG_ITEMS && (process != null))
 		{
-			if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (_item.isEquipable() || (_item.getItemId() == ADENA_ID))))
+			if (!Config.LOG_ITEMS_SMALL_LOG || (Config.LOG_ITEMS_SMALL_LOG && (_item.isEquipable() || (_item.getId() == ADENA_ID))))
 			{
 				LogRecord record = new LogRecord(Level.INFO, "CHANGE:" + process);
 				record.setLoggerName("item");

+ 22 - 22
L2J_Server_BETA/java/com/l2jserver/gameserver/model/quest/Quest.java

@@ -235,7 +235,7 @@ public class Quest extends ManagedScript implements IIdentifiable
 		
 		/**
 		 * Get a {@link PlaySound} packet by its name.
-		 * @param soundName : the name of the sound to look for
+		 * @param soundName the name of the sound to look for
 		 * @return the {@link PlaySound} packet with the specified sound or {@code null} if one was not found
 		 */
 		public static PlaySound getSound(String soundName)
@@ -3306,12 +3306,12 @@ public class Quest extends ManagedScript implements IIdentifiable
 	/**
 	 * Give the specified player a set amount of items if he is lucky enough.<br>
 	 * Not recommended to use this for non-stacking items.
-	 * @param player : the player to give the item(s) to
-	 * @param itemId : the ID of the item to give
-	 * @param amountToGive : the amount of items to give
-	 * @param limit : the maximum amount of items the player can have. Won't give more if this limit is reached. 0 - no limit.
-	 * @param dropChance : the drop chance as a decimal digit from 0 to 1
-	 * @param playSound : if true, plays ItemSound.quest_itemget when items are given and ItemSound.quest_middle when the limit is reached
+	 * @param player the player to give the item(s) to
+	 * @param itemId the ID of the item to give
+	 * @param amountToGive the amount of items to give
+	 * @param limit the maximum amount of items the player can have. Won't give more if this limit is reached. 0 - no limit.
+	 * @param dropChance the drop chance as a decimal digit from 0 to 1
+	 * @param playSound if true, plays ItemSound.quest_itemget when items are given and ItemSound.quest_middle when the limit is reached
 	 * @return {@code true} if the player has collected {@code limit} of the specified item, {@code false} otherwise
 	 */
 	public static boolean giveItemRandomly(L2PcInstance player, int itemId, long amountToGive, long limit, double dropChance, boolean playSound)
@@ -3322,13 +3322,13 @@ public class Quest extends ManagedScript implements IIdentifiable
 	/**
 	 * Give the specified player a set amount of items if he is lucky enough.<br>
 	 * Not recommended to use this for non-stacking items.
-	 * @param player : the player to give the item(s) to
-	 * @param npc : the NPC that "dropped" the item (can be null)
-	 * @param itemId : the ID of the item to give
-	 * @param amountToGive : the amount of items to give
-	 * @param limit : the maximum amount of items the player can have. Won't give more if this limit is reached. 0 - no limit.
-	 * @param dropChance : the drop chance as a decimal digit from 0 to 1
-	 * @param playSound : if true, plays ItemSound.quest_itemget when items are given and ItemSound.quest_middle when the limit is reached
+	 * @param player the player to give the item(s) to
+	 * @param npc the NPC that "dropped" the item (can be null)
+	 * @param itemId the ID of the item to give
+	 * @param amountToGive the amount of items to give
+	 * @param limit the maximum amount of items the player can have. Won't give more if this limit is reached. 0 - no limit.
+	 * @param dropChance the drop chance as a decimal digit from 0 to 1
+	 * @param playSound if true, plays ItemSound.quest_itemget when items are given and ItemSound.quest_middle when the limit is reached
 	 * @return {@code true} if the player has collected {@code limit} of the specified item, {@code false} otherwise
 	 */
 	public static boolean giveItemRandomly(L2PcInstance player, L2Npc npc, int itemId, long amountToGive, long limit, double dropChance, boolean playSound)
@@ -3339,14 +3339,14 @@ public class Quest extends ManagedScript implements IIdentifiable
 	/**
 	 * Give the specified player a random amount of items if he is lucky enough.<br>
 	 * Not recommended to use this for non-stacking items.
-	 * @param player : the player to give the item(s) to
-	 * @param npc : the NPC that "dropped" the item (can be null)
-	 * @param itemId : the ID of the item to give
-	 * @param minAmount : the minimum amount of items to give
-	 * @param maxAmount : the maximum amount of items to give (will give a random amount between min/maxAmount multiplied by quest rates)
-	 * @param limit : the maximum amount of items the player can have. Won't give more if this limit is reached. 0 - no limit.
-	 * @param dropChance : the drop chance as a decimal digit from 0 to 1
-	 * @param playSound : if true, plays ItemSound.quest_itemget when items are given and ItemSound.quest_middle when the limit is reached
+	 * @param player the player to give the item(s) to
+	 * @param npc the NPC that "dropped" the item (can be null)
+	 * @param itemId the ID of the item to give
+	 * @param minAmount the minimum amount of items to give
+	 * @param maxAmount the maximum amount of items to give (will give a random amount between min/maxAmount multiplied by quest rates)
+	 * @param limit the maximum amount of items the player can have. Won't give more if this limit is reached. 0 - no limit.
+	 * @param dropChance the drop chance as a decimal digit from 0 to 1
+	 * @param playSound if true, plays ItemSound.quest_itemget when items are given and ItemSound.quest_middle when the limit is reached
 	 * @return {@code true} if the player has collected {@code limit} of the specified item, {@code false} otherwise
 	 */
 	public static boolean giveItemRandomly(L2PcInstance player, L2Npc npc, int itemId, long minAmount, long maxAmount, long limit, double dropChance, boolean playSound)

+ 5 - 5
L2J_Server_BETA/java/com/l2jserver/gameserver/model/quest/QuestTimer.java

@@ -112,11 +112,11 @@ public class QuestTimer
 	}
 	
 	/**
-	 * public method to compare if this timer matches with the key attributes passed.
-	 * @param quest : Quest instance to which the timer is attached
-	 * @param name : Name of the timer
-	 * @param npc : Npc instance attached to the desired timer (null if no npc attached)
-	 * @param player : Player instance attached to the desired timer (null if no player attached)
+	 * Compares if this timer matches with the key attributes passed.
+	 * @param quest the quest to which the timer is attached
+	 * @param name the name of the timer
+	 * @param npc the NPC attached to the desired timer (null if no NPC attached)
+	 * @param player the player attached to the desired timer (null if no player attached)
 	 * @return
 	 */
 	public boolean isMatch(Quest quest, String name, L2Npc npc, L2PcInstance player)

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/RequestConfirmRefinerItem.java

@@ -68,7 +68,7 @@ public class RequestConfirmRefinerItem extends AbstractRefinePacket
 			return;
 		}
 		
-		final int refinerItemId = refinerItem.getItem().getItemId();
+		final int refinerItemId = refinerItem.getItem().getId();
 		final int grade = targetItem.getItem().getItemGrade();
 		final LifeStone ls = getLifeStone(refinerItemId);
 		final int gemStoneId = getGemStoneId(grade);

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/RequestCrystallizeItem.java

@@ -120,7 +120,7 @@ public final class RequestCrystallizeItem extends L2GameClientPacket
 		
 		if (!itemToRemove.getItem().isCrystallizable() || (itemToRemove.getItem().getCrystalCount() <= 0) || (itemToRemove.getItem().getCrystalType() == L2Item.CRYSTAL_NONE))
 		{
-			_log.warning(activeChar.getName() + " (" + activeChar.getObjectId() + ") tried to crystallize " + itemToRemove.getItem().getItemId());
+			_log.warning(activeChar.getName() + " (" + activeChar.getObjectId() + ") tried to crystallize " + itemToRemove.getItem().getId());
 			return;
 		}
 		

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/RequestRefundItem.java

@@ -177,7 +177,7 @@ public final class RequestRefundItem extends L2GameClientPacket
 			{
 				slots += count;
 			}
-			else if (player.getInventory().getItemByItemId(template.getItemId()) == null)
+			else if (player.getInventory().getItemByItemId(template.getId()) == null)
 			{
 				slots++;
 			}

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/UseItem.java

@@ -227,7 +227,7 @@ public final class UseItem extends L2GameClientPacket
 				case L2Item.SLOT_R_HAND:
 				{
 					// Prevent players to equip weapon while wearing combat flag
-					if ((activeChar.getActiveWeaponItem() != null) && (activeChar.getActiveWeaponItem().getItemId() == 9819))
+					if ((activeChar.getActiveWeaponItem() != null) && (activeChar.getActiveWeaponItem().getId() == 9819))
 					{
 						activeChar.sendPacket(SystemMessageId.CANNOT_EQUIP_ITEM_DUE_TO_BAD_CONDITION);
 						return;

+ 2 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/ConfirmDlg.java

@@ -135,13 +135,13 @@ public class ConfirmDlg extends L2GameServerPacket
 	
 	public ConfirmDlg addItemName(L2ItemInstance item)
 	{
-		return addItemName(item.getItem().getItemId());
+		return addItemName(item.getItem().getId());
 	}
 	
 	public ConfirmDlg addItemName(L2Item item)
 	{
 		// TODO: template id for items
-		return addItemName(item.getItemId());
+		return addItemName(item.getId());
 	}
 	
 	public ConfirmDlg addItemName(int id)

+ 2 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/ExItemAuctionInfoPacket.java

@@ -78,8 +78,8 @@ public final class ExItemAuctionInfoPacket extends L2GameServerPacket
 	
 	private final void writeItemInfo(final ItemInfo item)
 	{
-		writeD(item.getItem().getItemId());
-		writeD(item.getItem().getItemId());
+		writeD(item.getItem().getId());
+		writeD(item.getItem().getId());
 		writeD(item.getLocation());
 		writeQ(item.getCount());
 		writeH(item.getItem().getType2());

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/PrivateStoreManageListBuy.java

@@ -83,7 +83,7 @@ public class PrivateStoreManageListBuy extends L2GameServerPacket
 		for (TradeItem item : _buyList)
 		{
 			writeD(item.getObjectId());
-			writeD(item.getItem().getItemId());
+			writeD(item.getItem().getId());
 			writeD(item.getLocationSlot());
 			writeQ(item.getCount());
 			writeH(item.getItem().getType2());

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/PrivateStoreManageListSell.java

@@ -85,7 +85,7 @@ public class PrivateStoreManageListSell extends L2GameServerPacket
 		for (TradeItem item : _sellList)
 		{
 			writeD(item.getObjectId());
-			writeD(item.getItem().getItemId());
+			writeD(item.getItem().getId());
 			writeD(item.getLocationSlot());
 			writeQ(item.getCount());
 			writeH(item.getItem().getType2());

+ 1 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/network/serverpackets/SystemMessage.java

@@ -308,7 +308,7 @@ public final class SystemMessage extends L2GameServerPacket
 	
 	public final SystemMessage addItemName(final L2Item item)
 	{
-		return addItemName(item.getItemId());
+		return addItemName(item.getId());
 	}
 	
 	public final SystemMessage addItemName(final int id)