From 9089ea1e9998663f0573abca89ed542f19418b11 Mon Sep 17 00:00:00 2001 From: panikon Date: Sat, 24 May 2014 12:39:01 -0300 Subject: Fixed issue in [AT](un)jail when jailing players in sec_pri (issue: 8206) http://hercules.ws/board/tracker/issue-8206-jail-bug/ --- src/map/status.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/map/status.c b/src/map/status.c index a1a7e1969..a716b8913 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -8243,7 +8243,14 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t tick_time = 1000; // [GodLesZ] tick time break; case SC_JAILED: - //Val1 is duration in minutes. Use INT_MAX to specify 'unlimited' time. + // val1 is duration in minutes. Use INT_MAX to specify 'unlimited' time. + // When first called: + // val2 Jail map_index + // val3 x + // val4 y + // When renewing status' information + // val3 Return map_index + // val4 return coordinates tick = val1>0?1000:250; if (sd) { @@ -8256,7 +8263,10 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t //2. Set restore point (val3 -> return map, val4 return coords val3 = map_index; val4 = pos; - } else if (!val3 || val3 == sd->mapindex) { //Use save point. + } else if (!val3 + || val3 == sd->mapindex + || !sd->sc.data[SC_JAILED] // If player is being jailed and is already in jail (issue: 8206) + ) { //Use save point. val3 = sd->status.save_point.map; val4 = (sd->status.save_point.x&0xFFFF) |(sd->status.save_point.y<<16); -- cgit v1.2.3-60-g2f50