summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/skill.c28
2 files changed, 13 insertions, 16 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 90260a74e..84bea03bc 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2395,7 +2395,6 @@ struct Damage battle_calc_misc_attack(
if( src == NULL || target == NULL ){
nullpo_info(NLP_MARK);
- memset(&md,0,sizeof(md));
return md;
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 22dfc71a7..7cd697cc9 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -6769,15 +6769,18 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
sg->state.into_abyss = 1; //Prevent Remove Trap from giving you the trap back. [Skotlex]
break;
+ case UNT_CLAYMORETRAP:
case UNT_BLASTMINE:
+ //Hold number of targets (required for damage calculation)
+ type = map_foreachinrange(skill_count_target,&src->bl,
+ skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl);
case UNT_SHOCKWAVE:
case UNT_SANDMAN:
case UNT_FLASHER:
case UNT_FREEZINGTRAP:
- case UNT_CLAYMORETRAP:
map_foreachinrange(skill_trap_splash,&src->bl,
skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag,
- &src->bl,tick);
+ &src->bl,tick,type);
sg->unit_id = UNT_USED_TRAPS;
clif_changetraplook(&src->bl, UNT_USED_TRAPS);
sg->limit=DIFF_TICK(tick,sg->tick)+1500;
@@ -8928,18 +8931,9 @@ int skill_ganbatein (struct block_list *bl, va_list ap)
*/
int skill_count_target (struct block_list *bl, va_list ap)
{
- struct block_list *src;
- int *c;
-
- nullpo_retr(0, bl);
- nullpo_retr(0, ap);
-
- if ((src = va_arg(ap,struct block_list *)) == NULL)
- return 0;
- if ((c = va_arg(ap,int *)) == NULL)
- return 0;
+ struct block_list *src = va_arg(ap,struct block_list *);
if (battle_check_target(src,bl,BCT_ENEMY) > 0)
- (*c)++;
+ return 1;
return 0;
}
/*==========================================
@@ -8953,10 +8947,11 @@ int skill_trap_splash (struct block_list *bl, va_list ap)
struct skill_unit *unit;
struct skill_unit_group *sg;
struct block_list *ss;
-
+ int i,count;
src = va_arg(ap,struct block_list *);
unit = (struct skill_unit *)src;
tick = va_arg(ap,int);
+ count = va_arg(ap,int);
nullpo_retr(0, sg = unit->group);
nullpo_retr(0, ss = map_id2bl(sg->src_id));
@@ -8970,7 +8965,10 @@ int skill_trap_splash (struct block_list *bl, va_list ap)
break;
case UNT_BLASTMINE:
case UNT_CLAYMORETRAP:
- skill_attack(BF_MISC,ss,src,bl,sg->skill_id,sg->skill_lv,tick,0);
+ //Special property: Each target is hit N times (N = number of targets on splash area)
+ if (!count) count = 1;
+ for(i=0;i<count;i++)
+ skill_attack(BF_MISC,ss,src,bl,sg->skill_id,sg->skill_lv,tick,0);
break;
case UNT_FREEZINGTRAP:
skill_attack(BF_WEAPON,ss,src,bl,sg->skill_id,sg->skill_lv,tick,0);