Rework sending notes to chr, get rid of the first method
Sending notes should not be the handled by Character
This commit is contained in:
@@ -8796,14 +8796,10 @@ public class Character extends AbstractCharacterObject {
|
||||
}
|
||||
|
||||
public void sendNote(String to, String msg, byte fame) throws SQLException {
|
||||
sendNote(to, this.getName(), msg, fame);
|
||||
}
|
||||
|
||||
public static void sendNote(String to, String from, String msg, byte fame) throws SQLException {
|
||||
try (Connection con = DatabaseConnection.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("INSERT INTO notes (`to`, `from`, `message`, `timestamp`, `fame`) VALUES (?, ?, ?, ?, ?)", Statement.RETURN_GENERATED_KEYS)) {
|
||||
ps.setString(1, to);
|
||||
ps.setString(2, from);
|
||||
ps.setString(2, this.getName());
|
||||
ps.setString(3, msg);
|
||||
ps.setLong(4, Server.getInstance().getCurrentTime());
|
||||
ps.setByte(5, fame);
|
||||
|
||||
Reference in New Issue
Block a user