Man i dont find this
_taxPercent = rs.getInt("taxPercent");
_treasury = rs.getLong("treasury");
+
+ _showNpcCrest = rs.getBoolean("showNpcCrest");
}
rs.close();
statement.close();
@@ -1129,6 +1133,20 @@
return _treasury;
}
+ public final boolean getShowNpcCrest()
+ {
+ return _showNpcCrest;
+ }
+
+ public final void setShowNpcCrest(boolean showNpcCrest)
+ {
+ if (_showNpcCrest != showNpcCrest)
+ {
+ _showNpcCrest = showNpcCrest;
+ updateShowNpcCrest();
+ }
+ }
+
public List<SeedProduction> getSeedProduction(int period)
{
return (period == CastleManorManager.PERIOD_CURRENT ? _production : _productionNext);
@@ -1579,6 +1597,36 @@
}
}
+ public void updateShowNpcCrest()
+ {
+ Connection con = null;
+ PreparedStatement statement;
+ try
+ {
+ con = L2DatabaseFactory.getInstance().getConnection();
+
+ statement = con.prepareStatement("UPDATE castle SET showNpcCrest = ? WHERE id = ?");
+ statement.setString(1, String.valueOf(getShowNpcCrest()));
+ statement.setInt(2, getCastleId());
+ statement.execute();
+ statement.close();
+ }
+ catch (Exception e)
+ {
+ _log.info("Error saving showNpcCrest for castle " + getName() + ": " + e.getMessage());
+ }
+ finally
+ {
+ try
+ {
+ con.close();
+ }
+ catch (Exception e)
+ {
+ }
+ }
+ }
+
public FastList<L2Skill> getResidentialSkills()
{
return _residentialSkills;
same here http://www.l2jserver.com/svn/branches/L2_GameServer_T2.3/java/net/sf/l2j/gameserver/model/entity/Siege.java