summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-03 07:41:12 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-03 07:41:12 +0000
commit0acd37664f6f39a1cbc0c95ec598b2c32016d9f4 (patch)
tree6950f7659bc53427a862172513df818a7887f16b /src/map/skill.c
parentff6944d6d2d9c41b543bbfba163cfd0b4d44c888 (diff)
downloadhercules-0acd37664f6f39a1cbc0c95ec598b2c32016d9f4.tar.gz
hercules-0acd37664f6f39a1cbc0c95ec598b2c32016d9f4.tar.bz2
hercules-0acd37664f6f39a1cbc0c95ec598b2c32016d9f4.tar.xz
hercules-0acd37664f6f39a1cbc0c95ec598b2c32016d9f4.zip
Fixed bugreport:6156 HT_REMOVETRAP must show a skill fail message when it fails.
Fixed bugreport:4160 after casting skills it should now check for the path if it is ok to execute same as official behavior. Fixed bugreport:5830 now caster should not hit/chase target between an obstacle same as official behavior. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16370 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index c7874093f..71a048b8a 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -6622,9 +6622,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
break;
case MA_REMOVETRAP:
- case HT_REMOVETRAP:
- //FIXME: I think clif_skill_fail() is supposed to be sent if it fails below [ultramage]
- clif_skill_nodamage(src, bl, skillid, skilllv, 1);
+ case HT_REMOVETRAP:
{
struct skill_unit* su;
struct skill_unit_group* sg;
@@ -6634,6 +6632,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
// Players can only remove their own traps or traps on Vs maps.
if( su && (sg = su->group) && (src->type == BL_MER || sg->src_id == src->id || map_flag_vs(bl->m)) && (skill_get_inf2(sg->skill_id)&INF2_TRAP) )
{
+ clif_skill_nodamage(src, bl, skillid, skilllv, 1);
if( sd && !(sg->unit_id == UNT_USED_TRAPS || (sg->unit_id == UNT_ANKLESNARE && sg->val2 != 0 )) )
{ // prevent picking up expired traps
if( battle_config.skill_removetrap_type )
@@ -6669,7 +6668,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
}
}
skill_delunit(su);
- }
+ }else if(sd)
+ clif_skill_fail(sd, skillid, USESKILL_FAIL_LEVEL, 0);
+
}
break;
case HT_SPRINGTRAP:
@@ -8823,6 +8824,9 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data)
skill_consume_requirement(sd,ud->skillid,ud->skilllv,1);
}
+ if( !path_search_long(NULL, src->m, src->x, src->y, target->x, target->y, CELL_CHKWALL) )
+ break;
+
if( (src->type == BL_MER || src->type == BL_HOM) && !skill_check_condition_mercenary(src, ud->skillid, ud->skilllv, 1) )
break;