Augmentation improvements/fixes.
This commit is contained in:
@@ -126,17 +126,17 @@ public class ItemInfo
|
||||
// Get the action to do clientside
|
||||
switch (item.getLastChange())
|
||||
{
|
||||
case (L2ItemInstance.ADDED):
|
||||
case L2ItemInstance.ADDED:
|
||||
{
|
||||
_change = 1;
|
||||
break;
|
||||
}
|
||||
case (L2ItemInstance.MODIFIED):
|
||||
case L2ItemInstance.MODIFIED:
|
||||
{
|
||||
_change = 2;
|
||||
break;
|
||||
}
|
||||
case (L2ItemInstance.REMOVED):
|
||||
case L2ItemInstance.REMOVED:
|
||||
{
|
||||
_change = 3;
|
||||
break;
|
||||
@@ -183,8 +183,8 @@ public class ItemInfo
|
||||
// Get the enchant level of the L2ItemInstance
|
||||
_enchant = item.getEnchant();
|
||||
|
||||
// Get the augmentation boni
|
||||
_augmentation = 0;
|
||||
// Get the augmentation bonus
|
||||
_augmentation = item.getAugmentId();
|
||||
|
||||
// Get the quantity of the L2ItemInstance
|
||||
_count = item.getCount();
|
||||
@@ -332,6 +332,16 @@ public class ItemInfo
|
||||
return _augmentation;
|
||||
}
|
||||
|
||||
public int get1stAugmentationId()
|
||||
{
|
||||
return 0x0000FFFF & getAugmentationBonus();
|
||||
}
|
||||
|
||||
public int get2ndAugmentationId()
|
||||
{
|
||||
return getAugmentationBonus() >> 16;
|
||||
}
|
||||
|
||||
public long getCount()
|
||||
{
|
||||
return _count;
|
||||
|
@@ -123,6 +123,7 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
|
||||
private int _itemId;
|
||||
private int _displayId;
|
||||
private String _name;
|
||||
private String _additionalName;
|
||||
private String _icon;
|
||||
private int _weight;
|
||||
private boolean _stackable;
|
||||
@@ -190,6 +191,7 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
|
||||
_itemId = set.getInt("item_id");
|
||||
_displayId = set.getInt("displayId", _itemId);
|
||||
_name = set.getString("name");
|
||||
_additionalName = set.getString("additionalName", null);
|
||||
_icon = set.getString("icon", null);
|
||||
_weight = set.getInt("weight", 0);
|
||||
_materialType = set.getEnum("material", MaterialType.class, MaterialType.STEEL);
|
||||
@@ -377,12 +379,18 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
|
||||
{
|
||||
case S80:
|
||||
case S84:
|
||||
{
|
||||
return CrystalType.S;
|
||||
}
|
||||
case R95:
|
||||
case R99:
|
||||
{
|
||||
return CrystalType.R;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return _crystalType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -440,6 +448,14 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
|
||||
return _name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the item's additional name.
|
||||
*/
|
||||
public String getAdditionalName()
|
||||
{
|
||||
return _additionalName;
|
||||
}
|
||||
|
||||
public Collection<AttributeHolder> getAttributes()
|
||||
{
|
||||
return _elementals != null ? _elementals.values() : null;
|
||||
@@ -601,17 +617,17 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable
|
||||
|
||||
public boolean isPotion()
|
||||
{
|
||||
return (getItemType() == EtcItemType.POTION);
|
||||
return getItemType() == EtcItemType.POTION;
|
||||
}
|
||||
|
||||
public boolean isElixir()
|
||||
{
|
||||
return (getItemType() == EtcItemType.ELIXIR);
|
||||
return getItemType() == EtcItemType.ELIXIR;
|
||||
}
|
||||
|
||||
public boolean isScroll()
|
||||
{
|
||||
return (getItemType() == EtcItemType.SCROLL);
|
||||
return getItemType() == EtcItemType.SCROLL;
|
||||
}
|
||||
|
||||
public List<FuncTemplate> getFunctionTemplates()
|
||||
|
Reference in New Issue
Block a user