| | |
| | |
|
| | | class tagCGVoiceChat(Structure):
|
| | | Head = tagHead()
|
| | | ChannelType = 0 #(BYTE ChannelType)// 1 世界 2 仙盟 3 私聊(好友) 4 队伍 -------查看封包tagCMVoiceChat 5 区域 |
| | | ChannelType = 0 #(BYTE ChannelType)// 1 世界 2 仙盟 3 私聊(好友) 4 队伍 -------查看封包tagCMVoiceChat 5 区域 |
| | | TargetNameLen = 0 #(BYTE TargetNameLen)
|
| | | TargetName = "" #(String TargetName)//size = TargetNameLen
|
| | | TargetID = 0 #(DWORD TargetID)// 默认发玩家ID,没有ID才发名称
|
| | |
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ZoneID", c_ubyte), # 赛区ID |
| | | ("SeasonID", c_ubyte), # 赛季ID |
| | | ("ZoneID", c_ubyte), # 赛区ID |
| | | ("SeasonID", c_ubyte), # 赛季ID |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | ("SrcBackpack", c_ubyte), #源背包类型
|
| | | ("DesBackPack", c_ubyte), #目标背包类型
|
| | | ("SrcIndex", c_ushort), #转移物品索引位置;当全部转移时此值无效
|
| | | ("IsAll", c_ubyte), #是否全部转移 |
| | | ("IsAll", c_ubyte), #是否全部转移 |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A6 06 家族兑换活跃令 #tagCMFamilyActivityExchange
|
| | |
|
| | | class tagCMFamilyActivityExchange(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 = 0xA6
|
| | | self.Head.SubCmd = 0x06
|
| | | 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 = 0xA6
|
| | | self.Head.SubCmd = 0x06
|
| | | 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_NAtagCMFamilyActivityExchange=tagCMFamilyActivityExchange()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFamilyActivityExchange.Head.Cmd,m_NAtagCMFamilyActivityExchange.Head.SubCmd))] = m_NAtagCMFamilyActivityExchange
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A6 05 家族捐献兽粮 #tagCMFamilyDonate
|
| | |
|
| | | class tagCMFamilyDonate(Structure):
|