From 849f499eceec264b1abd0bae174f7b7a10b99433 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 27 一月 2026 19:39:35 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(战斗初始化同步命格PosNum=99)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py |   10 ++++++++++
 1 files changed, 10 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..78aa02d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py
@@ -60,6 +60,16 @@
         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
+            
 #获取异常信息#(try:...except:..GetExceptionInfo())
 ## 
 #  @param 参数

--
Gitblit v1.8.0