summaryrefslogtreecommitdiff
path: root/npc/dev/test.txt
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-10-07 18:27:58 +0200
committerGitHub <noreply@github.com>2018-10-07 18:27:58 +0200
commit71205691cb441e398355944cdad992b6b60053ba (patch)
tree41b209c2ec38393c7e3f965d8fe5ab2f57f92889 /npc/dev/test.txt
parentc0543f29c2f85fdcfa431063ea785a389d140199 (diff)
parent55f666602680b10ab0a3966de96d50c088e58865 (diff)
downloadhercules-71205691cb441e398355944cdad992b6b60053ba.tar.gz
hercules-71205691cb441e398355944cdad992b6b60053ba.tar.bz2
hercules-71205691cb441e398355944cdad992b6b60053ba.tar.xz
hercules-71205691cb441e398355944cdad992b6b60053ba.zip
Merge pull request #2240 from Helianthella/getd-const
allow buildin_getd to work with constants and params
Diffstat (limited to 'npc/dev/test.txt')
-rw-r--r--npc/dev/test.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/npc/dev/test.txt b/npc/dev/test.txt
index bdbc52ed4..c2f07ab2f 100644
--- a/npc/dev/test.txt
+++ b/npc/dev/test.txt
@@ -651,6 +651,12 @@ function script HerculesSelfTestHelper {
setd(".@x", getd(".@y"));
callsub(OnCheck, "setd getd", .@x, .@y);
+ // getd types
+ callsub(OnCheck, "Getdatatype (getd: param)", getdatatype(getd("Hp")), DATATYPE_INT | DATATYPE_PARAM);
+ callsub(OnCheck, "Getdatatype (getd: const)", getdatatype(getd("DATATYPE_CONST")), DATATYPE_INT | DATATYPE_CONST);
+ callsub(OnCheck, "Getdatatype (getd: numeric var)", getdatatype(getd(".@foo")), DATATYPE_INT | DATATYPE_VAR);
+ callsub(OnCheck, "Getdatatype (getd: string var)", getdatatype(getd(".@foo$")), DATATYPE_STR | DATATYPE_VAR);
+
// getvariableofnpc
.x = 2;
set getvariableofnpc(.x, "TestVarOfAnotherNPC"), 1;