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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index fd7dc61d9..aee4fb99f 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3305,10 +3305,11 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
}
do {
abra_skillid = rand() % MAX_SKILL_ABRA_DB;
- if (skill_abra_db[abra_skillid].req_lv > skilllv ||
- rand()%10000 >= skill_abra_db[abra_skillid].per ||
- skill_get_inf2(abra_skillid)&INF2_NPC_SKILL ||
- skill_get_unit_flag(abra_skillid) &(UF_DANCE|UF_ENSEMBLE|UF_SONG)
+ if (
+ skill_get_inf2(abra_skillid)&(INF2_NPC_SKILL|INF2_SONG_DANCE|INF2_ENSEMBLE_SKILL) || //NPC/Song/Dance skills are out
+ !skill_get_inf(abra_skillid) || //Passive skills cannot be casted
+ skill_abra_db[abra_skillid].req_lv > skilllv || //Required lv for it to appear
+ rand()%10000 >= skill_abra_db[abra_skillid].per
)
abra_skillid = 0; // reset to get a new id
} while (abra_skillid == 0);