Skip to content

Commit f2b8ced

Browse files
committed
Move chr MySQL saving to CharacterSaver
1 parent a4f8086 commit f2b8ced

File tree

7 files changed

+677
-413
lines changed

7 files changed

+677
-413
lines changed

src/main/java/client/Character.java

Lines changed: 19 additions & 389 deletions
Large diffs are not rendered by default.

src/main/java/client/inventory/Pet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public static void deleteFromDb(Character owner, int petid) {
109109
}
110110
}
111111

112-
public void saveToDb() {
112+
public void saveToDb() { // TODO: throw SQLException
113113
try (Connection con = DatabaseConnection.getConnection();
114114
PreparedStatement ps = con.prepareStatement("UPDATE pets SET name = ?, level = ?, closeness = ?, fullness = ?, summoned = ?, flag = ? WHERE petid = ?")) {
115115
ps.setString(1, getName());
@@ -325,4 +325,4 @@ public void updatePosition(List<LifeMovementFragment> movement) {
325325
}
326326
}
327327
}
328-
}
328+
}

0 commit comments

Comments
 (0)