From 0c0477399f132ac37a8dc07f86bb88b098502278 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 5 Nov 2014 16:05:25 +0300 Subject: Move init plugin code into init.c --- src/map/init.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 src/map/init.c (limited to 'src/map/init.c') diff --git a/src/map/init.c b/src/map/init.c new file mode 100644 index 0000000..9d840a4 --- /dev/null +++ b/src/map/init.c @@ -0,0 +1,76 @@ +// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// Copyright (c) 2014 Evol developers + +#include +#include +#include + +#include "../../../common/HPMi.h" +#include "../../../common/malloc.h" +#include "../../../common/mmo.h" +#include "../../../common/socket.h" +#include "../../../common/strlib.h" +#include "../../../map/clif.h" +#include "../../../map/pc.h" +#include "../../../map/script.h" + +#include "map/dummy.h" + +#include "../../../common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */ + +HPExport struct hplugin_info pinfo = +{ + "evoldummy", + SERVER_TYPE_MAP, + "0.1", + HPM_VERSION +}; + +/* run when server starts */ +HPExport void plugin_init (void) { + /* core interfaces */ + iMalloc = GET_SYMBOL("iMalloc"); + + /* map-server interfaces */ + script = GET_SYMBOL("script"); + clif = GET_SYMBOL("clif"); + pc = GET_SYMBOL("pc"); + strlib = GET_SYMBOL("strlib"); + session = GET_SYMBOL("session"); + + addScriptCommand("setcamnpc", "*", dummy); + addScriptCommand("restorecam", "", dummy); + addScriptCommand("npctalk3", "s", dummy); + addScriptCommand("closedialog", "", dummy); + addScriptCommand("shop", "s", dummy); + addScriptCommand("getitemlink", "s", dummyStr); +// addScriptCommand("menuimage", "ss", dummyStr); +// addScriptCommand("mesn", "*", dummy); +// addScriptCommand("mesq", "s*", dummy); +// addScriptCommand("g", "ss", dummyStr); + addScriptCommand("l", "s*", dummyStr); + // must be ss + addScriptCommand("lg", "s*", dummyStr); + addScriptCommand("getlang", "*", dummyStr); + addScriptCommand("setlang", "i", dummy); + addScriptCommand("requestlang", "*", dummy); + addScriptCommand("getq", "i", dummyInt); + addScriptCommand("setq", "ii", dummy); + addScriptCommand("getnpcdir", "*", dummyInt); + addScriptCommand("setnpcdir", "*", dummy); +// addScriptCommand("col", "si", dummyStr); + addScriptCommand("rif", "is*", dummyStr); + addScriptCommand("countitemcolor", "*", dummyInt); + addScriptCommand("getclientversion", "*", dummyInt); + // must be replaced to misceffect + addScriptCommand("misceffect2", "i*", dummy); +} + +HPExport void server_preinit (void) { +} + +HPExport void server_online (void) { +} + +HPExport void plugin_final (void) { +} -- cgit v1.2.3-60-g2f50