From 537cb90e1e0a3ff8461a8a55812feab78f6a07cb Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 10 九月 2018 19:43:05 +0800
Subject: [PATCH] fix:脱机挂地图线范围随机

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorld.py |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorld.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorld.py
index 23b3ac8..4742007 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorld.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorld.py
@@ -985,4 +985,19 @@
     except:
         return inputText
     
+    return inputText
+
+# 服务器默认GBK,转配置编码如UTF8,一般用于与显示层交互,不判断是否base64
+def CodeToGBK(inputText):
+    encodingList = ReadChConfig.GetEvalChConfig("EncodingTex")
+    
+    if len(encodingList) != 2:
+        ErrLog("EncodingTex.txt Error len != 2")
+        return inputText
+    
+    try:
+        return inputText.decode(GetCharacterEncoding()).encode(ShareDefine.Def_Game_Character_Encoding)
+    except:
+        return inputText
+    
     return inputText
\ No newline at end of file

--
Gitblit v1.8.0