- 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:
erlandys56
2015-01-25 11:52:47 +00:00
parent effe7c4033
commit c38b542dda
19 changed files with 573 additions and 29 deletions

View File

@ -15044,7 +15044,11 @@ public final class L2PcInstance extends L2Playable
{
return _vitPoints;
}
return getSubClasses().get(getClassIndex()).getVitalityPoints();
if (getSubClasses().containsKey(getClassIndex()))
{
return getSubClasses().get(getClassIndex()).getVitalityPoints();
}
return _vitPoints;
}
public void setVitalityPoints(int points)
@ -15054,6 +15058,10 @@ public final class L2PcInstance extends L2Playable
_vitPoints = points;
return;
}
getSubClasses().get(getClassIndex()).setVitalityPoints(points);
if (getSubClasses().containsKey(getClassIndex()))
{
getSubClasses().get(getClassIndex()).setVitalityPoints(points);
}
_vitPoints = points;
}
}

View File

@ -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