hxp
9 天以前 2b91d1223f3d78bd2efa970478d1ed63666e131c
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -11860,6 +11860,87 @@
#------------------------------------------------------
# B2 41 武将宿缘 #tagCSHeroFates
class  tagCSHeroFates(Structure):
    Head = tagHead()
    FatesID = 0    #(BYTE FatesID)// 宿缘ID
    OPType = 0    #(BYTE OPType)// 0-激活领奖;1-升级
    IndexCnt = 0    #(BYTE IndexCnt)
    ItemIndexList = list()    #(vector<WORD> ItemIndexList)// 升级时消耗的材料卡在武将背包索引列表,升级时才发
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xB2
        self.Head.SubCmd = 0x41
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.FatesID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.OPType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.IndexCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.IndexCnt):
            value,_pos=CommFunc.ReadWORD(_lpData,_pos)
            self.ItemIndexList.append(value)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xB2
        self.Head.SubCmd = 0x41
        self.FatesID = 0
        self.OPType = 0
        self.IndexCnt = 0
        self.ItemIndexList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += 1
        length += 1
        length += 2 * self.IndexCnt
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.FatesID)
        data = CommFunc.WriteBYTE(data, self.OPType)
        data = CommFunc.WriteBYTE(data, self.IndexCnt)
        for i in range(self.IndexCnt):
            data = CommFunc.WriteWORD(data, self.ItemIndexList[i])
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                FatesID:%d,
                                OPType:%d,
                                IndexCnt:%d,
                                ItemIndexList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.FatesID,
                                self.OPType,
                                self.IndexCnt,
                                "..."
                                )
        return DumpString
m_NAtagCSHeroFates=tagCSHeroFates()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSHeroFates.Head.Cmd,m_NAtagCSHeroFates.Head.SubCmd))] = m_NAtagCSHeroFates
#------------------------------------------------------
# B2 38 武将锁定 #tagCSHeroLock
class  tagCSHeroLock(Structure):