summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-10 19:12:45 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-10 19:23:17 +0300
commitdc45b9c29cfcf7c64f95dc9f81b1612dda68341d (patch)
tree194eb0b7f881d436cca129ece3c69bd75e68fc24 /src/map/skill.c
parentc76aa5f4843a521b1839875bf6c139f4658bd6d1 (diff)
downloadhercules-dc45b9c29cfcf7c64f95dc9f81b1612dda68341d.tar.gz
hercules-dc45b9c29cfcf7c64f95dc9f81b1612dda68341d.tar.bz2
hercules-dc45b9c29cfcf7c64f95dc9f81b1612dda68341d.tar.xz
hercules-dc45b9c29cfcf7c64f95dc9f81b1612dda68341d.zip
Add to path search functions source bl for plugins usage.
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 2582ca2b6..6e50a3116 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3374,13 +3374,13 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) {
case WZ_METEOR:
if( skl->type >= 0 ) {
int x = skl->type>>16, y = skl->type&0xFFFF;
- if( path->search_long(NULL, src->m, src->x, src->y, x, y, CELL_CHKWALL) )
+ if( path->search_long(NULL, src, src->m, src->x, src->y, x, y, CELL_CHKWALL) )
skill->unitsetting(src,skl->skill_id,skl->skill_lv,x,y,skl->flag);
- if( path->search_long(NULL, src->m, src->x, src->y, skl->x, skl->y, CELL_CHKWALL)
+ if( path->search_long(NULL, src, src->m, src->x, src->y, skl->x, skl->y, CELL_CHKWALL)
&& !map->getcell(src->m, skl->x, skl->y, CELL_CHKLANDPROTECTOR) )
clif->skill_poseffect(src,skl->skill_id,skl->skill_lv,skl->x,skl->y,tick);
}
- else if( path->search_long(NULL, src->m, src->x, src->y, skl->x, skl->y, CELL_CHKWALL) )
+ else if( path->search_long(NULL, src, src->m, src->x, src->y, skl->x, skl->y, CELL_CHKWALL) )
skill->unitsetting(src,skl->skill_id,skl->skill_lv,skl->x,skl->y,skl->flag);
break;
case GN_CRAZYWEED_ATK: {
@@ -3724,7 +3724,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
break;
case KN_CHARGEATK: {
- bool path_exists = path->search_long(NULL, src->m, src->x, src->y, bl->x, bl->y,CELL_CHKWALL);
+ bool path_exists = path->search_long(NULL, src, src->m, src->x, src->y, bl->x, bl->y,CELL_CHKWALL);
unsigned int dist = distance_bl(src, bl);
uint8 dir = map->calc_dir(bl, src->x, src->y);
@@ -4492,7 +4492,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
break;
case WL_FROSTMISTY:
// Doesn't deal damage through non-shootable walls.
- if( path->search(NULL,src->m,src->x,src->y,bl->x,bl->y,1,CELL_CHKWALL) )
+ if( path->search(NULL,src,src->m,src->x,src->y,bl->x,bl->y,1,CELL_CHKWALL) )
skill->attack(BF_MAGIC,src,src,bl,skill_id,skill_lv,tick,flag|SD_ANIMATION);
break;
case WL_HELLINFERNO:
@@ -4514,7 +4514,7 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
break;
}
case RA_WUGBITE:
- if( path->search(NULL,src->m,src->x,src->y,bl->x,bl->y,1,CELL_CHKNOREACH) ) {
+ if( path->search(NULL,src,src->m,src->x,src->y,bl->x,bl->y,1,CELL_CHKNOREACH) ) {
skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
}else if( sd && skill_id == RA_WUGBITE ) // Only RA_WUGBITE has the skill fail message.
clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0);
@@ -4945,7 +4945,7 @@ int skill_castend_id(int tid, int64 tick, int id, intptr_t data) {
}
if( ud->skill_id == RA_WUGSTRIKE ){
- if( !path->search(NULL,src->m,src->x,src->y,target->x,target->y,1,CELL_CHKNOREACH))
+ if( !path->search(NULL,src,src->m,src->x,src->y,target->x,target->y,1,CELL_CHKNOREACH))
break;
}
@@ -5037,7 +5037,7 @@ int skill_castend_id(int tid, int64 tick, int id, intptr_t data) {
skill->consume_requirement(sd,ud->skill_id,ud->skill_lv,1);
}
#ifdef OFFICIAL_WALKPATH
- if( !path->search_long(NULL, src->m, src->x, src->y, target->x, target->y, CELL_CHKWALL) )
+ if( !path->search_long(NULL, src, src->m, src->x, src->y, target->x, target->y, CELL_CHKWALL) )
break;
#endif
if( (src->type == BL_MER || src->type == BL_HOM) && !skill->check_condition_mercenary(src, ud->skill_id, ud->skill_lv, 1) )
@@ -10460,7 +10460,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
tmpx = x - area + rnd()%(area * 2 + 1);
tmpy = y - area + rnd()%(area * 2 + 1);
- if( i == 0 && path->search_long(NULL, src->m, src->x, src->y, tmpx, tmpy, CELL_CHKWALL)
+ if( i == 0 && path->search_long(NULL, src, src->m, src->x, src->y, tmpx, tmpy, CELL_CHKWALL)
&& !map->getcell(src->m, tmpx, tmpy, CELL_CHKLANDPROTECTOR))
clif->skill_poseffect(src,skill_id,skill_lv,tmpx,tmpy,tick);
@@ -11453,7 +11453,7 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_
if( !group->state.song_dance && !map->getcell(src->m,ux,uy,CELL_CHKREACH) )
continue; // don't place skill units on walls (except for songs/dances/encores)
- if( battle_config.skill_wall_check && skill->get_unit_flag(skill_id)&UF_PATHCHECK && !path->search_long(NULL,src->m,ux,uy,x,y,CELL_CHKWALL) )
+ if( battle_config.skill_wall_check && skill->get_unit_flag(skill_id)&UF_PATHCHECK && !path->search_long(NULL,src,src->m,ux,uy,x,y,CELL_CHKWALL) )
continue; // no path between cell and center of casting.
switch( skill_id ) {