diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-03-27 21:46:15 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-03-27 21:46:15 +0000 |
commit | a5d02326f3402788e9b9fabf74924adad2d6d724 (patch) | |
tree | 4f09eb8a608025f0b553dc58379293a0106e0803 /src/map/skill.c | |
parent | c19b8831b8134d9e8f000d8d5ee18ebaa2164fea (diff) | |
download | hercules-a5d02326f3402788e9b9fabf74924adad2d6d724.tar.gz hercules-a5d02326f3402788e9b9fabf74924adad2d6d724.tar.bz2 hercules-a5d02326f3402788e9b9fabf74924adad2d6d724.tar.xz hercules-a5d02326f3402788e9b9fabf74924adad2d6d724.zip |
- Changed a bit the Moonlit code to prevent an infinite loop
- Changed clif_skillcasting definition to take as argument the element of the skill.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10083 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 7 |
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; |