summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 45bc7abd0..5c77f186a 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -7028,8 +7028,11 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned
break;
case UNT_MOONLIT:
//Knockback out of area if affected char isn't in Moonlit effect
- if (!sc || sc->data[SC_DANCING].timer==-1 || (sc->data[SC_DANCING].val1&0xFFFF) != CG_MOONLIT)
- skill_blown(ss, bl, skill_get_blewcount(sg->skill_id,sg->skill_lv));
+ if (sc && sc->data[SC_DANCING].timer!=-1 && (sc->data[SC_DANCING].val1&0xFFFF) == CG_MOONLIT)
+ break;
+ if (ss == bl) //Also needed to prevent infinite loop crash.
+ break;
+ skill_blown(ss, bl, skill_get_blewcount(sg->skill_id,sg->skill_lv));
break;
}
return skillid;