summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-02 12:13:05 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-02 12:13:05 +0300
commit11d79efc68426eb1642ee41a2c576e6e5c5782f2 (patch)
tree516481fa1fe7cf84f640cc23edc43ec1f0b103ff /src
parentfcd97e7fade4354d3949426ca255732d58b55b97 (diff)
downloadplugin-11d79efc68426eb1642ee41a2c576e6e5c5782f2.tar.gz
plugin-11d79efc68426eb1642ee41a2c576e6e5c5782f2.tar.bz2
plugin-11d79efc68426eb1642ee41a2c576e6e5c5782f2.tar.xz
plugin-11d79efc68426eb1642ee41a2c576e6e5c5782f2.zip
map: in script command getitemlink add item name only for clients < 7.
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 8017ed1..c582fd5 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -225,7 +225,14 @@ BUILDIN(getItemLink)
if (sd)
{
- if (i_data)
+ int version = 0;
+ struct SessionExt *data = session_get_bysd(sd);
+ if (data)
+ version = data->clientVersion;
+
+ if (i_data && version >= 7)
+ sprintf(item_name, "[@@%u|@@]", (unsigned)i_data->nameid);
+ else if (i_data)
sprintf(item_name, "[@@%u|%s@@]", (unsigned)i_data->nameid, lang_pctrans (i_data->jname, sd));
else if (item_id > 0)
sprintf(item_name, "[@@%u|Unknown Item@@]", (unsigned)item_id);