diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/init.c | 4 | ||||
-rw-r--r-- | src/map/lang.c | 5 | ||||
-rw-r--r-- | src/map/lang.h | 4 |
3 files changed, 10 insertions, 3 deletions
diff --git a/src/map/init.c b/src/map/init.c index b87c62d..502e5b3 100644 --- a/src/map/init.c +++ b/src/map/init.c @@ -36,6 +36,7 @@ #include "common/interfaces.h" #include "map/clif.h" #include "map/dummy.h" +#include "map/lang.h" #include "map/npc.h" #include "map/parse.h" #include "map/script.h" @@ -78,6 +79,8 @@ HPExport void plugin_init (void) // must be replaced to misceffect addScriptCommand("misceffect2", "i*", dummy); + do_init_langs(); + addPacket(0x7530, 22, map_parse_version, hpClif_Parse); addHookPre("pc->readparam", epc_readparam_pre); addHookPre("pc->setregistry", epc_setregistry); @@ -143,4 +146,5 @@ HPExport void server_online (void) HPExport void plugin_final (void) { + do_final_langs(); } diff --git a/src/map/lang.c b/src/map/lang.c index ef965dd..53662c2 100644 --- a/src/map/lang.c +++ b/src/map/lang.c @@ -34,6 +34,11 @@ void do_init_langs (void) langsdb_readdb (); } +void do_final_langs(void) +{ + db_clear(translate_db); +} + static int langsdb_readlangs (void) { FILE *fp; diff --git a/src/map/lang.h b/src/map/lang.h index 0c1e0fa..4afc6b9 100644 --- a/src/map/lang.h +++ b/src/map/lang.h @@ -7,11 +7,9 @@ extern struct DBMap *translate_db; void do_init_langs (void); - +void do_final_langs(void); const char* lang_trans(const char *str, int lng, int flg); - const char* lang_pctrans(const char *str, TBL_PC *sd); - int lang_getId(const char *str); #endif // EVOL_MAP_LANG |