if (player != null)
{
if (player.getClan() != null)
{
player.getClan().setReputationScore(player.getClan().getReputationScore()+100, true);
player.getClan().broadcastToOnlineMembers(new PledgeShowInfoUpdate(player.getClan()));
SystemMessage sm = new SystemMessage(SystemMessageId.CLAN_MEMBER_S1_WAS_IN_HIGHEST_RANKED_PARTY_IN_FESTIVAL_OF_DARKNESS_AND_GAINED_S2_REPUTATION);
sm.addString(partyMemberName);
sm.addNumber(100);
player.getClan().broadcastToOnlineMembers(sm);
}
}
else
{
java.sql.Connection con = null;
try
{
con = L2DatabaseFactory.getInstance().getConnection();
PreparedStatement statement = con.prepareStatement(GET_CLAN_NAME);
statement.setString(1, partyMemberName);
ResultSet rset = statement.executeQuery();
if (rset.next())
{
String clanName = rset.getString("clan_name");
if (clanName != null)
{
L2Clan clan = ClanTable.getInstance().getClanByName(clanName);
if (clan != null)
{
clan.setReputationScore(clan.getReputationScore()+100, true);
clan.broadcastToOnlineMembers(new PledgeShowInfoUpdate(clan));
SystemMessage sm = new SystemMessage(SystemMessageId.CLAN_MEMBER_S1_WAS_IN_HIGHEST_RANKED_PARTY_IN_FESTIVAL_OF_DARKNESS_AND_GAINED_S2_REPUTATION);
sm.addString(partyMemberName);
sm.addNumber(100);
clan.broadcastToOnlineMembers(sm);
}