summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-14 13:38:49 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-14 13:38:49 +0000
commiteadab5ba5011a8b999c9a5674081df81c2d0b5a2 (patch)
tree36193534ec7d6f70ead7ce9420a08552f69813e5 /src/map/skill.c
parent2a4e63d1b98259c768b6691230e889fabcf3cc7a (diff)
downloadhercules-eadab5ba5011a8b999c9a5674081df81c2d0b5a2.tar.gz
hercules-eadab5ba5011a8b999c9a5674081df81c2d0b5a2.tar.bz2
hercules-eadab5ba5011a8b999c9a5674081df81c2d0b5a2.tar.xz
hercules-eadab5ba5011a8b999c9a5674081df81c2d0b5a2.zip
- Fixed player auto-attack not cancelling when dead.
- Some cleanups in skill_unit nooverlapping code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5595 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 0498d04c0..0c689a40f 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2054,13 +2054,9 @@ int skill_area_sub( struct block_list *bl,va_list ap )
static int skill_check_unit_range_sub( struct block_list *bl,va_list ap )
{
struct skill_unit *unit;
- int *c;
int skillid,g_skillid;
- nullpo_retr(0, bl);
- nullpo_retr(0, ap);
- nullpo_retr(0, unit = (struct skill_unit *)bl);
- nullpo_retr(0, c = va_arg(ap,int *));
+ unit = (struct skill_unit *)bl;
if(bl->prev == NULL || bl->type != BL_SKILL)
return 0;
@@ -2100,14 +2096,11 @@ static int skill_check_unit_range_sub( struct block_list *bl,va_list ap )
break;
}
- (*c)++;
-
return 1;
}
int skill_check_unit_range(int m,int x,int y,int skillid,int skilllv)
{
- int c = 0;
int range = skill_get_unit_range(skillid, skilllv);
int layout_type = skill_get_unit_layout_type(skillid,skilllv);
if (layout_type==-1 || layout_type>MAX_SQUARE_LAYOUT) {
@@ -2117,10 +2110,8 @@ int skill_check_unit_range(int m,int x,int y,int skillid,int skilllv)
// とりあえず?ウ方形のユニットレイアウトのみ対応
range += layout_type;
- map_foreachinarea(skill_check_unit_range_sub,m,
- x-range,y-range,x+range,y+range,BL_SKILL,&c,skillid);
-
- return c;
+ return map_foreachinarea(skill_check_unit_range_sub,m,
+ x-range,y-range,x+range,y+range,BL_SKILL,skillid);
}
static int skill_check_unit_range2_sub( struct block_list *bl,va_list ap )