From 8c8c486b843be4728e2a34a6cfa942137a90ac6f Mon Sep 17 00:00:00 2001 From: Cydh Ramdh Date: Sun, 11 Oct 2015 21:13:32 +0700 Subject: [PATCH] Fixed #665, Fxied SG Warm skills had chance to crash server. Thank @anacondaqq Signed-off-by: Cydh Ramdh --- src/map/skill.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/skill.c b/src/map/skill.c index 890d2ca07f..0384cae6aa 100755 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -13027,7 +13027,7 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, uns sg->limit = DIFF_TICK(tick,sg->tick); break; } - } while( x == bl->x && y == bl->y && + } while(sg->interval > 0 && x == bl->x && y == bl->y && ++count < SKILLUNITTIMER_INTERVAL/sg->interval && !status_isdead(bl) ); } break; @@ -13065,7 +13065,7 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, uns //Take into account these hit more times than the timer interval can handle. do skill_attack(BF_MAGIC,ss,&unit->bl,bl,sg->skill_id,sg->skill_lv,tick+count*sg->interval,0); - while(--unit->val2 && x == bl->x && y == bl->y && + while(sg->interval > 0 && --unit->val2 && x == bl->x && y == bl->y && ++count < SKILLUNITTIMER_INTERVAL/sg->interval && !status_isdead(bl)); if (unit->val2 <= 0)