summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-10 17:07:35 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-10 17:07:35 +0000
commite6d726f486b00d443320269a96a0e6d9a12d8d38 (patch)
treeb2fc96e5b687976248ecfce71ed049464b007354 /src/map/map.c
parent9343f6e46de1221a00e136c69acc2762c681ba62 (diff)
downloadhercules-e6d726f486b00d443320269a96a0e6d9a12d8d38.tar.gz
hercules-e6d726f486b00d443320269a96a0e6d9a12d8d38.tar.bz2
hercules-e6d726f486b00d443320269a96a0e6d9a12d8d38.tar.xz
hercules-e6d726f486b00d443320269a96a0e6d9a12d8d38.zip
- Removed bonus bAddEffWhenHitShort as it is unneeded and unused.
- Corrected getpetinfo so it actually returns "null" when there's no pet and you request the name (the docs state it so). - Also cleaned up a bit getpetinfo - Added gethominfo (which behaves in the same way as getpetinfo). - The 'maxcount' skill_db field now can store independant values per skill-level, required for Kamaitachi since it uses different range values per level. - Corrected bonus3 bAutoSpell(WhenHit) to select target enemy (rather than self) for skills with inf self and inf2 'don't target self' (aka: auto-select target skills). - Corrected map_foreachinpath to do a wall check for targets beyond the initially selected tile. - Corrected Kamaitachi's range to be 9, and the path range to be 4+SkillLv git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11169 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/map/map.c b/src/map/map.c
index b2e0fc376..42a22d120 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1154,7 +1154,10 @@ int map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int y
k = (xi-x0)*(x1-x0) + (yi-y0)*(y1-y0);
if (k < 0 || k > len_limit) //Since more skills use this, check for ending point as well.
continue;
-
+
+ if (k > magnitude2 && !path_search_long(NULL,m,x0,y0,xi,yi))
+ continue; //Targets beyond the initial ending point need the wall check.
+
//All these shifts are to increase the precision of the intersection point and distance considering how it's
//int math.
k = (k<<4)/magnitude2; //k will be between 1~16 instead of 0~1
@@ -1186,7 +1189,10 @@ int map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int y
k = (xi-x0)*(x1-x0) + (yi-y0)*(y1-y0);
if (k < 0 || k > len_limit)
continue;
-
+
+ if (k > magnitude2 && !path_search_long(NULL,m,x0,y0,xi,yi))
+ continue; //Targets beyond the initial ending point need the wall check.
+
k = (k<<4)/magnitude2; //k will be between 1~16 instead of 0~1
xi<<=4;
yi<<=4;