From 2cfafe4c9f94bfff29fc4894f12b44211a6c4b31 Mon Sep 17 00:00:00 2001 From: Aleos Date: Mon, 6 Nov 2023 10:26:02 -0500 Subject: [PATCH] Resolves players escaping jail early (#7781) * Fixes #7771. * Adds a missing check to avoid warping players who are actively jailed out early after relogging. Thanks to @fab10Carvalho and @Lemongrass3110! --- src/map/pc.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/map/pc.cpp b/src/map/pc.cpp index f67cd39eb62..9d04474852e 100755 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -1926,6 +1926,11 @@ bool pc_lastpoint_special( map_session_data& sd ){ return true; } + if (strcmpi(sd.status.last_point.map, MAP_JAIL) == 0) { + // Don't return jailed player to save point. + return false; + } + // Maybe since the player's logout the nosave mapflag was added to the map if( mapdata->getMapFlag(MF_NOSAVE) ){ // The map has a specific return point