From 904df7e20029fa64f9382bc32b52f12f46e37e5d Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 21 九月 2018 18:08:12 +0800
Subject: [PATCH] 1 礼包卡以权限分应用

---
 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