summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-20 22:07:22 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-20 22:07:43 +0300
commitb69fb47e606ff06ada9b530ae46a76abbb374fe6 (patch)
tree0120b7329d1deb9e37fa462bf45b90e5f2f93b39 /src
parent1e4d12ba21b978216ba6732cf4774b58a14ebb24 (diff)
downloadevol-hercules-b69fb47e606ff06ada9b530ae46a76abbb374fe6.tar.gz
evol-hercules-b69fb47e606ff06ada9b530ae46a76abbb374fe6.tar.bz2
evol-hercules-b69fb47e606ff06ada9b530ae46a76abbb374fe6.tar.xz
evol-hercules-b69fb47e606ff06ada9b530ae46a76abbb374fe6.zip
Fix languages initialisation.
Diffstat (limited to 'src')
-rw-r--r--src/map/init.c4
-rw-r--r--src/map/lang.c5
-rw-r--r--src/map/lang.h4
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