xdh
2019-04-25 88650853f1898815f4612280dd2ffc85af9ddd80
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -16772,6 +16772,114 @@
#------------------------------------------------------
# A3 09 技能五行专精信息 #tagMCSkillElementInfo
class  tagMCSkillElementData(Structure):
    _pack_ = 1
    _fields_ = [
                  ("MainSkillID", c_int),    # 主技能ID
                  ("ElementSkillID", c_int),    # 专精技能ID
                  ]
    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.MainSkillID = 0
        self.ElementSkillID = 0
        return
    def GetLength(self):
        return sizeof(tagMCSkillElementData)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// A3 09 技能五行专精信息 //tagMCSkillElementInfo:
                                MainSkillID:%d,
                                ElementSkillID:%d
                                '''\
                                %(
                                self.MainSkillID,
                                self.ElementSkillID
                                )
        return DumpString
class  tagMCSkillElementInfo(Structure):
    Head = tagHead()
    Cnt = 0    #(BYTE Cnt)// 数量
    InfoList = list()    #(vector<tagMCSkillElementData> InfoList)
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xA3
        self.Head.SubCmd = 0x09
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.Cnt):
            temInfoList = tagMCSkillElementData()
            _pos = temInfoList.ReadData(_lpData, _pos)
            self.InfoList.append(temInfoList)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xA3
        self.Head.SubCmd = 0x09
        self.Cnt = 0
        self.InfoList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        for i in range(self.Cnt):
            length += self.InfoList[i].GetLength()
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.Cnt)
        for i in range(self.Cnt):
            data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                Cnt:%d,
                                InfoList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.Cnt,
                                "..."
                                )
        return DumpString
m_NAtagMCSkillElementInfo=tagMCSkillElementInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSkillElementInfo.Head.Cmd,m_NAtagMCSkillElementInfo.Head.SubCmd))] = m_NAtagMCSkillElementInfo
#------------------------------------------------------
# A3 BC 通知装备位孔位宝石ID #tagMCStoneInfo
class  tagMCStoneMsg(Structure):