ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -20969,6 +20969,114 @@
#------------------------------------------------------
# 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
#------------------------------------------------------
# A3 28 历史累积充值奖励领取记录 #tagMCHistoryReChargeAwardRecord
class  tagMCHistoryReChargeAwardRecord(Structure):