Client Timestamp update + Cosmetic NPCs & H Beacon patch + Log rework
Fixed Music command not playing soundtracks at all. Fixed stylish scripts stucking player NPC interactions in certain cases. Reviewed client mistimed view on items, quest expirations, BBS threads, etc. Fixed Homing Beacon skill provoking autoflag in mobs with same objectid in different maps. Solved DB leak cases with removing pets from inventory. Reviewed logging throughout the source, aiming to normalize the varied-spaced log content within the facilities. Fixed a bug that would occur when trying to reaccess Horntail expedition.
This commit is contained in:
@@ -81,17 +81,24 @@ public class MaplePet extends Item {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteFromDb() {
|
||||
|
||||
public static void deleteFromDb(int petid) {
|
||||
try {
|
||||
Connection con = DatabaseConnection.getConnection();
|
||||
|
||||
PreparedStatement ps = con.prepareStatement("DELETE FROM pets WHERE `petid` = ?");
|
||||
ps.setInt(1, this.getUniqueId());
|
||||
ps.setInt(1, petid);
|
||||
ps.executeUpdate();
|
||||
ps.close();
|
||||
|
||||
ps = con.prepareStatement("DELETE FROM petignores WHERE `petid` = ?"); // thanks Vcoc for detecting petignores remaining after deletion
|
||||
ps.setInt(1, petid);
|
||||
ps.executeUpdate();
|
||||
ps.close();
|
||||
|
||||
con.close();
|
||||
|
||||
MapleCashidGenerator.freeCashId(this.getUniqueId());
|
||||
MapleCashidGenerator.freeCashId(petid);
|
||||
} catch (SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user