From 2f38c3df091e91fc1ecbecc41b7afa3b2f81ba0c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 16 Oct 2015 16:39:39 +0300 Subject: lang: add support for mob_db in conf format. --- lang/updatelang.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lang/updatelang.py b/lang/updatelang.py index 2a5efb6..c05f2f6 100755 --- a/lang/updatelang.py +++ b/lang/updatelang.py @@ -347,16 +347,17 @@ def dumpTranslations(): def loadMobNames(dir): - with open(dir + "/mob_db.txt", "r") as r: + with open(dir + "/mob_db.conf", "r") as r: cnt = -1 for line in r: cnt = cnt + 1 if len(line) < 1 or line[0:2] == "//": continue - parts = itemsplit.split(line) - if len(parts) < 3: + line = line.strip() + idx = line.find("Name: \"") + if idx != 0 or line[len(line) - 1] != "\"": continue - addStr(parts[2].strip(), line, "mob_db.txt", cnt, True) + addStr(line[idx + 7: len(line) - 1], line, "mob_db.txt", cnt, True) rootPath = "../../server-data/" -- cgit v1.2.3-70-g09d2