From a0dd1dc92bb2f6eb7067a624df20a9c326ecde87 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 06 二月 2026 22:14:54 +0800
Subject: [PATCH] 66 【公会】基础主体-服务端(修改A619,A523封包结构;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py
index c1db2ce..26f5408 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py
@@ -60,6 +60,23 @@
         returnStr += chr(string.atoi(hexStr[i:i+2],16))
     return returnStr
 
+def B2Hex(buf, upper=True, space=True):
+    hex_str = binascii.b2a_hex(buf)
+    # 转换为大写
+    if upper:
+        hex_str = hex_str.upper()
+    # 每两个字符添加一个空格
+    if space:
+        hex_str = ' '.join(hex_str[i:i+2] for i in range(0, len(hex_str), 2))
+    return hex_str
+
+def GetPackHead(clientPack):
+    if hasattr(clientPack, "Head"):
+        headStr = "%02x%02x" % (clientPack.Head.Cmd, clientPack.Head.SubCmd)
+    else:
+        headStr = "%02x%02x" % (clientPack.Cmd, clientPack.SubCmd)
+    return headStr.upper()
+
 #获取异常信息#(try:...except:..GetExceptionInfo())
 ## 
 #  @param 参数

--
Gitblit v1.8.0