Code improvements.
This commit is contained in:
@ -136,12 +136,12 @@ public class Ingredient
|
||||
|
||||
public final boolean isStackable()
|
||||
{
|
||||
return _template == null ? true : _template.isStackable();
|
||||
return (_template == null) || _template.isStackable();
|
||||
}
|
||||
|
||||
public final boolean isArmorOrWeapon()
|
||||
{
|
||||
return _template == null ? false : (_template instanceof L2Armor) || (_template instanceof L2Weapon);
|
||||
return (_template != null) && ((_template instanceof L2Armor) || (_template instanceof L2Weapon));
|
||||
}
|
||||
|
||||
public final int getWeight()
|
||||
|
@ -61,7 +61,7 @@ public class PreparedEntry extends Entry
|
||||
// do not yet add this adena amount to the list as non-taxIngredient adena might be entered later (order not guaranteed)
|
||||
continue;
|
||||
}
|
||||
else if (maintainEnchantment && (item != null) && ing.isArmorOrWeapon())
|
||||
if (maintainEnchantment && (item != null) && ing.isArmorOrWeapon())
|
||||
{
|
||||
info = new ItemInfo(item);
|
||||
final Ingredient newIngredient = ing.getCopy();
|
||||
@ -70,8 +70,7 @@ public class PreparedEntry extends Entry
|
||||
}
|
||||
else
|
||||
{
|
||||
final Ingredient newIngredient = ing.getCopy();
|
||||
_ingredients.add(newIngredient);
|
||||
_ingredients.add(ing.getCopy());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,6 +103,6 @@ public class PreparedListContainer extends ListContainer
|
||||
|
||||
public final boolean checkNpcObjectId(int npcObjectId)
|
||||
{
|
||||
return _npcObjectId != 0 ? _npcObjectId == npcObjectId : true;
|
||||
return (_npcObjectId == 0) || (_npcObjectId == npcObjectId);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user