hxp
2019-02-12 1a4ac6183072f417c90832baaa8ad8ece44d99b5
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -2983,6 +2983,54 @@
#------------------------------------------------------
# C0 03 强制退出跨服状态 #tagCGForceQuitCrossState
class  tagCGForceQuitCrossState(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xC0
        self.SubCmd = 0x03
        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 = 0xC0
        self.SubCmd = 0x03
        return
    def GetLength(self):
        return sizeof(tagCGForceQuitCrossState)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// C0 03 强制退出跨服状态 //tagCGForceQuitCrossState:
                                Cmd:%s,
                                SubCmd:%s
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd
                                )
        return DumpString
m_NAtagCGForceQuitCrossState=tagCGForceQuitCrossState()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGForceQuitCrossState.Cmd,m_NAtagCGForceQuitCrossState.SubCmd))] = m_NAtagCGForceQuitCrossState
#------------------------------------------------------
# C0 01 查看跨服竞技场赛季排行榜 #tagCGViewCrossPKBillboard
class  tagCGViewCrossPKBillboard(Structure):
@@ -3208,6 +3256,54 @@
m_NAtagCMPCInfo=tagCMPCInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMPCInfo.Head.Cmd,m_NAtagCMPCInfo.Head.SubCmd))] = m_NAtagCMPCInfo
#------------------------------------------------------
# A1 08 刷新主服角色信息 #tagCMRefreshMainServerRole
class  tagCMRefreshMainServerRole(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xA1
        self.SubCmd = 0x08
        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 = 0xA1
        self.SubCmd = 0x08
        return
    def GetLength(self):
        return sizeof(tagCMRefreshMainServerRole)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// A1 08 刷新主服角色信息 //tagCMRefreshMainServerRole:
                                Cmd:%s,
                                SubCmd:%s
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd
                                )
        return DumpString
m_NAtagCMRefreshMainServerRole=tagCMRefreshMainServerRole()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRefreshMainServerRole.Cmd,m_NAtagCMRefreshMainServerRole.SubCmd))] = m_NAtagCMRefreshMainServerRole
#------------------------------------------------------
@@ -5993,6 +6089,62 @@
#------------------------------------------------------
# A3 30 装备诛仙装备 #tagCMEquipZhuXianItem
class  tagCMEquipZhuXianItem(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("EquipIndex", c_ubyte),    #装备在诛仙装备背包中的索引
                  ("ItemIndex", c_ubyte),    #装备在诛仙物品背包中的索引
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xA3
        self.SubCmd = 0x30
        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 = 0xA3
        self.SubCmd = 0x30
        self.EquipIndex = 0
        self.ItemIndex = 0
        return
    def GetLength(self):
        return sizeof(tagCMEquipZhuXianItem)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// A3 30 装备诛仙装备 //tagCMEquipZhuXianItem:
                                Cmd:%s,
                                SubCmd:%s,
                                EquipIndex:%d,
                                ItemIndex:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.EquipIndex,
                                self.ItemIndex
                                )
        return DumpString
m_NAtagCMEquipZhuXianItem=tagCMEquipZhuXianItem()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMEquipZhuXianItem.Cmd,m_NAtagCMEquipZhuXianItem.SubCmd))] = m_NAtagCMEquipZhuXianItem
#------------------------------------------------------
# A3 12 守护拾取物品 #tagCMGuardPickupItem
class  tagCMGuardPickupItem(Structure):
@@ -6753,6 +6905,58 @@
#------------------------------------------------------
# A3 31 卸下诛仙装备 #tagCMUnEquipZhuXianItem
class  tagCMUnEquipZhuXianItem(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("EquipIndex", c_ubyte),    #装备在诛仙装备背包中的索引
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xA3
        self.SubCmd = 0x31
        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 = 0xA3
        self.SubCmd = 0x31
        self.EquipIndex = 0
        return
    def GetLength(self):
        return sizeof(tagCMUnEquipZhuXianItem)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// A3 31 卸下诛仙装备 //tagCMUnEquipZhuXianItem:
                                Cmd:%s,
                                SubCmd:%s,
                                EquipIndex:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.EquipIndex
                                )
        return DumpString
m_NAtagCMUnEquipZhuXianItem=tagCMUnEquipZhuXianItem()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMUnEquipZhuXianItem.Cmd,m_NAtagCMUnEquipZhuXianItem.SubCmd))] = m_NAtagCMUnEquipZhuXianItem
#------------------------------------------------------
# A3 2B 一键使用属性果实 #tagCMUseAllAttrFruit
class  tagCMUseAllAttrFruit(Structure):
@@ -6929,6 +7133,90 @@
m_NAtagCMWingUp=tagCMWingUp()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMWingUp.Head.Cmd,m_NAtagCMWingUp.Head.SubCmd))] = m_NAtagCMWingUp
#------------------------------------------------------
# A3 32 诛仙装备分解 #tagCMZhuXianEquipDecompose
class  tagCMZhuXianEquipDecompose(Structure):
    Head = tagHead()
    Count = 0    #(BYTE Count)//材料所在背包索引的数量
    IndexList = list()    #(vector<WORD> IndexList)//材料所在背包索引列表
    ItemIDList = list()    #(vector<DWORD> ItemIDList)//材料所在背包物品ID列表
    IsAuto = 0    #(BYTE IsAuto)//是否自动分解
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xA3
        self.Head.SubCmd = 0x32
        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):
            value,_pos=CommFunc.ReadWORD(_lpData,_pos)
            self.IndexList.append(value)
        for i in range(self.Count):
            value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
            self.ItemIDList.append(value)
        self.IsAuto,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xA3
        self.Head.SubCmd = 0x32
        self.Count = 0
        self.IndexList = list()
        self.ItemIDList = list()
        self.IsAuto = 0
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += 2 * self.Count
        length += 4 * self.Count
        length += 1
        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.WriteWORD(data, self.IndexList[i])
        for i in range(self.Count):
            data = CommFunc.WriteDWORD(data, self.ItemIDList[i])
        data = CommFunc.WriteBYTE(data, self.IsAuto)
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                Count:%d,
                                IndexList:%s,
                                ItemIDList:%s,
                                IsAuto:%d
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.Count,
                                "...",
                                "...",
                                self.IsAuto
                                )
        return DumpString
m_NAtagCMZhuXianEquipDecompose=tagCMZhuXianEquipDecompose()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMZhuXianEquipDecompose.Head.Cmd,m_NAtagCMZhuXianEquipDecompose.Head.SubCmd))] = m_NAtagCMZhuXianEquipDecompose
#------------------------------------------------------
@@ -8128,6 +8416,83 @@
#------------------------------------------------------
# A5 20 时装分解 #tagCMCoatDecompose
class  tagCMCoatDecompose(Structure):
    Head = tagHead()
    Count = 0    #(BYTE Count)//材料所在背包索引的数量
    IndexList = list()    #(vector<WORD> IndexList)//材料所在背包索引列表
    ItemIDList = list()    #(vector<DWORD> ItemIDList)//材料所在背包物品ID列表
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xA5
        self.Head.SubCmd = 0x20
        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):
            value,_pos=CommFunc.ReadWORD(_lpData,_pos)
            self.IndexList.append(value)
        for i in range(self.Count):
            value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
            self.ItemIDList.append(value)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xA5
        self.Head.SubCmd = 0x20
        self.Count = 0
        self.IndexList = list()
        self.ItemIDList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += 2 * self.Count
        length += 4 * self.Count
        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.WriteWORD(data, self.IndexList[i])
        for i in range(self.Count):
            data = CommFunc.WriteDWORD(data, self.ItemIDList[i])
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                Count:%d,
                                IndexList:%s,
                                ItemIDList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.Count,
                                "...",
                                "..."
                                )
        return DumpString
m_NAtagCMCoatDecompose=tagCMCoatDecompose()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMCoatDecompose.Head.Cmd,m_NAtagCMCoatDecompose.Head.SubCmd))] = m_NAtagCMCoatDecompose
#------------------------------------------------------
# A5 0B 玩家时装升级 #tagCMCoatUp
class  tagCMCoatUp(Structure):
@@ -8135,7 +8500,7 @@
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("CoatIndex", c_ubyte),    # 时装索引
                  ("CoatIndex", c_int),    # 时装索引
                  ]
    def __init__(self):
@@ -11847,6 +12212,54 @@
#------------------------------------------------------
# A8 06 查询充值结果 #tagCMQueryRecharge
class  tagCMQueryRecharge(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xA8
        self.SubCmd = 0x06
        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 = 0xA8
        self.SubCmd = 0x06
        return
    def GetLength(self):
        return sizeof(tagCMQueryRecharge)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// A8 06 查询充值结果 //tagCMQueryRecharge:
                                Cmd:%s,
                                SubCmd:%s
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd
                                )
        return DumpString
m_NAtagCMQueryRecharge=tagCMQueryRecharge()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMQueryRecharge.Cmd,m_NAtagCMQueryRecharge.SubCmd))] = m_NAtagCMQueryRecharge
#------------------------------------------------------
# A8 05 VIP杀怪等级信息同步开关 #tagCMVIPKillNPCLVInfoSwitch
class  tagCMVIPKillNPCLVInfoSwitch(Structure):
@@ -12347,6 +12760,7 @@
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("RedPaketID", c_int),    # 红包ID
                  ("GetWay", c_ubyte),    #获得途径
                  ]
    def __init__(self):
@@ -12364,6 +12778,7 @@
        self.Cmd = 0xAB
        self.SubCmd = 0x12
        self.RedPaketID = 0
        self.GetWay = 0
        return
    def GetLength(self):
@@ -12376,12 +12791,14 @@
        DumpString = '''// AB 12 抢红包 //tagCMGrabFamilyRedPacket:
                                Cmd:%s,
                                SubCmd:%s,
                                RedPaketID:%d
                                RedPaketID:%d,
                                GetWay:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.RedPaketID
                                self.RedPaketID,
                                self.GetWay
                                )
        return DumpString
@@ -15149,6 +15566,70 @@
#------------------------------------------------------
# C1 06 跨服NPC对话 #tagCMCrossNPCTalk
class  tagCMCrossNPCTalk(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("ObjID", c_int),
                  ("NPCID", c_int),
                  ("PosX", c_ushort),
                  ("PosY", c_ushort),
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xC1
        self.SubCmd = 0x06
        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 = 0xC1
        self.SubCmd = 0x06
        self.ObjID = 0
        self.NPCID = 0
        self.PosX = 0
        self.PosY = 0
        return
    def GetLength(self):
        return sizeof(tagCMCrossNPCTalk)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// C1 06 跨服NPC对话 //tagCMCrossNPCTalk:
                                Cmd:%s,
                                SubCmd:%s,
                                ObjID:%d,
                                NPCID:%d,
                                PosX:%d,
                                PosY:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.ObjID,
                                self.NPCID,
                                self.PosX,
                                self.PosY
                                )
        return DumpString
m_NAtagCMCrossNPCTalk=tagCMCrossNPCTalk()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMCrossNPCTalk.Cmd,m_NAtagCMCrossNPCTalk.SubCmd))] = m_NAtagCMCrossNPCTalk
#------------------------------------------------------
# C1 02 跨服PK购买次数 #tagCMCrossRealmPKBuy
class  tagCMCrossRealmPKBuy(Structure):
@@ -15305,6 +15786,58 @@
#------------------------------------------------------
# C1 05 进入跨服地图 #tagCMEnterCrossServer
class  tagCMEnterCrossServer(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("DataMapID", c_int),
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xC1
        self.SubCmd = 0x05
        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 = 0xC1
        self.SubCmd = 0x05
        self.DataMapID = 0
        return
    def GetLength(self):
        return sizeof(tagCMEnterCrossServer)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// C1 05 进入跨服地图 //tagCMEnterCrossServer:
                                Cmd:%s,
                                SubCmd:%s,
                                DataMapID:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.DataMapID
                                )
        return DumpString
m_NAtagCMEnterCrossServer=tagCMEnterCrossServer()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMEnterCrossServer.Cmd,m_NAtagCMEnterCrossServer.SubCmd))] = m_NAtagCMEnterCrossServer
#------------------------------------------------------
# C1 04 主动退出跨服 #tagCMExitCrossRealm
class  tagCMExitCrossRealm(Structure):