From 445e6bdb5719d07c7196afe09b5e610e1839e062 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 21 十月 2025 10:44:32 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(优化B4 10 回合制战斗 #tagCMTurnFight请求战斗时FuncLineID逻辑)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 71 +++++++++++++++++++++++++++++++++++
1 files changed, 71 insertions(+), 0 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index c4a4a30..6366384 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -16647,6 +16647,7 @@
class tagSCArenaMatchInfo(Structure):
PlayerID = 0 #(DWORD PlayerID)//目标玩家ID
PlayerName = "" #(char PlayerName[33])
+ LV = 0 #(WORD LV)// 玩家等级
RealmLV = 0 #(WORD RealmLV)//境界,机器人读境界表取等级对应境界
FightPower = 0 #(DWORD FightPower)//战力求余亿部分
FightPowerEx = 0 #(DWORD FightPowerEx)//战力整除亿部分
@@ -16663,6 +16664,7 @@
self.Clear()
self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
+ self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
self.FightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
@@ -16674,6 +16676,7 @@
def Clear(self):
self.PlayerID = 0
self.PlayerName = ""
+ self.LV = 0
self.RealmLV = 0
self.FightPower = 0
self.FightPowerEx = 0
@@ -16687,6 +16690,7 @@
length += 4
length += 33
length += 2
+ length += 2
length += 4
length += 4
length += 4
@@ -16699,6 +16703,7 @@
data = ''
data = CommFunc.WriteDWORD(data, self.PlayerID)
data = CommFunc.WriteString(data, 33, self.PlayerName)
+ data = CommFunc.WriteWORD(data, self.LV)
data = CommFunc.WriteWORD(data, self.RealmLV)
data = CommFunc.WriteDWORD(data, self.FightPower)
data = CommFunc.WriteDWORD(data, self.FightPowerEx)
@@ -16711,6 +16716,7 @@
DumpString = '''
PlayerID:%d,
PlayerName:%s,
+ LV:%d,
RealmLV:%d,
FightPower:%d,
FightPowerEx:%d,
@@ -16721,6 +16727,7 @@
%(
self.PlayerID,
self.PlayerName,
+ self.LV,
self.RealmLV,
self.FightPower,
self.FightPowerEx,
@@ -35415,6 +35422,70 @@
#------------------------------------------------------
+# B1 28 历练秘笈信息 #tagSCLLMJInfo
+
+class tagSCLLMJInfo(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("MJLV", c_ubyte), # 秘笈等级,激活后从1开始
+ ("Zhanchui", c_int), # 秘笈累计消耗战锤
+ ("ExpEx", c_int), # 秘笈今日已额外获得经验
+ ("DecomposeEx", c_int), # 秘笈今日已额外获得分解货币
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB1
+ self.SubCmd = 0x28
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.Cmd = 0xB1
+ self.SubCmd = 0x28
+ self.MJLV = 0
+ self.Zhanchui = 0
+ self.ExpEx = 0
+ self.DecomposeEx = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagSCLLMJInfo)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B1 28 历练秘笈信息 //tagSCLLMJInfo:
+ Cmd:%s,
+ SubCmd:%s,
+ MJLV:%d,
+ Zhanchui:%d,
+ ExpEx:%d,
+ DecomposeEx:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.MJLV,
+ self.Zhanchui,
+ self.ExpEx,
+ self.DecomposeEx
+ )
+ return DumpString
+
+
+m_NAtagSCLLMJInfo=tagSCLLMJInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCLLMJInfo.Cmd,m_NAtagSCLLMJInfo.SubCmd))] = m_NAtagSCLLMJInfo
+
+
+#------------------------------------------------------
# B1 19 形象信息 #tagSCModelInfo
class tagSCModel(Structure):
--
Gitblit v1.8.0