summaryrefslogtreecommitdiff
path: root/src/map/script-fun.cpp
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2015-05-12 21:40:18 -0400
committermekolat <mekolat@users.noreply.github.com>2015-05-17 14:47:25 -0400
commit87f9bae4da0314e97f1a3e38513960998ee4d05d (patch)
tree0e8feeeffa225c00497369c335f6fbf85e766d11 /src/map/script-fun.cpp
parentfebb5f798904915714b49d52fc645cfae2128f07 (diff)
downloadtmwa-87f9bae4da0314e97f1a3e38513960998ee4d05d.tar.gz
tmwa-87f9bae4da0314e97f1a3e38513960998ee4d05d.tar.bz2
tmwa-87f9bae4da0314e97f1a3e38513960998ee4d05d.tar.xz
tmwa-87f9bae4da0314e97f1a3e38513960998ee4d05d.zip
use client version
Diffstat (limited to 'src/map/script-fun.cpp')
-rw-r--r--src/map/script-fun.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp
index 744f2c3..9020203 100644
--- a/src/map/script-fun.cpp
+++ b/src/map/script-fun.cpp
@@ -971,6 +971,13 @@ void builtin_delitem(ScriptState *st)
}
+static
+void builtin_getversion(ScriptState *st)
+{
+ dumb_ptr<map_session_data> sd = script_rid2sd(st);;
+ push_int<ScriptDataInt>(st->stack, sd->client_version);
+}
+
/*==========================================
*キャラ関係のID取得
*------------------------------------------
@@ -3028,6 +3035,7 @@ BuiltinFunction builtin_functions[] =
BUILTIN(makeitem, "IiMxy"_s, '\0'),
BUILTIN(delitem, "Ii"_s, '\0'),
BUILTIN(getcharid, "i?"_s, 'i'),
+ BUILTIN(getversion, ""_s, 'i'),
BUILTIN(strcharinfo, "i"_s, 's'),
BUILTIN(getequipid, "i"_s, 'i'),
BUILTIN(bonus, "ii"_s, '\0'),