hch
2025-10-14 47813c8aef184ab6bc6f4556d2a18303a2a31d47
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -6016,6 +6016,7 @@
                  ("GubaoID", c_ushort),    
                  ("GubaoStar", c_ubyte),    
                  ("GubaoLV", c_ubyte),    
                  ("EffLayer", c_ubyte),    # 该特殊效果累加层值
                  ]
    def __init__(self):
@@ -6031,6 +6032,7 @@
        self.GubaoID = 0
        self.GubaoStar = 0
        self.GubaoLV = 0
        self.EffLayer = 0
        return
    def GetLength(self):
@@ -6043,19 +6045,21 @@
        DumpString = '''// A3 C7 古宝信息 //tagMCGubaoInfo:
                                GubaoID:%d,
                                GubaoStar:%d,
                                GubaoLV:%d
                                GubaoLV:%d,
                                EffLayer:%d
                                '''\
                                %(
                                self.GubaoID,
                                self.GubaoStar,
                                self.GubaoLV
                                self.GubaoLV,
                                self.EffLayer
                                )
        return DumpString
class  tagMCGubaoInfo(Structure):
    Head = tagHead()
    Count = 0    #(BYTE Count)
    Count = 0    #(WORD Count)
    GubaoInfoList = list()    #(vector<tagMCGubao> GubaoInfoList)
    data = None
@@ -6068,7 +6072,7 @@
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
        for i in range(self.Count):
            temGubaoInfoList = tagMCGubao()
            _pos = temGubaoInfoList.ReadData(_lpData, _pos)
@@ -6087,7 +6091,7 @@
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += 2
        for i in range(self.Count):
            length += self.GubaoInfoList[i].GetLength()
@@ -6096,7 +6100,7 @@
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.Count)
        data = CommFunc.WriteWORD(data, self.Count)
        for i in range(self.Count):
            data = CommFunc.WriteString(data, self.GubaoInfoList[i].GetLength(), self.GubaoInfoList[i].GetBuffer())
        return data
@@ -6117,226 +6121,6 @@
m_NAtagMCGubaoInfo=tagMCGubaoInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGubaoInfo.Head.Cmd,m_NAtagMCGubaoInfo.Head.SubCmd))] = m_NAtagMCGubaoInfo
#------------------------------------------------------
# A3 CA 古宝物品特殊效果信息 #tagMCGubaoItemEffInfo
class  tagMCGubaoItemEff(Structure):
    _pack_ = 1
    _fields_ = [
                  ("GubaoID", c_ushort),
                  ("EffType", c_ubyte),    # 不同古宝ID允许拥有相同效果类型,进度值每个古宝ID单独统计
                  ("EffValue", c_int),    # 该效果目前累加值
                  ]
    def __init__(self):
        self.Clear()
        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.GubaoID = 0
        self.EffType = 0
        self.EffValue = 0
        return
    def GetLength(self):
        return sizeof(tagMCGubaoItemEff)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// A3 CA 古宝物品特殊效果信息 //tagMCGubaoItemEffInfo:
                                GubaoID:%d,
                                EffType:%d,
                                EffValue:%d
                                '''\
                                %(
                                self.GubaoID,
                                self.EffType,
                                self.EffValue
                                )
        return DumpString
class  tagMCGubaoItemEffInfo(Structure):
    Head = tagHead()
    Count = 0    #(WORD Count)
    ItemEffInfoList = list()    #(vector<tagMCGubaoItemEff> ItemEffInfoList)
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xA3
        self.Head.SubCmd = 0xCA
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
        for i in range(self.Count):
            temItemEffInfoList = tagMCGubaoItemEff()
            _pos = temItemEffInfoList.ReadData(_lpData, _pos)
            self.ItemEffInfoList.append(temItemEffInfoList)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xA3
        self.Head.SubCmd = 0xCA
        self.Count = 0
        self.ItemEffInfoList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 2
        for i in range(self.Count):
            length += self.ItemEffInfoList[i].GetLength()
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteWORD(data, self.Count)
        for i in range(self.Count):
            data = CommFunc.WriteString(data, self.ItemEffInfoList[i].GetLength(), self.ItemEffInfoList[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                Count:%d,
                                ItemEffInfoList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.Count,
                                "..."
                                )
        return DumpString
m_NAtagMCGubaoItemEffInfo=tagMCGubaoItemEffInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGubaoItemEffInfo.Head.Cmd,m_NAtagMCGubaoItemEffInfo.Head.SubCmd))] = m_NAtagMCGubaoItemEffInfo
#------------------------------------------------------
# A3 CB 古宝碎片信息 #tagMCGubaoPieceInfo
class  tagMCGubaoPiece(Structure):
    _pack_ = 1
    _fields_ = [
                  ("GubaoID", c_ushort),
                  ("PieceCount", c_int),    # 当前碎片个数
                  ]
    def __init__(self):
        self.Clear()
        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.GubaoID = 0
        self.PieceCount = 0
        return
    def GetLength(self):
        return sizeof(tagMCGubaoPiece)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// A3 CB 古宝碎片信息 //tagMCGubaoPieceInfo:
                                GubaoID:%d,
                                PieceCount:%d
                                '''\
                                %(
                                self.GubaoID,
                                self.PieceCount
                                )
        return DumpString
class  tagMCGubaoPieceInfo(Structure):
    Head = tagHead()
    Count = 0    #(BYTE Count)
    PieceInfoList = list()    #(vector<tagMCGubaoPiece> PieceInfoList)
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xA3
        self.Head.SubCmd = 0xCB
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.Count):
            temPieceInfoList = tagMCGubaoPiece()
            _pos = temPieceInfoList.ReadData(_lpData, _pos)
            self.PieceInfoList.append(temPieceInfoList)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xA3
        self.Head.SubCmd = 0xCB
        self.Count = 0
        self.PieceInfoList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        for i in range(self.Count):
            length += self.PieceInfoList[i].GetLength()
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.Count)
        for i in range(self.Count):
            data = CommFunc.WriteString(data, self.PieceInfoList[i].GetLength(), self.PieceInfoList[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                Count:%d,
                                PieceInfoList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.Count,
                                "..."
                                )
        return DumpString
m_NAtagMCGubaoPieceInfo=tagMCGubaoPieceInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCGubaoPieceInfo.Head.Cmd,m_NAtagMCGubaoPieceInfo.Head.SubCmd))] = m_NAtagMCGubaoPieceInfo
#------------------------------------------------------
@@ -42846,10 +42630,11 @@
    Head = tagHead()
    ObjID = 0    #(DWORD ObjID)
    PMType = 0    #(BYTE PMType)// 物法类型 0或1-物理;2-法术
    BattleType = 0    #(BYTE BattleType)// 战斗类型 0-常规;1-连击;2-反击;3-追击
    BattleType = 0    #(BYTE BattleType)// 战斗类型 0-常规;1-连击;2-反击;3-追击;4-子技能;5-被动触发的
    CurHP = 0    #(DWORD CurHP)// 释放技能后剩余血量,吸血、反弹可能引起变化,求余亿部分
    CurHPEx = 0    #(DWORD CurHPEx)// 释放技能后剩余血量,吸血、反弹可能引起变化,整除亿部分
    SkillID = 0    #(DWORD SkillID)
    RelatedSkillID = 0    #(DWORD RelatedSkillID)// 关联的技能ID,一般是主技能ID或由于某个技能释放引起的
    HurtCount = 0    #(BYTE HurtCount)//伤害数目
    HurtList = list()    #(vector<tagSCUseSkillHurt> HurtList)//size = HurtCount
    data = None
@@ -42869,6 +42654,7 @@
        self.CurHP,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.CurHPEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.SkillID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.RelatedSkillID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.HurtCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.HurtCount):
            temHurtList = tagSCUseSkillHurt()
@@ -42887,6 +42673,7 @@
        self.CurHP = 0
        self.CurHPEx = 0
        self.SkillID = 0
        self.RelatedSkillID = 0
        self.HurtCount = 0
        self.HurtList = list()
        return
@@ -42897,6 +42684,7 @@
        length += 4
        length += 1
        length += 1
        length += 4
        length += 4
        length += 4
        length += 4
@@ -42915,6 +42703,7 @@
        data = CommFunc.WriteDWORD(data, self.CurHP)
        data = CommFunc.WriteDWORD(data, self.CurHPEx)
        data = CommFunc.WriteDWORD(data, self.SkillID)
        data = CommFunc.WriteDWORD(data, self.RelatedSkillID)
        data = CommFunc.WriteBYTE(data, self.HurtCount)
        for i in range(self.HurtCount):
            data = CommFunc.WriteString(data, self.HurtList[i].GetLength(), self.HurtList[i].GetBuffer())
@@ -42929,6 +42718,7 @@
                                CurHP:%d,
                                CurHPEx:%d,
                                SkillID:%d,
                                RelatedSkillID:%d,
                                HurtCount:%d,
                                HurtList:%s
                                '''\
@@ -42940,6 +42730,7 @@
                                self.CurHP,
                                self.CurHPEx,
                                self.SkillID,
                                self.RelatedSkillID,
                                self.HurtCount,
                                "..."
                                )