summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-11 10:36:56 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-11 10:36:56 +0000
commit346d82c7d47afa212738d1a5b07eb3780ad46620 (patch)
treef3cf6b88eb3f4eea6dbef92ee6aa107c5971bf5b /src
parent234ababd8c1a9df4391c6c54f9167f625e432dc2 (diff)
downloadhercules-346d82c7d47afa212738d1a5b07eb3780ad46620.tar.gz
hercules-346d82c7d47afa212738d1a5b07eb3780ad46620.tar.bz2
hercules-346d82c7d47afa212738d1a5b07eb3780ad46620.tar.xz
hercules-346d82c7d47afa212738d1a5b07eb3780ad46620.zip
- Corrected CR_CULTIVATION to cause summoned plants to expire after 5 minutes.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12052 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/skill.c9
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;