summaryrefslogtreecommitdiff
path: root/src/emap/init.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-11 00:42:56 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-11 02:09:45 +0300
commit82fca47fc7b00d8755c4333e0016bf555e46d0f8 (patch)
tree7afa440b66113e9fc24408f344e5340a90d83e8b /src/emap/init.c
parent64e7b33c9163e387c94f1a11de4e15435c35005c (diff)
downloadplugin-82fca47fc7b00d8755c4333e0016bf555e46d0f8.tar.gz
plugin-82fca47fc7b00d8755c4333e0016bf555e46d0f8.tar.bz2
plugin-82fca47fc7b00d8755c4333e0016bf555e46d0f8.tar.xz
plugin-82fca47fc7b00d8755c4333e0016bf555e46d0f8.zip
Add script command for convert craft string into craft object.
New script command: initcraft var$ Return value: craft object id.
Diffstat (limited to 'src/emap/init.c')
-rw-r--r--src/emap/init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/emap/init.c b/src/emap/init.c
index c71a7b1..b846336 100644
--- a/src/emap/init.c
+++ b/src/emap/init.c
@@ -45,6 +45,7 @@
#include "emap/atcommand.h"
#include "emap/battleground.h"
#include "emap/clif.h"
+#include "emap/craft.h"
#include "emap/itemdb.h"
#include "emap/lang.h"
#include "emap/mail.h"
@@ -99,6 +100,7 @@ HPExport void plugin_init (void)
addScriptCommand("requestitemindex", "v", requestItemIndex);
addScriptCommand("requestitemsindex", "v*", requestItemsIndex);
addScriptCommand("requestcraft", "v*", requestCraft);
+ addScriptCommand("initcraft", "s", initCraft);
addScriptCommand("getq", "i", getq);
addScriptCommand("setq", "ii", setq);
addScriptCommand("setnpcdir", "*", setNpcDir);
@@ -138,6 +140,7 @@ HPExport void plugin_init (void)
addScriptCommand("setskin", "s", setSkin);
do_init_langs();
+ do_init_craft();
addPacket(0x7530, 22, map_parse_version, hpClif_Parse);
addPacket(0xb07, 26, map_parse_join_channel, hpClif_Parse);
@@ -268,6 +271,7 @@ HPExport void server_online (void)
HPExport void plugin_final (void)
{
do_final_langs();
+ do_final_craft();
commonClean();
isInit = false;
}