ItemTable slot variable refactor, plus other minor code changes.

This commit is contained in:
MobiusDev
2016-06-25 12:24:23 +00:00
parent b4ba1fc0a5
commit 2d382fad91
10 changed files with 60 additions and 63 deletions

View File

@ -1727,14 +1727,11 @@ public abstract class Inventory extends ItemContainer
// find same (or incompatible) brooch jewel type
for (int i = PAPERDOLL_BROOCH_JEWEL1; i < (PAPERDOLL_BROOCH_JEWEL1 + getBroochJewelSlots()); i++)
{
if (_paperdoll[i] != null)
if ((_paperdoll[i] != null) && (getPaperdollItemId(i) == item.getId()))
{
if (getPaperdollItemId(i) == item.getId())
{
// overwtite
setPaperdollItem(i, item);
return;
}
// overwtite
setPaperdollItem(i, item);
return;
}
}

View File

@ -199,7 +199,7 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
_duration = set.getInt("duration", -1);
_time = set.getInt("time", -1);
_autoDestroyTime = set.getInt("auto_destroy_time", -1) * 1000;
_bodyPart = ItemTable._slots.get(set.getString("bodypart", "none"));
_bodyPart = ItemTable.SLOTS.get(set.getString("bodypart", "none"));
_referencePrice = set.getInt("price", 0);
_crystalType = set.getEnum("crystal_type", CrystalType.class, CrystalType.NONE);
_crystalCount = set.getInt("crystal_count", 0);

View File

@ -84,7 +84,7 @@ public class AppearanceStone
addTargetType(targetType);
}
final int bodyPart = ItemTable._slots.get(set.getString("bodyPart", "none"));
final int bodyPart = ItemTable.SLOTS.get(set.getString("bodyPart", "none"));
if (bodyPart != L2Item.SLOT_NONE)
{
addBodyPart(bodyPart);