con = DatabaseFactory.getInstance().getConnection();
statement = con.prepareStatement(GET_HEROES);
rset = statement.executeQuery();
while (rset.next())
{
StatsSet hero = new StatsSet();
int charId = rset.getInt(Olympiad.CHAR_ID);
hero.set(Olympiad.CHAR_NAME, Olympiad.getNobleName(charId));
hero.set(Olympiad.CLASS_ID, Olympiad.getNobleClass(charId));
hero.set(COUNT, rset.getInt(COUNT));
hero.set(PLAYED, rset.getInt(PLAYED));
hero.set(ACTIVE, rset.getInt(ACTIVE));
HeroSetClanAndAlly(charId, hero);
loadDiary(charId);
loadMessage(charId);
_heroes.put(charId, hero);
}
DbUtils.close(statement, rset);
statement = con.prepareStatement(GET_ALL_HEROES);
rset = statement.executeQuery();
while (rset.next())
{
StatsSet hero = new StatsSet();
int charId = rset.getInt(Olympiad.CHAR_ID);
hero.set(Olympiad.CHAR_NAME, Olympiad.getNobleName(charId));
hero.set(Olympiad.CLASS_ID, Olympiad.getNobleClass(charId));
hero.set(COUNT, rset.getInt(COUNT));
hero.set(PLAYED, rset.getInt(PLAYED));
hero.set(ACTIVE, rset.getInt(ACTIVE));
HeroSetClanAndAlly(charId, hero);
_completeHeroes.put(charId, hero);
}
}
catch (SQLException e)