From a180d7f8f651fa7a79efdd275cd707559025c388 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 19 Feb 2014 14:36:28 -0300 Subject: 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 --- src/map/skill.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/map') 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; /** -- cgit v1.2.3-70-g09d2