hxp
2025-08-04 fd3137f3c58f6fb5f53c0bfc38c55c74e7709f72
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -44314,6 +44314,137 @@
#------------------------------------------------------
# B1 24 阵容信息 #tagSCLineupInfo
class  tagSCLineup(Structure):
    LineupID = 0    #(BYTE LineupID)// 阵容ID
    ShapeType = 0    #(BYTE ShapeType)// 阵型
    HeroCnt = 0    #(BYTE HeroCnt)
    HeroItemIndexList = list()    #(vector<WORD> HeroItemIndexList)// 所在武将背包索引+1列表 [站位1物品索引+1, 站位2, ...],站位无武将时为0
    data = None
    def __init__(self):
        self.Clear()
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        self.LineupID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.ShapeType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.HeroCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.HeroCnt):
            value,_pos=CommFunc.ReadWORD(_lpData,_pos)
            self.HeroItemIndexList.append(value)
        return _pos
    def Clear(self):
        self.LineupID = 0
        self.ShapeType = 0
        self.HeroCnt = 0
        self.HeroItemIndexList = list()
        return
    def GetLength(self):
        length = 0
        length += 1
        length += 1
        length += 1
        length += 2 * self.HeroCnt
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteBYTE(data, self.LineupID)
        data = CommFunc.WriteBYTE(data, self.ShapeType)
        data = CommFunc.WriteBYTE(data, self.HeroCnt)
        for i in range(self.HeroCnt):
            data = CommFunc.WriteWORD(data, self.HeroItemIndexList[i])
        return data
    def OutputString(self):
        DumpString = '''
                                LineupID:%d,
                                ShapeType:%d,
                                HeroCnt:%d,
                                HeroItemIndexList:%s
                                '''\
                                %(
                                self.LineupID,
                                self.ShapeType,
                                self.HeroCnt,
                                "..."
                                )
        return DumpString
class  tagSCLineupInfo(Structure):
    Head = tagHead()
    LineupCnt = 0    #(BYTE LineupCnt)
    LineupList = list()    #(vector<tagSCLineup> LineupList)
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xB1
        self.Head.SubCmd = 0x24
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.LineupCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.LineupCnt):
            temLineupList = tagSCLineup()
            _pos = temLineupList.ReadData(_lpData, _pos)
            self.LineupList.append(temLineupList)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xB1
        self.Head.SubCmd = 0x24
        self.LineupCnt = 0
        self.LineupList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        for i in range(self.LineupCnt):
            length += self.LineupList[i].GetLength()
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.LineupCnt)
        for i in range(self.LineupCnt):
            data = CommFunc.WriteString(data, self.LineupList[i].GetLength(), self.LineupList[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                LineupCnt:%d,
                                LineupList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.LineupCnt,
                                "..."
                                )
        return DumpString
m_NAtagSCLineupInfo=tagSCLineupInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCLineupInfo.Head.Cmd,m_NAtagSCLineupInfo.Head.SubCmd))] = m_NAtagSCLineupInfo
#------------------------------------------------------
# B1 06 通知玩家向目标点移动 #tagMCNotifyPlayerMove
class  tagMCNotifyPlayerMove(Structure):