- r101 fixed error for friend memo (SQL).
- Fixed Awakening social action. - Implemented configs for awakening to skip or not Seize of Destiny quest and Scroll of Afterlife item. - Fixed mentee getting 2 letters with 2 headphones and fixed skill error, when adding mentee. - Implemented Change Attribute stone engine.
This commit is contained in:
@ -1153,6 +1153,36 @@ public final class L2ItemInstance extends L2Object
|
||||
}
|
||||
}
|
||||
|
||||
public void changeAttribute(byte element, int value)
|
||||
{
|
||||
if (_elementals == null)
|
||||
{
|
||||
_elementals = new Elementals[1];
|
||||
_elementals[0] = new Elementals(element, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
Elementals elm = getElemental(element);
|
||||
if (elm != null)
|
||||
{
|
||||
elm.setValue(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
_elementals = new Elementals[1];
|
||||
_elementals[0] = new Elementals(element, value);
|
||||
}
|
||||
}
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
|
||||
{
|
||||
updateItemElements(con);
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
_log.log(Level.SEVERE, "Could not update elementals for item: " + this + " from DB:", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add elemental attribute to item and save to db
|
||||
* @param element
|
||||
|
Reference in New Issue
Block a user