summaryrefslogtreecommitdiff
path: root/hercules
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-18 23:22:50 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-18 23:22:50 +0300
commitbaee9468029199479156977182149e0744a35cf2 (patch)
tree9495c0e253c010ffd683d7d4418d0f26dce70ec3 /hercules
parent865184a00398687c36d7de7a2ea28a501bb5be9c (diff)
downloadevol-tools-baee9468029199479156977182149e0744a35cf2.tar.gz
evol-tools-baee9468029199479156977182149e0744a35cf2.tar.bz2
evol-tools-baee9468029199479156977182149e0744a35cf2.tar.xz
evol-tools-baee9468029199479156977182149e0744a35cf2.zip
hercules: remove .gat from converted maps.
Diffstat (limited to 'hercules')
-rw-r--r--hercules/code/server/evol/athena.py4
-rw-r--r--hercules/code/stringutils.py5
2 files changed, 7 insertions, 2 deletions
diff --git a/hercules/code/server/evol/athena.py b/hercules/code/server/evol/athena.py
index a4bb48f..be2f569 100644
--- a/hercules/code/server/evol/athena.py
+++ b/hercules/code/server/evol/athena.py
@@ -181,12 +181,12 @@ def readAthena():
user.head_bottom = tmp[4]
tmp = comaSplit.split(rows[12])
- user.last_map = tmp[0]
+ user.last_map = removeGat(tmp[0])
user.last_x = tmp[1]
user.last_y = tmp[2]
tmp = comaSplit.split(rows[13])
- user.save_map = tmp[0]
+ user.save_map = removeGat(tmp[0])
user.save_x = tmp[1]
user.save_y = tmp[2]
user.partner_id = tmp[3]
diff --git a/hercules/code/stringutils.py b/hercules/code/stringutils.py
index fccf403..a442ae7 100644
--- a/hercules/code/stringutils.py
+++ b/hercules/code/stringutils.py
@@ -40,3 +40,8 @@ def escapeSqlStr(data):
data = data.replace("{", "\\{");
data = data.replace("}", "\\}");
return data
+
+def removeGat(data):
+ if len(data) >= 4 and data[-4:] == ".gat":
+ data = data[:-4]
+ return data