summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-04 03:47:01 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-04 03:47:01 +0000
commit9db1b86c18600df81a5f5d6099736349c0068755 (patch)
tree212c4b87cb7155340fab43d34e2186321b92e758 /src/map
parent3f205251d0846f9db5a72f931b4e2eaf67888af6 (diff)
downloadhercules-9db1b86c18600df81a5f5d6099736349c0068755.tar.gz
hercules-9db1b86c18600df81a5f5d6099736349c0068755.tar.bz2
hercules-9db1b86c18600df81a5f5d6099736349c0068755.tar.xz
hercules-9db1b86c18600df81a5f5d6099736349c0068755.zip
Fixed trap bugs as per bugreport:2817 (you finally can attack traps directly :0)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15380 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c7
-rw-r--r--src/map/skill.c8
2 files changed, 7 insertions, 8 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 9b79927da..784d4b8bd 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3945,10 +3945,9 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
TBL_SKILL *su = (TBL_SKILL*)target;
if( !su->group )
return 0;
- if( skill_get_inf2(su->group->skill_id)&INF2_TRAP )
- { //Only a few skills can target traps...
- switch( battle_getcurrentskill(src) )
- {
+ if( skill_get_inf2(su->group->skill_id)&INF2_TRAP ) { //Only a few skills can target traps...
+ switch( battle_getcurrentskill(src) ) {
+ case 0://you can hit them without skills
case MA_REMOVETRAP:
case HT_REMOVETRAP:
case AC_SHOWER:
diff --git a/src/map/skill.c b/src/map/skill.c
index b612e6c2f..4ad5a2f22 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -9750,13 +9750,13 @@ int skill_unit_ondamaged (struct skill_unit *src, struct block_list *bl, int dam
nullpo_ret(src);
nullpo_ret(sg=src->group);
- switch( sg->unit_id )
- {
+ switch( sg->unit_id ) {
case UNT_SKIDTRAP:
case UNT_LANDMINE:
case UNT_SHOCKWAVE:
case UNT_SANDMAN:
case UNT_FLASHER:
+ case UNT_CLAYMORETRAP:
case UNT_FREEZINGTRAP:
case UNT_TALKIEBOX:
case UNT_ANKLESNARE:
@@ -9764,8 +9764,7 @@ int skill_unit_ondamaged (struct skill_unit *src, struct block_list *bl, int dam
src->val1-=damage;
break;
case UNT_BLASTMINE:
- case UNT_CLAYMORETRAP:
- skill_blown(bl, &src->bl, 2, -1, 0);
+ skill_blown(bl, &src->bl, 3, -1, 0);
break;
default:
damage = 0;
@@ -12588,6 +12587,7 @@ static int skill_unit_timer_sub (DBKey key, void* data, va_list ap)
case UNT_SHOCKWAVE:
case UNT_SANDMAN:
case UNT_FLASHER:
+ case UNT_CLAYMORETRAP:
case UNT_FREEZINGTRAP:
case UNT_TALKIEBOX:
case UNT_ANKLESNARE: