diff options
author | toms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-19 16:57:03 +0000 |
---|---|---|
committer | toms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-19 16:57:03 +0000 |
commit | d247f8ddabb26c53e89b85f66b378ccb2af5aa07 (patch) | |
tree | f0e7162d2713e19faf2309ff0d977c5933e623f6 /src/map/skill.c | |
parent | 63ac1e270cb7c1502bab5f0f66f6f3648c5ec00b (diff) | |
download | hercules-d247f8ddabb26c53e89b85f66b378ccb2af5aa07.tar.gz hercules-d247f8ddabb26c53e89b85f66b378ccb2af5aa07.tar.bz2 hercules-d247f8ddabb26c53e89b85f66b378ccb2af5aa07.tar.xz hercules-d247f8ddabb26c53e89b85f66b378ccb2af5aa07.zip |
Fixed HAMI_CASTLE
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8366 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index e3fa451f0..fe6b57d97 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -5523,12 +5523,15 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in break; case HAMI_CASTLE: //[orn] - if(rand()%100 > 20*skilllv || src == bl) - break; //Failed. + if (src == bl && sd && sd->hd && merc_is_hom_active(sd->hd)) // (If used with @useskill, put the homunc as dest) + bl = &sd->hd->bl; + if(rand()%100 < 20*skilllv && src != bl) { int x,y; x = src->x; y = src->y; + if (hd) + skill_blockmerc_start(hd, skillid, skill_get_time2(skillid,skilllv)); if (unit_movepos(src,bl->x,bl->y,0,0)) { clif_skill_nodamage(src,bl,skillid,skilllv,1); @@ -5541,6 +5544,14 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in AREA_SIZE, BL_MOB, bl, src); } } + else + { + // Failed + if (hd) + clif_skill_fail(hd->master, skillid, 0, 0); + else + clif_skill_fail(sd, skillid, 0, 0); + } break; case HVAN_CHAOTIC: //[orn] { |