Skip to content

Commit

Permalink
Resolves players escaping jail early (rathena#7781)
Browse files Browse the repository at this point in the history
* Fixes rathena#7771.
* Adds a missing check to avoid warping players who are actively jailed out early after relogging.
Thanks to @fab10Carvalho and @Lemongrass3110!
  • Loading branch information
aleos89 authored Nov 6, 2023
1 parent 66dddb3 commit 2cfafe4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/map/pc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2cfafe4

Please sign in to comment.