summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2014-03-16 17:35:34 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2014-03-16 17:35:34 +0800
commit235ec5df3f3b19843523109228d86196f71c9798 (patch)
tree03953830bf1e60c39dc433a33e1329c0d48f2b13 /src/map
parent26bc0cf56b4867fab222a15de18ac43ff799b9e8 (diff)
downloadhercules-235ec5df3f3b19843523109228d86196f71c9798.tar.gz
hercules-235ec5df3f3b19843523109228d86196f71c9798.tar.bz2
hercules-235ec5df3f3b19843523109228d86196f71c9798.tar.xz
hercules-235ec5df3f3b19843523109228d86196f71c9798.zip
Fixed Bug#8086
-http://hercules.ws/board/tracker/issue-8086-overbrand-mega-bug/ Notice: old behavior of LG_OVERBRAND contains exploitable bug..this patch must pull to eliminate the bug Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/skill.c29
1 files changed, 7 insertions, 22 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 554528af2..78f5fe3f1 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3264,16 +3264,9 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) {
skill->unitsetting(src,skl->skill_id,skl->skill_lv,skl->x,skl->y,(skl->type<<16)|skl->flag);
break;
case LG_OVERBRAND_BRANDISH:
- {
- short x2 = src->x, y2 = src->y, x = x2, y = y2;
- switch( skl->type ){
- case 0: case 1: case 7: x2 += 4; x -= 4; y2 += 4; break;
- case 3: case 4: case 5: x2 += 4; x -= 4; y -= 4; break;
- case 2: y2 += 4; y -= 4; x -= 4; break;
- case 6: y2 += 4; y -= 4; x2 += 4; break;
- }
- map->foreachinarea(skill->area_sub, src->m, x, y, x2, y2, BL_CHAR, src, skl->skill_id, skl->skill_lv, tick, skl->flag|BCT_ENEMY|SD_ANIMATION|1,skill->castend_damage_id);
- }
+ skill->area_temp[1] = 0;
+ map->foreachinpath(skill->attack_area,src->m,src->x,src->y,skl->x,skl->y,4,2,BL_CHAR,
+ skill->get_type(skl->skill_id),src,src,skl->skill_id,skl->skill_lv,tick,skl->flag,BCT_ENEMY);
break;
case GN_CRAZYWEED:
if( skl->type >= 0 ) {
@@ -10423,18 +10416,10 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
break;
case LG_OVERBRAND:
- {
- uint8 dir = map->calc_dir(src, x, y);
- uint8 x2 = x = src->x, y2 = y = src->y;
- switch( dir ){
- case 0: case 1: case 7: x2++; x--; y2 += 7; break;
- case 3: case 4: case 5: x2++; x--; y -= 7; break;
- case 2: y2++; y--; x -= 7;break;
- case 6: y2++; y--; x2 += 7;break;
- }
- map->foreachinarea(skill->area_sub, src->m, x, y, x2, y2, BL_CHAR, src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_ANIMATION|1,skill->castend_damage_id);
- skill->addtimerskill(src,timer->gettick() + status_get_amotion(src), 0, 0, 0, LG_OVERBRAND_BRANDISH, skill_lv, dir, flag);
- }
+ skill->area_temp[1] = 0;
+ map->foreachinpath(skill->attack_area,src->m,src->x,src->y,x,y,1,5,BL_CHAR,
+ skill->get_type(skill_id),src,src,skill_id,skill_lv,tick,flag,BCT_ENEMY);
+ skill->addtimerskill(src,timer->gettick() + status_get_amotion(src), 0, x, y, LG_OVERBRAND_BRANDISH, skill_lv, 0, flag);
break;
case LG_BANDING: