summaryrefslogtreecommitdiff
path: root/src/map/map.h
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-05 15:05:49 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-05 15:05:49 +0000
commitf7cf35aaad2512e7f329954946aac5e2a24cdfb7 (patch)
tree93dff649c7a49c0f6758a18adb23105968dd9df2 /src/map/map.h
parentc05a7a22feec3a93445654f0ce1eead31052e6b9 (diff)
downloadhercules-f7cf35aaad2512e7f329954946aac5e2a24cdfb7.tar.gz
hercules-f7cf35aaad2512e7f329954946aac5e2a24cdfb7.tar.bz2
hercules-f7cf35aaad2512e7f329954946aac5e2a24cdfb7.tar.xz
hercules-f7cf35aaad2512e7f329954946aac5e2a24cdfb7.zip
- Corrected cloaking not ending on attack if you are near a wall.
- Moved define cap_value to map.h as it's quite handy. - Updated pc_bonus to use cap_value on all status_data modifiers to prevent overflows/underflows. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6979 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.h')
-rw-r--r--src/map/map.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/map.h b/src/map/map.h
index 6663ae11a..8270256a9 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -162,6 +162,9 @@ enum {
//Specifies maps that have special GvG/WoE restrictions
#define map_flag_gvg(m) (map[m].flag.gvg || (agit_flag && map[m].flag.gvg_castle))
+//Caps values to min/max
+#define cap_value(a, min, max) (a>max?max:a<min?min:a)
+
//This stackable implementation does not means a BL can be more than one type at a time, but it's
//meant to make it easier to check for multiple types at a time on invocations such as
// map_foreach* calls [Skotlex]