summaryrefslogtreecommitdiff
path: root/src/map/scriptdefines.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-19 18:00:54 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-19 18:00:54 +0300
commitd38a0b63bd821e043435b852a7dea9ad0f89262e (patch)
treec6abb9c92424800c62b037b9a4a760a71b978832 /src/map/scriptdefines.h
parent7966264fdf4271c8b247d572c2eadef88dcaf4b4 (diff)
downloadevol-hercules-d38a0b63bd821e043435b852a7dea9ad0f89262e.tar.gz
evol-hercules-d38a0b63bd821e043435b852a7dea9ad0f89262e.tar.bz2
evol-hercules-d38a0b63bd821e043435b852a7dea9ad0f89262e.tar.xz
evol-hercules-d38a0b63bd821e043435b852a7dea9ad0f89262e.zip
Impliment script commands setq and getq.
Diffstat (limited to 'src/map/scriptdefines.h')
-rw-r--r--src/map/scriptdefines.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/map/scriptdefines.h b/src/map/scriptdefines.h
index 56f32b6..7d2b115 100644
--- a/src/map/scriptdefines.h
+++ b/src/map/scriptdefines.h
@@ -29,6 +29,14 @@
#define getSD() \
TBL_PC *sd = script->rid2sd(st); \
if (!sd) \
- return 1
+ return true
+
+#define getSDReturn(def) \
+ TBL_PC *sd = script->rid2sd(st); \
+ if (!sd) \
+ { \
+ script_pushint(st, def); \
+ return true; \
+ }
#endif // EVOL_MAP_SCRIPTDEFINES