xdh
2019-05-10 361a2492595f1e10b0aa1b164023e6784a6b9678
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -16782,11 +16782,11 @@
#------------------------------------------------------
# A3 09 技能五行专精信息 #tagMCSkillElementInfo
class  tagMCSkillElementData(Structure):
class  tagMCSkillElementActiveData(Structure):
    _pack_ = 1
    _fields_ = [
                  ("MainSkillID", c_int),    # 主技能ID
                  ("ElementSkillID", c_int),    # 专精技能ID
                  ("SkillID", c_int),    # 技能ID
                  ("ActiveLV", c_ubyte),    # 激活等级
                  ]
    def __init__(self):
@@ -16799,24 +16799,88 @@
        return _pos + self.GetLength()
    def Clear(self):
        self.MainSkillID = 0
        self.ElementSkillID = 0
        self.SkillID = 0
        self.ActiveLV = 0
        return
    def GetLength(self):
        return sizeof(tagMCSkillElementData)
        return sizeof(tagMCSkillElementActiveData)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// A3 09 技能五行专精信息 //tagMCSkillElementInfo:
                                SkillID:%d,
                                ActiveLV:%d
                                '''\
                                %(
                                self.SkillID,
                                self.ActiveLV
                                )
        return DumpString
class  tagMCSkillElementData(Structure):
    MainSkillID = 0    #(DWORD MainSkillID)// 主技能ID
    ElementSkillID = 0    #(DWORD ElementSkillID)// 选择的专精技能ID
    SkillCnt = 0    #(BYTE SkillCnt)// 数量
    ActiveSkill = list()    #(vector<tagMCSkillElementActiveData> ActiveSkill)// 激活的技能ID
    data = None
    def __init__(self):
        self.Clear()
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        self.MainSkillID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.ElementSkillID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.SkillCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.SkillCnt):
            temActiveSkill = tagMCSkillElementActiveData()
            _pos = temActiveSkill.ReadData(_lpData, _pos)
            self.ActiveSkill.append(temActiveSkill)
        return _pos
    def Clear(self):
        self.MainSkillID = 0
        self.ElementSkillID = 0
        self.SkillCnt = 0
        self.ActiveSkill = list()
        return
    def GetLength(self):
        length = 0
        length += 4
        length += 4
        length += 1
        for i in range(self.SkillCnt):
            length += self.ActiveSkill[i].GetLength()
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteDWORD(data, self.MainSkillID)
        data = CommFunc.WriteDWORD(data, self.ElementSkillID)
        data = CommFunc.WriteBYTE(data, self.SkillCnt)
        for i in range(self.SkillCnt):
            data = CommFunc.WriteString(data, self.ActiveSkill[i].GetLength(), self.ActiveSkill[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                MainSkillID:%d,
                                ElementSkillID:%d
                                ElementSkillID:%d,
                                SkillCnt:%d,
                                ActiveSkill:%s
                                '''\
                                %(
                                self.MainSkillID,
                                self.ElementSkillID
                                self.ElementSkillID,
                                self.SkillCnt,
                                "..."
                                )
        return DumpString
@@ -29509,6 +29573,58 @@
#------------------------------------------------------
# B2 13 天星塔通关层数 #tagMCSkyTowerInfo
class  tagMCSkyTowerInfo(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("Floor", c_int),    # 已通关层
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xB2
        self.SubCmd = 0x13
        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.Cmd = 0xB2
        self.SubCmd = 0x13
        self.Floor = 0
        return
    def GetLength(self):
        return sizeof(tagMCSkyTowerInfo)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// B2 13 天星塔通关层数 //tagMCSkyTowerInfo:
                                Cmd:%s,
                                SubCmd:%s,
                                Floor:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.Floor
                                )
        return DumpString
m_NAtagMCSkyTowerInfo=tagMCSkyTowerInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSkyTowerInfo.Cmd,m_NAtagMCSkyTowerInfo.SubCmd))] = m_NAtagMCSkyTowerInfo
#------------------------------------------------------
#B2 02 推送提醒设置通知 #tagMCPushNotificationsSetting
class  tagMCPushNotificationsSetting(Structure):
@@ -29629,62 +29745,6 @@
m_NAtagMCZhuXianBossCnt=tagMCZhuXianBossCnt()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianBossCnt.Cmd,m_NAtagMCZhuXianBossCnt.SubCmd))] = m_NAtagMCZhuXianBossCnt
#------------------------------------------------------
# B2 13 诛仙塔通关层数 #tagMCZhuXianTowerInfo
class  tagMCZhuXianTowerInfo(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("Floor", c_int),    # 已通关层
                  ("LastFloor", c_int),    # 上次挑战层
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xB2
        self.SubCmd = 0x13
        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.Cmd = 0xB2
        self.SubCmd = 0x13
        self.Floor = 0
        self.LastFloor = 0
        return
    def GetLength(self):
        return sizeof(tagMCZhuXianTowerInfo)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// B2 13 诛仙塔通关层数 //tagMCZhuXianTowerInfo:
                                Cmd:%s,
                                SubCmd:%s,
                                Floor:%d,
                                LastFloor:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.Floor,
                                self.LastFloor
                                )
        return DumpString
m_NAtagMCZhuXianTowerInfo=tagMCZhuXianTowerInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianTowerInfo.Cmd,m_NAtagMCZhuXianTowerInfo.SubCmd))] = m_NAtagMCZhuXianTowerInfo
#------------------------------------------------------