summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-02-19 14:36:28 -0300
committershennetsind <ind@henn.et>2014-02-19 14:36:28 -0300
commita180d7f8f651fa7a79efdd275cd707559025c388 (patch)
tree00150b5701bf8bd10f5665d289d4b35d6fd7ff75 /src/map
parente209661a07884873a822a0d95b944a71f4973fce (diff)
downloadhercules-a180d7f8f651fa7a79efdd275cd707559025c388.tar.gz
hercules-a180d7f8f651fa7a79efdd275cd707559025c388.tar.bz2
hercules-a180d7f8f651fa7a79efdd275cd707559025c388.tar.xz
hercules-a180d7f8f651fa7a79efdd275cd707559025c388.zip
Fixed warmer issue that'd cause a crash when clear_skills_on_death is enabled
Perhaps the cause to 8026 http://hercules.ws/board/tracker/issue-8026-map-server-crash-feb-16th-2014/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/skill.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index a95aca7f3..37ee297ca 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -11541,6 +11541,7 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6
int count = 0;
const int x = bl->x, y = bl->y;
+ map->freeblock_lock();
//If target isn't knocked back it should hit every "interval" ms [Playtester]
do {
if( bl->type == BL_PC )
@@ -11554,8 +11555,9 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6
sg->limit = DIFF_TICK32(tick,sg->tick);
break;
}
- } while( x == bl->x && y == bl->y
+ } while( x == bl->x && y == bl->y && sg->alive_count
&& ++count < SKILLUNITTIMER_INTERVAL/sg->interval && !status->isdead(bl) );
+ map->freeblock_unlock();
}
break;
/**