L2JMobius

C6 Clan crest

phanie · 6 · 6875

Offline phanie

  • Heir
  • **
    • Posts: 12
I think I found a bug. When I delete the crest from the clan and execute the server restart, the crest comes back next.


Offline G-hamsteR

  • Viscount
  • *****
    • Posts: 335
I just confirmed it. The bug is there.


Offline G-hamsteR

  • Viscount
  • *****
    • Posts: 335
You can try this:

Code: [Select]
diff --git a/java/org/l2jmobius/gameserver/network/clientpackets/RequestSetPledgeCrest.java b/java/org/l2jmobius/gameserver/network/clientpackets/RequestSetPledgeCrest.java
index 7985986..1088700 100644
--- a/java/org/l2jmobius/gameserver/network/clientpackets/RequestSetPledgeCrest.java
+++ b/java/org/l2jmobius/gameserver/network/clientpackets/RequestSetPledgeCrest.java
@@ -93,6 +93,18 @@
  member.broadcastUserInfo();
  }
 
+ try (Connection con = DatabaseFactory.getConnection())
+ {
+ final PreparedStatement statement = con.prepareStatement("UPDATE clan_data SET crest_id = ? WHERE clan_id = ?");
+ statement.setInt(1, 0);
+ statement.setInt(2, clan.getClanId());
+ statement.executeUpdate();
+ statement.close();
+ }
+ catch (SQLException e)
+ {
+ LOGGER.warning("could not update the crest id:" + e.getMessage());
+ }
  return;
  }
 


Offline G-hamsteR

  • Viscount
  • *****
    • Posts: 335
I just tested it and the patch is working :)