summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-08 10:03:33 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-08 10:03:33 +0000
commitf1900833f9281faebd5cc4625238ee4b491812b3 (patch)
tree168859bfe2259fa6e54e88766fe56e3da3c4cd45 /src
parent5b1d813d431cc9c8dc1418aff02d7c2ffba42f98 (diff)
downloadhercules-f1900833f9281faebd5cc4625238ee4b491812b3.tar.gz
hercules-f1900833f9281faebd5cc4625238ee4b491812b3.tar.bz2
hercules-f1900833f9281faebd5cc4625238ee4b491812b3.tar.xz
hercules-f1900833f9281faebd5cc4625238ee4b491812b3.zip
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1212 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/skill.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 6b95d391e..3e657b0c5 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1692,16 +1692,25 @@ static int skill_check_unit_range2_sub( struct block_list *bl,va_list ap )
int skill_check_unit_range2(int m,int x,int y,int skillid, int skilllv)
{
- int c = 0;
- int range = skill_get_unit_range(skillid);
- int layout_type = skill_get_unit_layout_type(skillid,skilllv);
- if (layout_type==-1 || layout_type>MAX_SQUARE_LAYOUT) {
- printf("skill_check_unit_range2: unsupported layout type %d for skill %d\n",layout_type,skillid);
- return 0;
+ int c = 0, range;
+
+ switch (skillid) { // to be expanded later
+ case WZ_ICEWALL:
+ range = 2;
+ break;
+ default:
+ {
+ int layout_type = skill_get_unit_layout_type(skillid,skilllv);
+ if (layout_type==-1 || layout_type>MAX_SQUARE_LAYOUT) {
+ printf("skill_check_unit_range2: unsupported layout type %d for skill %d\n",layout_type,skillid);
+ return 0;
+ }
+ // とりあえず正方形のユニットレイアウトのみ対応
+ range = skill_get_unit_range(skillid) + layout_type;
+ }
+ break;
}
- // とりあえず正方形のユニットレイアウトのみ対応
- range += layout_type;
map_foreachinarea(skill_check_unit_range2_sub,m,
x-range,y-range,x+range,y+range,0,&c,skillid);