diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-27 18:30:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-27 18:30:29 +0300 |
commit | a04eeef27f16ba4fbe31e5e178313e6e718af4c8 (patch) | |
tree | 93ece9f2298ef3883821d65a08c226574699f227 /src/emap/scriptdefines.h | |
parent | 454c1448e30fe9d8cc2e6bc535921b2f7efd58e2 (diff) | |
download | evol-hercules-a04eeef27f16ba4fbe31e5e178313e6e718af4c8.tar.gz evol-hercules-a04eeef27f16ba4fbe31e5e178313e6e718af4c8.tar.bz2 evol-hercules-a04eeef27f16ba4fbe31e5e178313e6e718af4c8.tar.xz evol-hercules-a04eeef27f16ba4fbe31e5e178313e6e718af4c8.zip |
Allow set/get npc sex by working with variable '.sex'.
Diffstat (limited to 'src/emap/scriptdefines.h')
-rw-r--r-- | src/emap/scriptdefines.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/emap/scriptdefines.h b/src/emap/scriptdefines.h index d35f71c..921df75 100644 --- a/src/emap/scriptdefines.h +++ b/src/emap/scriptdefines.h @@ -85,4 +85,14 @@ return false; \ } +#define getND() \ + TBL_NPC *nd = map->id2nd(st->oid); \ + if (!nd) \ + return; \ + +#define getNDReturn(def) \ + TBL_NPC *nd = map->id2nd(st->oid); \ + if (!nd) \ + return def; \ + #endif // EVOL_MAP_SCRIPTDEFINES |