diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/skill.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 1015f2092..4ccda7030 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -5824,10 +5824,13 @@ int skill_castend_pos2(struct block_list* src, int x, int y, int skillid, int sk pc_delitem(sd,j,skill_db[skillid].amount[i],0); clif_skill_poseffect(src,skillid,skilllv,x,y,tick); - if (rand()%100 < 50) - mob_once_spawn(sd, src->m, x, y, "--ja--",(skilllv < 2 ? 1084+rand()%2 : 1078+rand()%6), 1, ""); - else + if (rand()%100 < 50) { clif_skill_fail(sd,skillid,0,0); + } else { + TBL_MOB* md = mob_once_spawn_sub(src, src->m, x, y, "--ja--",(skilllv < 2 ? 1084+rand()%2 : 1078+rand()%6),""); + if (md && (i = skill_get_time(skillid, skilllv)) > 0) + md->deletetimer = add_timer (tick + i, mob_timer_delete, md->bl.id, 0); + } } break; |