summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-23 09:26:00 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-23 09:26:00 +0000
commit35467de0fb6dc06a402315ea478495d74080e3c5 (patch)
tree79659d470525996eb45773c0d196df440b35330e /src/map/skill.c
parent89974727211311dc13f3c823ab6f565f8942455b (diff)
downloadhercules-35467de0fb6dc06a402315ea478495d74080e3c5.tar.gz
hercules-35467de0fb6dc06a402315ea478495d74080e3c5.tar.bz2
hercules-35467de0fb6dc06a402315ea478495d74080e3c5.tar.xz
hercules-35467de0fb6dc06a402315ea478495d74080e3c5.zip
* Added script command pushpc, which is required by newer scripts.
- Moved knockback-part of skill_blown into unit_blown, to allow unconditional knockback required by pushpc without copy-pasting code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14492 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c41
1 files changed, 2 insertions, 39 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index a54bedc20..ccc3d96f9 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1467,8 +1467,7 @@ int skill_strip_equip(struct block_list *bl, unsigned short where, int rate, int
-------------------------------------------------------------------------*/
int skill_blown(struct block_list* src, struct block_list* target, int count, int direction, int flag)
{
- int dx = 0, dy = 0, nx, ny;
- int ret;
+ int dx = 0, dy = 0;
struct skill_unit* su = NULL;
nullpo_ret(src);
@@ -1514,43 +1513,7 @@ int skill_blown(struct block_list* src, struct block_list* target, int count, in
dy = -diry[direction];
}
- ret=path_blownpos(target->m,target->x,target->y,dx,dy,count);
- nx = ret>>16;
- ny = ret&0xffff;
-
- if (!su)
- unit_stop_walking(target,0);
-
- dx = nx - target->x;
- dy = ny - target->y;
-
- if (!dx && !dy) //Could not knockback.
- return 0;
-
- map_foreachinmovearea(clif_outsight, target, AREA_SIZE, dx, dy, target->type == BL_PC ? BL_ALL : BL_PC, target);
-
- if(su)
- skill_unit_move_unit_group(su->group,target->m,dx,dy);
- else
- map_moveblock(target, nx, ny, gettick());
-
- map_foreachinmovearea(clif_insight, target, AREA_SIZE, -dx, -dy, target->type == BL_PC ? BL_ALL : BL_PC, target);
-
- if(!(flag&0x1))
- clif_blown(target);
-
- if( target->type == BL_PC )
- {
- TBL_PC *sd = (TBL_PC*)target;
- if( sd->touching_id )
- npc_touchnext_areanpc(sd,false);
- if( map_getcell(target->m,target->x,target->y,CELL_CHKNPC) )
- npc_touch_areanpc(sd,target->m,target->x,target->y);
- else
- sd->areanpc_id=0;
- }
-
- return count; //Return amount of knocked back cells.
+ return unit_blown(target, dx, dy, count, flag&0x1);
}