summaryrefslogtreecommitdiff
path: root/src/emap/script.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-27 23:29:54 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-27 23:29:54 +0300
commitfe98a8f9c737f8a9e72509c89ca5b4ce68b69cf6 (patch)
tree5f20d90a29f5f7839fbf8a367bc3af425b51b184 /src/emap/script.c
parentf1031172f04112fe168f586bb8c980cef7cf59ca (diff)
downloadplugin-fe98a8f9c737f8a9e72509c89ca5b4ce68b69cf6.tar.gz
plugin-fe98a8f9c737f8a9e72509c89ca5b4ce68b69cf6.tar.bz2
plugin-fe98a8f9c737f8a9e72509c89ca5b4ce68b69cf6.tar.xz
plugin-fe98a8f9c737f8a9e72509c89ca5b4ce68b69cf6.zip
Allow get extended npc name by variable '.extname$'.
Diffstat (limited to 'src/emap/script.c')
-rw-r--r--src/emap/script.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/emap/script.c b/src/emap/script.c
index 47cd5f1..95bc5ae 100644
--- a/src/emap/script.c
+++ b/src/emap/script.c
@@ -191,6 +191,12 @@ void escript_set_reg_npc_str(struct script_state* st, struct reg_db *n, int64 *n
// clif->spawn(&nd->bl);
hookStop();
}
+ else if (!strcmp(name, ".extname$"))
+ {
+ ShowWarning("you cant assign '.extname$'.\n");
+ script->reportsrc(st);
+ hookStop();
+ }
}
char *escript_get_val_npcscope_str(struct script_state* st, struct reg_db *n, struct script_data* data)
@@ -208,6 +214,12 @@ char *escript_get_val_npcscope_str(struct script_state* st, struct reg_db *n, st
hookStop();
return nd->name;
}
+ else if (!strcmp(name, ".extname$"))
+ {
+ getNDReturn(0);
+ hookStop();
+ return nd->exname;
+ }
return NULL;
}