Fix failed chr save due to null jail expiration
This commit is contained in:
@@ -8487,7 +8487,7 @@ public class Character extends AbstractCharacterObject {
|
||||
ps.setInt(46, stats.omokLosses());
|
||||
ps.setInt(47, stats.omokTies());
|
||||
ps.setString(48, stats.dataString());
|
||||
ps.setLong(49, stats.jailExpiration());
|
||||
ps.setLong(49, Objects.requireNonNullElse(stats.jailExpiration(), 0L));
|
||||
ps.setInt(50, Objects.requireNonNullElse(stats.partnerId(), -1));
|
||||
ps.setInt(51, Objects.requireNonNullElse(stats.marriageItemId(), -1));
|
||||
ps.setTimestamp(52, new Timestamp(stats.lastExpGainTime()));
|
||||
|
||||
@@ -127,8 +127,8 @@ public class CharacterRepository {
|
||||
.bind("ariant_points", stats.ariantPoints())
|
||||
.bind("data_string", stats.dataString())
|
||||
.bind("party_search", stats.canRecvPartySearchInvite())
|
||||
.bind("jail_expire", new Timestamp(stats.jailExpiration()))
|
||||
.bind("last_exp_gain", new Timestamp(stats.lastExpGainTime()))
|
||||
.bind("jail_expire", stats.jailExpiration() != null ? new Timestamp(stats.jailExpiration()) : null)
|
||||
.bind("last_exp_gain", stats.lastExpGainTime() != null ? new Timestamp(stats.lastExpGainTime()) : null)
|
||||
.bind("partner_id", stats.partnerId())
|
||||
.bind("marriage_item_id", stats.marriageItemId())
|
||||
.bind("id", stats.id())
|
||||
|
||||
Reference in New Issue
Block a user