|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A4 0C 多仙盟boss活动信息 #tagGCAllFamilyBossInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagGCAllFamilyBossInfo(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("IsEnd", c_ubyte),    # 是否已结束 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xA4 | 
|---|
|  |  |  | self.SubCmd = 0x0C | 
|---|
|  |  |  | 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 = 0xA4 | 
|---|
|  |  |  | self.SubCmd = 0x0C | 
|---|
|  |  |  | self.IsEnd = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagGCAllFamilyBossInfo) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// A4 0C 多仙盟boss活动信息 //tagGCAllFamilyBossInfo: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | IsEnd:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.IsEnd | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagGCAllFamilyBossInfo=tagGCAllFamilyBossInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCAllFamilyBossInfo.Cmd,m_NAtagGCAllFamilyBossInfo.SubCmd))] = m_NAtagGCAllFamilyBossInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A4 0A 假仙盟信息 #tagGCFakeFamilyInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagGCFakeFamilyInfo(Structure): | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | #A9 05 天梯竞技场每日奖励信息#tagGCHighLadderRewardInfo | 
|---|
|  |  |  | # A9 05 通知广播装备详细信息 #tagGCNotifyEquipDetailInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagGCHighLadderRewardInfo(Structure): | 
|---|
|  |  |  | class  tagGCNotifyEquipClassEquip(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("hadGot", c_ubyte),    #是否已领取 | 
|---|
|  |  |  | ("Order", c_ushort),    #奖励排名 | 
|---|
|  |  |  | ("ItemID", c_int), | 
|---|
|  |  |  | ("Star", c_ubyte), | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xA9 | 
|---|
|  |  |  | self.SubCmd = 0x05 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, stringData, _pos=0, _len=0): | 
|---|
|  |  |  | 
|---|
|  |  |  | return _pos + self.GetLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Cmd = 0xA9 | 
|---|
|  |  |  | self.SubCmd = 0x05 | 
|---|
|  |  |  | self.hadGot = 0 | 
|---|
|  |  |  | self.Order = 0 | 
|---|
|  |  |  | self.ItemID = 0 | 
|---|
|  |  |  | self.Star = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagGCHighLadderRewardInfo) | 
|---|
|  |  |  | return sizeof(tagGCNotifyEquipClassEquip) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''//A9 05 天梯竞技场每日奖励信息//tagGCHighLadderRewardInfo: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | hadGot:%d, | 
|---|
|  |  |  | Order:%d | 
|---|
|  |  |  | DumpString = '''// A9 05 通知广播装备详细信息 //tagGCNotifyEquipDetailInfo: | 
|---|
|  |  |  | ItemID:%d, | 
|---|
|  |  |  | Star:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.hadGot, | 
|---|
|  |  |  | self.Order | 
|---|
|  |  |  | self.ItemID, | 
|---|
|  |  |  | self.Star | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagGCHighLadderRewardInfo=tagGCHighLadderRewardInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCHighLadderRewardInfo.Cmd,m_NAtagGCHighLadderRewardInfo.SubCmd))] = m_NAtagGCHighLadderRewardInfo | 
|---|
|  |  |  | class  tagGCNotifyEquipDetailInfo(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | ItemGUID = ""    #(char ItemGUID[40]) | 
|---|
|  |  |  | ItemID = 0    #(DWORD ItemID) | 
|---|
|  |  |  | Star = 0    #(BYTE Star)//星级 | 
|---|
|  |  |  | PlusLV = 0    #(WORD PlusLV)//强化等级 | 
|---|
|  |  |  | EvolveLV = 0    #(BYTE EvolveLV)//进化等级 | 
|---|
|  |  |  | WashLV = 0    #(BYTE WashLV)//洗练等级 | 
|---|
|  |  |  | WashValueCount = 0    #(BYTE WashValueCount) | 
|---|
|  |  |  | WashValueList = list()    #(vector<WORD> WashValueList)//洗练值 | 
|---|
|  |  |  | StoneIDCount = 0    #(BYTE StoneIDCount) | 
|---|
|  |  |  | StoneIDList = list()    #(vector<DWORD> StoneIDList)//宝石 | 
|---|
|  |  |  | ClassEquipCount = 0    #(BYTE ClassEquipCount) | 
|---|
|  |  |  | ClassEquipList = list()    #(vector<tagGCNotifyEquipClassEquip> ClassEquipList)//本境界穿戴的装备 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA9 | 
|---|
|  |  |  | self.Head.SubCmd = 0x05 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) | 
|---|
|  |  |  | self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.Star,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.PlusLV,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.EvolveLV,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.WashLV,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.WashValueCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.WashValueCount): | 
|---|
|  |  |  | value,_pos=CommFunc.ReadWORD(_lpData,_pos) | 
|---|
|  |  |  | self.WashValueList.append(value) | 
|---|
|  |  |  | self.StoneIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.StoneIDCount): | 
|---|
|  |  |  | value,_pos=CommFunc.ReadDWORD(_lpData,_pos) | 
|---|
|  |  |  | self.StoneIDList.append(value) | 
|---|
|  |  |  | self.ClassEquipCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.ClassEquipCount): | 
|---|
|  |  |  | temClassEquipList = tagGCNotifyEquipClassEquip() | 
|---|
|  |  |  | _pos = temClassEquipList.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.ClassEquipList.append(temClassEquipList) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA9 | 
|---|
|  |  |  | self.Head.SubCmd = 0x05 | 
|---|
|  |  |  | self.ItemGUID = "" | 
|---|
|  |  |  | self.ItemID = 0 | 
|---|
|  |  |  | self.Star = 0 | 
|---|
|  |  |  | self.PlusLV = 0 | 
|---|
|  |  |  | self.EvolveLV = 0 | 
|---|
|  |  |  | self.WashLV = 0 | 
|---|
|  |  |  | self.WashValueCount = 0 | 
|---|
|  |  |  | self.WashValueList = list() | 
|---|
|  |  |  | self.StoneIDCount = 0 | 
|---|
|  |  |  | self.StoneIDList = list() | 
|---|
|  |  |  | self.ClassEquipCount = 0 | 
|---|
|  |  |  | self.ClassEquipList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 40 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 2 * self.WashValueCount | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 4 * self.StoneIDCount | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | for i in range(self.ClassEquipCount): | 
|---|
|  |  |  | length += self.ClassEquipList[i].GetLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, 40, self.ItemGUID) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.ItemID) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.Star) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.PlusLV) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.EvolveLV) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.WashLV) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.WashValueCount) | 
|---|
|  |  |  | for i in range(self.WashValueCount): | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.WashValueList[i]) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.StoneIDCount) | 
|---|
|  |  |  | for i in range(self.StoneIDCount): | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.StoneIDList[i]) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.ClassEquipCount) | 
|---|
|  |  |  | for i in range(self.ClassEquipCount): | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.ClassEquipList[i].GetLength(), self.ClassEquipList[i].GetBuffer()) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | ItemGUID:%s, | 
|---|
|  |  |  | ItemID:%d, | 
|---|
|  |  |  | Star:%d, | 
|---|
|  |  |  | PlusLV:%d, | 
|---|
|  |  |  | EvolveLV:%d, | 
|---|
|  |  |  | WashLV:%d, | 
|---|
|  |  |  | WashValueCount:%d, | 
|---|
|  |  |  | WashValueList:%s, | 
|---|
|  |  |  | StoneIDCount:%d, | 
|---|
|  |  |  | StoneIDList:%s, | 
|---|
|  |  |  | ClassEquipCount:%d, | 
|---|
|  |  |  | ClassEquipList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.ItemGUID, | 
|---|
|  |  |  | self.ItemID, | 
|---|
|  |  |  | self.Star, | 
|---|
|  |  |  | self.PlusLV, | 
|---|
|  |  |  | self.EvolveLV, | 
|---|
|  |  |  | self.WashLV, | 
|---|
|  |  |  | self.WashValueCount, | 
|---|
|  |  |  | "...", | 
|---|
|  |  |  | self.StoneIDCount, | 
|---|
|  |  |  | "...", | 
|---|
|  |  |  | self.ClassEquipCount, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagGCNotifyEquipDetailInfo=tagGCNotifyEquipDetailInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCNotifyEquipDetailInfo.Head.Cmd,m_NAtagGCNotifyEquipDetailInfo.Head.SubCmd))] = m_NAtagGCNotifyEquipDetailInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagGCRecommendFriendsInfo=tagGCRecommendFriendsInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCRecommendFriendsInfo.Head.Cmd,m_NAtagGCRecommendFriendsInfo.Head.SubCmd))] = m_NAtagGCRecommendFriendsInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A9 07 定时商店刷新倒计时 #tagGCShopRefreshTimeList | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagGCShopRefreshTime(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("ShopID", c_int),    # 商店ID | 
|---|
|  |  |  | ("RemainSecond", c_int),    # 多少秒后刷新 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xA9 | 
|---|
|  |  |  | self.SubCmd = 0x07 | 
|---|
|  |  |  | 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 = 0xA9 | 
|---|
|  |  |  | self.SubCmd = 0x07 | 
|---|
|  |  |  | self.ShopID = 0 | 
|---|
|  |  |  | self.RemainSecond = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagGCShopRefreshTime) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// A9 07 定时商店刷新倒计时 //tagGCShopRefreshTimeList: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | ShopID:%d, | 
|---|
|  |  |  | RemainSecond:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.ShopID, | 
|---|
|  |  |  | self.RemainSecond | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagGCShopRefreshTimeList(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | ShopCnt = 0    #(BYTE ShopCnt)//商店信息个数 | 
|---|
|  |  |  | ShopTimeInfoList = list()    #(vector<tagGCShopRefreshTime> ShopTimeInfoList)//商店信息列表 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA9 | 
|---|
|  |  |  | self.Head.SubCmd = 0x07 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.ShopCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.ShopCnt): | 
|---|
|  |  |  | temShopTimeInfoList = tagGCShopRefreshTime() | 
|---|
|  |  |  | _pos = temShopTimeInfoList.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.ShopTimeInfoList.append(temShopTimeInfoList) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA9 | 
|---|
|  |  |  | self.Head.SubCmd = 0x07 | 
|---|
|  |  |  | self.ShopCnt = 0 | 
|---|
|  |  |  | self.ShopTimeInfoList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | for i in range(self.ShopCnt): | 
|---|
|  |  |  | length += self.ShopTimeInfoList[i].GetLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.ShopCnt) | 
|---|
|  |  |  | for i in range(self.ShopCnt): | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.ShopTimeInfoList[i].GetLength(), self.ShopTimeInfoList[i].GetBuffer()) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | ShopCnt:%d, | 
|---|
|  |  |  | ShopTimeInfoList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.ShopCnt, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagGCShopRefreshTimeList=tagGCShopRefreshTimeList() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCShopRefreshTimeList.Head.Cmd,m_NAtagGCShopRefreshTimeList.Head.SubCmd))] = m_NAtagGCShopRefreshTimeList | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # AC 01 通知领地争夺占领情况 #tagGCManorWarInfo | 
|---|
|  |  |  | # AC 07 骑宠Boss信息 #tagGCHorsePetBossInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagGCManorInfo(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | MapID = 0    #(DWORD MapID)// 领地地图id | 
|---|
|  |  |  | FamilyID = 0    #(DWORD FamilyID)// 占领战盟id | 
|---|
|  |  |  | FNameLen = 0    #(BYTE FNameLen)// 战盟名字长度 | 
|---|
|  |  |  | FamilyName = ""    #(String FamilyName)// 战盟名 size = FNameLen | 
|---|
|  |  |  | LNameLen = 0    #(BYTE LNameLen)// 盟主名字长度 | 
|---|
|  |  |  | LeaderName = ""    #(String LeaderName)// 盟主名 size = LNameLen | 
|---|
|  |  |  | OccupyDays = 0    #(WORD OccupyDays)// 连续占领天数 | 
|---|
|  |  |  | LastFamilyID = 0    #(DWORD LastFamilyID)// 上次占领的战盟id | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  | class  tagGCHorsePetBossInfo(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("IsEnd", c_int),    # 是否已结束(按位代表对应线路是否结束) | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xAC | 
|---|
|  |  |  | self.Head.SubCmd = 0x01 | 
|---|
|  |  |  | self.Cmd = 0xAC | 
|---|
|  |  |  | self.SubCmd = 0x07 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | def ReadData(self, stringData, _pos=0, _len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.MapID,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.FamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.FNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.FamilyName,_pos = CommFunc.ReadString(_lpData, _pos,self.FNameLen) | 
|---|
|  |  |  | self.LNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.LeaderName,_pos = CommFunc.ReadString(_lpData, _pos,self.LNameLen) | 
|---|
|  |  |  | self.OccupyDays,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.LastFamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  | memmove(addressof(self), stringData[_pos:], self.GetLength()) | 
|---|
|  |  |  | return _pos + self.GetLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xAC | 
|---|
|  |  |  | self.Head.SubCmd = 0x01 | 
|---|
|  |  |  | self.MapID = 0 | 
|---|
|  |  |  | self.FamilyID = 0 | 
|---|
|  |  |  | self.FNameLen = 0 | 
|---|
|  |  |  | self.FamilyName = "" | 
|---|
|  |  |  | self.LNameLen = 0 | 
|---|
|  |  |  | self.LeaderName = "" | 
|---|
|  |  |  | self.OccupyDays = 0 | 
|---|
|  |  |  | self.LastFamilyID = 0 | 
|---|
|  |  |  | self.Cmd = 0xAC | 
|---|
|  |  |  | self.SubCmd = 0x07 | 
|---|
|  |  |  | self.IsEnd = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += len(self.FamilyName) | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += len(self.LeaderName) | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  | return sizeof(tagGCHorsePetBossInfo) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.MapID) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.FamilyID) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.FNameLen) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.FNameLen, self.FamilyName) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.LNameLen) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.LNameLen, self.LeaderName) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.OccupyDays) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.LastFamilyID) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | MapID:%d, | 
|---|
|  |  |  | FamilyID:%d, | 
|---|
|  |  |  | FNameLen:%d, | 
|---|
|  |  |  | FamilyName:%s, | 
|---|
|  |  |  | LNameLen:%d, | 
|---|
|  |  |  | LeaderName:%s, | 
|---|
|  |  |  | OccupyDays:%d, | 
|---|
|  |  |  | LastFamilyID:%d | 
|---|
|  |  |  | DumpString = '''// AC 07 骑宠Boss信息 //tagGCHorsePetBossInfo: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | IsEnd:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.MapID, | 
|---|
|  |  |  | self.FamilyID, | 
|---|
|  |  |  | self.FNameLen, | 
|---|
|  |  |  | self.FamilyName, | 
|---|
|  |  |  | self.LNameLen, | 
|---|
|  |  |  | self.LeaderName, | 
|---|
|  |  |  | self.OccupyDays, | 
|---|
|  |  |  | self.LastFamilyID | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.IsEnd | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagGCManorWarInfo(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | ManorCnt = 0    #(BYTE ManorCnt)//领地个数 | 
|---|
|  |  |  | ManorInfoList = list()    #(vector<tagGCManorInfo> ManorInfoList)//领地信息列表 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xAC | 
|---|
|  |  |  | self.Head.SubCmd = 0x01 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.ManorCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.ManorCnt): | 
|---|
|  |  |  | temManorInfoList = tagGCManorInfo() | 
|---|
|  |  |  | _pos = temManorInfoList.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.ManorInfoList.append(temManorInfoList) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xAC | 
|---|
|  |  |  | self.Head.SubCmd = 0x01 | 
|---|
|  |  |  | self.ManorCnt = 0 | 
|---|
|  |  |  | self.ManorInfoList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | for i in range(self.ManorCnt): | 
|---|
|  |  |  | length += self.ManorInfoList[i].GetLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.ManorCnt) | 
|---|
|  |  |  | for i in range(self.ManorCnt): | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.ManorInfoList[i].GetLength(), self.ManorInfoList[i].GetBuffer()) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | ManorCnt:%d, | 
|---|
|  |  |  | ManorInfoList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.ManorCnt, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagGCManorWarInfo=tagGCManorWarInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCManorWarInfo.Head.Cmd,m_NAtagGCManorWarInfo.Head.SubCmd))] = m_NAtagGCManorWarInfo | 
|---|
|  |  |  | m_NAtagGCHorsePetBossInfo=tagGCHorsePetBossInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCHorsePetBossInfo.Cmd,m_NAtagGCHorsePetBossInfo.SubCmd))] = m_NAtagGCHorsePetBossInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagGCXMZZFightInfo=tagGCXMZZFightInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCXMZZFightInfo.Head.Cmd,m_NAtagGCXMZZFightInfo.Head.SubCmd))] = m_NAtagGCXMZZFightInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # AD 01 特惠活动信息 #tagGCTeHuiActivityInfoList | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagGCTeHuiActivityInfo(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("ActivityType", c_ubyte),    # 活动类型 | 
|---|
|  |  |  | ("ActivityValue", c_int),    # 活动值 | 
|---|
|  |  |  | ("StartDate", c_int),    # 开始时间time | 
|---|
|  |  |  | ("EndDate", c_int),    # 结束时间time | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xAD | 
|---|
|  |  |  | self.SubCmd = 0x01 | 
|---|
|  |  |  | 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 = 0xAD | 
|---|
|  |  |  | self.SubCmd = 0x01 | 
|---|
|  |  |  | self.ActivityType = 0 | 
|---|
|  |  |  | self.ActivityValue = 0 | 
|---|
|  |  |  | self.StartDate = 0 | 
|---|
|  |  |  | self.EndDate = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagGCTeHuiActivityInfo) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// AD 01 特惠活动信息 //tagGCTeHuiActivityInfoList: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | ActivityType:%d, | 
|---|
|  |  |  | ActivityValue:%d, | 
|---|
|  |  |  | StartDate:%d, | 
|---|
|  |  |  | EndDate:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.ActivityType, | 
|---|
|  |  |  | self.ActivityValue, | 
|---|
|  |  |  | self.StartDate, | 
|---|
|  |  |  | self.EndDate | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagGCTeHuiActivityInfoList(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | ActivityCount = 0    #(BYTE ActivityCount)//活动信息个数 | 
|---|
|  |  |  | ActivityInfoList = list()    #(vector<tagGCTeHuiActivityInfo> ActivityInfoList)//活动信息列表 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xAD | 
|---|
|  |  |  | self.Head.SubCmd = 0x01 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.ActivityCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.ActivityCount): | 
|---|
|  |  |  | temActivityInfoList = tagGCTeHuiActivityInfo() | 
|---|
|  |  |  | _pos = temActivityInfoList.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.ActivityInfoList.append(temActivityInfoList) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xAD | 
|---|
|  |  |  | self.Head.SubCmd = 0x01 | 
|---|
|  |  |  | self.ActivityCount = 0 | 
|---|
|  |  |  | self.ActivityInfoList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | for i in range(self.ActivityCount): | 
|---|
|  |  |  | length += self.ActivityInfoList[i].GetLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.ActivityCount) | 
|---|
|  |  |  | for i in range(self.ActivityCount): | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.ActivityInfoList[i].GetLength(), self.ActivityInfoList[i].GetBuffer()) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | ActivityCount:%d, | 
|---|
|  |  |  | ActivityInfoList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.ActivityCount, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagGCTeHuiActivityInfoList=tagGCTeHuiActivityInfoList() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCTeHuiActivityInfoList.Head.Cmd,m_NAtagGCTeHuiActivityInfoList.Head.SubCmd))] = m_NAtagGCTeHuiActivityInfoList | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  | ItemCount = 0    #(WORD ItemCount) | 
|---|
|  |  |  | AddTime = ""    #(char AddTime[19])//上架时间 yyyy-MM-dd hh:mm:ss | 
|---|
|  |  |  | BidderPrice = 0    #(WORD BidderPrice)//竞拍玩家出价 | 
|---|
|  |  |  | BiddingTime = ""    #(char BiddingTime[19])//竞价时间 yyyy-MM-dd hh:mm:ss | 
|---|
|  |  |  | UserDataLen = 0    #(WORD UserDataLen) | 
|---|
|  |  |  | UserData = ""    #(String UserData)//自定义数据 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  | 
|---|
|  |  |  | self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) | 
|---|
|  |  |  | self.BidderPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.BiddingTime,_pos = CommFunc.ReadString(_lpData, _pos,19) | 
|---|
|  |  |  | self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  | 
|---|
|  |  |  | self.ItemCount = 0 | 
|---|
|  |  |  | self.AddTime = "" | 
|---|
|  |  |  | self.BidderPrice = 0 | 
|---|
|  |  |  | self.BiddingTime = "" | 
|---|
|  |  |  | self.UserDataLen = 0 | 
|---|
|  |  |  | self.UserData = "" | 
|---|
|  |  |  | return | 
|---|
|  |  |  | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += 19 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += 19 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += len(self.UserData) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.ItemCount) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, 19, self.AddTime) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.BidderPrice) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, 19, self.BiddingTime) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.UserDataLen) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  | 
|---|
|  |  |  | ItemCount:%d, | 
|---|
|  |  |  | AddTime:%s, | 
|---|
|  |  |  | BidderPrice:%d, | 
|---|
|  |  |  | BiddingTime:%s, | 
|---|
|  |  |  | UserDataLen:%d, | 
|---|
|  |  |  | UserData:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | 
|---|
|  |  |  | self.ItemCount, | 
|---|
|  |  |  | self.AddTime, | 
|---|
|  |  |  | self.BidderPrice, | 
|---|
|  |  |  | self.BiddingTime, | 
|---|
|  |  |  | self.UserDataLen, | 
|---|
|  |  |  | self.UserData | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | 
|---|
|  |  |  | ItemCount = 0    #(WORD ItemCount) | 
|---|
|  |  |  | AddTime = ""    #(char AddTime[19])//上架时间 yyyy-MM-dd hh:mm:ss | 
|---|
|  |  |  | BidderPrice = 0    #(WORD BidderPrice)//竞拍玩家出价 | 
|---|
|  |  |  | BiddingTime = ""    #(char BiddingTime[19])//竞价时间 yyyy-MM-dd hh:mm:ss | 
|---|
|  |  |  | UserDataLen = 0    #(WORD UserDataLen) | 
|---|
|  |  |  | UserData = ""    #(String UserData)//自定义数据 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  | 
|---|
|  |  |  | self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) | 
|---|
|  |  |  | self.BidderPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.BiddingTime,_pos = CommFunc.ReadString(_lpData, _pos,19) | 
|---|
|  |  |  | self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  | 
|---|
|  |  |  | self.ItemCount = 0 | 
|---|
|  |  |  | self.AddTime = "" | 
|---|
|  |  |  | self.BidderPrice = 0 | 
|---|
|  |  |  | self.BiddingTime = "" | 
|---|
|  |  |  | self.UserDataLen = 0 | 
|---|
|  |  |  | self.UserData = "" | 
|---|
|  |  |  | return | 
|---|
|  |  |  | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += 19 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += 19 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += len(self.UserData) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.ItemCount) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, 19, self.AddTime) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.BidderPrice) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, 19, self.BiddingTime) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.UserDataLen) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  | 
|---|
|  |  |  | ItemCount:%d, | 
|---|
|  |  |  | AddTime:%s, | 
|---|
|  |  |  | BidderPrice:%d, | 
|---|
|  |  |  | BiddingTime:%s, | 
|---|
|  |  |  | UserDataLen:%d, | 
|---|
|  |  |  | UserData:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | 
|---|
|  |  |  | self.ItemCount, | 
|---|
|  |  |  | self.AddTime, | 
|---|
|  |  |  | self.BidderPrice, | 
|---|
|  |  |  | self.BiddingTime, | 
|---|
|  |  |  | self.UserDataLen, | 
|---|
|  |  |  | self.UserData | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | 
|---|
|  |  |  | ClassLV = 0    #(BYTE ClassLV)//过滤阶数,0为不限制 | 
|---|
|  |  |  | SpecItemIDCount = 0    #(BYTE SpecItemIDCount)//指定物品ID个数 | 
|---|
|  |  |  | SpecItemIDList = list()    #(vector<DWORD> SpecItemIDList)//指定物品ID | 
|---|
|  |  |  | FromNum = 0    #(WORD FromNum)//查询起始数 (从1开始) | 
|---|
|  |  |  | FromItemGUID = ""    #(char FromItemGUID[40])//从哪个物品开始查询 | 
|---|
|  |  |  | QueryDir = 0    #(BYTE QueryDir)//查询方向,1-往后查,2-往前查,3-定位查询 | 
|---|
|  |  |  | QueryCount = 0    #(BYTE QueryCount)//查询个数,0为全部 | 
|---|
|  |  |  | QueryTotalCount = 0    #(WORD QueryTotalCount)//查询条件实际总个数 | 
|---|
|  |  |  | QueryRemainlCount = 0    #(WORD QueryRemainlCount)//查询条件对应查询方向剩余个数 | 
|---|
|  |  |  | AuctionItemCount = 0    #(BYTE AuctionItemCount)//返回拍品数量 | 
|---|
|  |  |  | AuctionItemList = list()    #(vector<tagGCAuctionItem> AuctionItemList)//返回拍品列表 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  | 
|---|
|  |  |  | for i in range(self.SpecItemIDCount): | 
|---|
|  |  |  | value,_pos=CommFunc.ReadDWORD(_lpData,_pos) | 
|---|
|  |  |  | self.SpecItemIDList.append(value) | 
|---|
|  |  |  | self.FromNum,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.FromItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) | 
|---|
|  |  |  | self.QueryDir,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.QueryCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.QueryTotalCount,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.QueryRemainlCount,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.AuctionItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.AuctionItemCount): | 
|---|
|  |  |  | temAuctionItemList = tagGCAuctionItem() | 
|---|
|  |  |  | 
|---|
|  |  |  | self.ClassLV = 0 | 
|---|
|  |  |  | self.SpecItemIDCount = 0 | 
|---|
|  |  |  | self.SpecItemIDList = list() | 
|---|
|  |  |  | self.FromNum = 0 | 
|---|
|  |  |  | self.FromItemGUID = "" | 
|---|
|  |  |  | self.QueryDir = 0 | 
|---|
|  |  |  | self.QueryCount = 0 | 
|---|
|  |  |  | self.QueryTotalCount = 0 | 
|---|
|  |  |  | self.QueryRemainlCount = 0 | 
|---|
|  |  |  | self.AuctionItemCount = 0 | 
|---|
|  |  |  | self.AuctionItemList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 4 * self.SpecItemIDCount | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += 40 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.SpecItemIDCount) | 
|---|
|  |  |  | for i in range(self.SpecItemIDCount): | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.SpecItemIDList[i]) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.FromNum) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, 40, self.FromItemGUID) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.QueryDir) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.QueryCount) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.QueryTotalCount) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.QueryRemainlCount) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.AuctionItemCount) | 
|---|
|  |  |  | for i in range(self.AuctionItemCount): | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.AuctionItemList[i].GetLength(), self.AuctionItemList[i].GetBuffer()) | 
|---|
|  |  |  | 
|---|
|  |  |  | ClassLV:%d, | 
|---|
|  |  |  | SpecItemIDCount:%d, | 
|---|
|  |  |  | SpecItemIDList:%s, | 
|---|
|  |  |  | FromNum:%d, | 
|---|
|  |  |  | FromItemGUID:%s, | 
|---|
|  |  |  | QueryDir:%d, | 
|---|
|  |  |  | QueryCount:%d, | 
|---|
|  |  |  | QueryTotalCount:%d, | 
|---|
|  |  |  | QueryRemainlCount:%d, | 
|---|
|  |  |  | AuctionItemCount:%d, | 
|---|
|  |  |  | AuctionItemList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | 
|---|
|  |  |  | self.ClassLV, | 
|---|
|  |  |  | self.SpecItemIDCount, | 
|---|
|  |  |  | "...", | 
|---|
|  |  |  | self.FromNum, | 
|---|
|  |  |  | self.FromItemGUID, | 
|---|
|  |  |  | self.QueryDir, | 
|---|
|  |  |  | self.QueryCount, | 
|---|
|  |  |  | self.QueryTotalCount, | 
|---|
|  |  |  | self.QueryRemainlCount, | 
|---|
|  |  |  | self.AuctionItemCount, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | 
|---|
|  |  |  | AddTime = ""    #(char AddTime[19])//上架时间 yyyy-MM-dd hh:mm:ss | 
|---|
|  |  |  | BidderID = 0    #(DWORD BidderID)//竞拍玩家ID,也就是当前最高竞价玩家ID | 
|---|
|  |  |  | BidderPrice = 0    #(WORD BidderPrice)//竞拍玩家出价 | 
|---|
|  |  |  | BiddingTime = ""    #(char BiddingTime[19])//竞价时间 yyyy-MM-dd hh:mm:ss | 
|---|
|  |  |  | UserDataLen = 0    #(WORD UserDataLen) | 
|---|
|  |  |  | UserData = ""    #(String UserData)//自定义数据 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  | 
|---|
|  |  |  | self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) | 
|---|
|  |  |  | self.BidderID,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.BidderPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.BiddingTime,_pos = CommFunc.ReadString(_lpData, _pos,19) | 
|---|
|  |  |  | self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  | 
|---|
|  |  |  | self.AddTime = "" | 
|---|
|  |  |  | self.BidderID = 0 | 
|---|
|  |  |  | self.BidderPrice = 0 | 
|---|
|  |  |  | self.BiddingTime = "" | 
|---|
|  |  |  | self.UserDataLen = 0 | 
|---|
|  |  |  | self.UserData = "" | 
|---|
|  |  |  | return | 
|---|
|  |  |  | 
|---|
|  |  |  | length += 19 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += 19 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += len(self.UserData) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | data = CommFunc.WriteString(data, 19, self.AddTime) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.BidderID) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.BidderPrice) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, 19, self.BiddingTime) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.UserDataLen) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  | 
|---|
|  |  |  | AddTime:%s, | 
|---|
|  |  |  | BidderID:%d, | 
|---|
|  |  |  | BidderPrice:%d, | 
|---|
|  |  |  | BiddingTime:%s, | 
|---|
|  |  |  | UserDataLen:%d, | 
|---|
|  |  |  | UserData:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | 
|---|
|  |  |  | self.AddTime, | 
|---|
|  |  |  | self.BidderID, | 
|---|
|  |  |  | self.BidderPrice, | 
|---|
|  |  |  | self.BiddingTime, | 
|---|
|  |  |  | self.UserDataLen, | 
|---|
|  |  |  | self.UserData | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | 
|---|
|  |  |  | ItemCount = 0    #(WORD ItemCount) | 
|---|
|  |  |  | AddTime = ""    #(char AddTime[19])//上架时间 yyyy-MM-dd hh:mm:ss | 
|---|
|  |  |  | BidderPrice = 0    #(WORD BidderPrice)//竞拍玩家出价 | 
|---|
|  |  |  | BiddingTime = ""    #(char BiddingTime[19])//竞价时间 yyyy-MM-dd hh:mm:ss | 
|---|
|  |  |  | UserDataLen = 0    #(WORD UserDataLen) | 
|---|
|  |  |  | UserData = ""    #(String UserData)//自定义数据 | 
|---|
|  |  |  | FamilyPlayerIDLen = 0    #(WORD FamilyPlayerIDLen) | 
|---|
|  |  |  | 
|---|
|  |  |  | self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) | 
|---|
|  |  |  | self.BidderPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.BiddingTime,_pos = CommFunc.ReadString(_lpData, _pos,19) | 
|---|
|  |  |  | self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) | 
|---|
|  |  |  | self.FamilyPlayerIDLen,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | 
|---|
|  |  |  | self.ItemCount = 0 | 
|---|
|  |  |  | self.AddTime = "" | 
|---|
|  |  |  | self.BidderPrice = 0 | 
|---|
|  |  |  | self.BiddingTime = "" | 
|---|
|  |  |  | self.UserDataLen = 0 | 
|---|
|  |  |  | self.UserData = "" | 
|---|
|  |  |  | self.FamilyPlayerIDLen = 0 | 
|---|
|  |  |  | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += 19 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += 19 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += len(self.UserData) | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.ItemCount) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, 19, self.AddTime) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.BidderPrice) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, 19, self.BiddingTime) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.UserDataLen) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.FamilyPlayerIDLen) | 
|---|
|  |  |  | 
|---|
|  |  |  | ItemCount:%d, | 
|---|
|  |  |  | AddTime:%s, | 
|---|
|  |  |  | BidderPrice:%d, | 
|---|
|  |  |  | BiddingTime:%s, | 
|---|
|  |  |  | UserDataLen:%d, | 
|---|
|  |  |  | UserData:%s, | 
|---|
|  |  |  | FamilyPlayerIDLen:%d, | 
|---|
|  |  |  | 
|---|
|  |  |  | self.ItemCount, | 
|---|
|  |  |  | self.AddTime, | 
|---|
|  |  |  | self.BidderPrice, | 
|---|
|  |  |  | self.BiddingTime, | 
|---|
|  |  |  | self.UserDataLen, | 
|---|
|  |  |  | self.UserData, | 
|---|
|  |  |  | self.FamilyPlayerIDLen, | 
|---|
|  |  |  | 
|---|
|  |  |  | ItemCount = 0    #(WORD ItemCount) | 
|---|
|  |  |  | AddTime = ""    #(char AddTime[19])//上架时间 yyyy-MM-dd hh:mm:ss | 
|---|
|  |  |  | BidderPrice = 0    #(WORD BidderPrice)//竞拍玩家出价 | 
|---|
|  |  |  | BiddingTime = ""    #(char BiddingTime[19])//竞价时间 yyyy-MM-dd hh:mm:ss | 
|---|
|  |  |  | UserDataLen = 0    #(WORD UserDataLen) | 
|---|
|  |  |  | UserData = ""    #(String UserData)//自定义数据 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  | 
|---|
|  |  |  | self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) | 
|---|
|  |  |  | self.BidderPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.BiddingTime,_pos = CommFunc.ReadString(_lpData, _pos,19) | 
|---|
|  |  |  | self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  | 
|---|
|  |  |  | self.ItemCount = 0 | 
|---|
|  |  |  | self.AddTime = "" | 
|---|
|  |  |  | self.BidderPrice = 0 | 
|---|
|  |  |  | self.BiddingTime = "" | 
|---|
|  |  |  | self.UserDataLen = 0 | 
|---|
|  |  |  | self.UserData = "" | 
|---|
|  |  |  | return | 
|---|
|  |  |  | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += 19 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += 19 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += len(self.UserData) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.ItemCount) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, 19, self.AddTime) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.BidderPrice) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, 19, self.BiddingTime) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.UserDataLen) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  | 
|---|
|  |  |  | ItemCount:%d, | 
|---|
|  |  |  | AddTime:%s, | 
|---|
|  |  |  | BidderPrice:%d, | 
|---|
|  |  |  | BiddingTime:%s, | 
|---|
|  |  |  | UserDataLen:%d, | 
|---|
|  |  |  | UserData:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | 
|---|
|  |  |  | self.ItemCount, | 
|---|
|  |  |  | self.AddTime, | 
|---|
|  |  |  | self.BidderPrice, | 
|---|
|  |  |  | self.BiddingTime, | 
|---|
|  |  |  | self.UserDataLen, | 
|---|
|  |  |  | self.UserData | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # B5 08 拍卖行刷新拍品 #tagGCRefreshAuctionItem | 
|---|
|  |  |  | # B5 08 拍卖行刷新拍品 #tagGCRefreshAuctionItemInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagGCRefreshAuctionItem(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | ItemGUID = ""    #(char ItemGUID[40]) | 
|---|
|  |  |  | AuctionType = 0    #(BYTE AuctionType)//拍品类型,0-全服拍品,1-仙盟拍品 | 
|---|
|  |  |  | AddTime = ""    #(char AddTime[19])//上架时间 | 
|---|
|  |  |  | BidderID = 0    #(DWORD BidderID)//最高竞拍玩家ID,也就是当前最高竞价玩家ID | 
|---|
|  |  |  | BidderPrice = 0    #(DWORD BidderPrice)//最高竞拍价格 | 
|---|
|  |  |  | BiddingTime = ""    #(char BiddingTime[19])//竞价时间 yyyy-MM-dd hh:mm:ss | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) | 
|---|
|  |  |  | self.AuctionType,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) | 
|---|
|  |  |  | self.BidderID,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.BidderPrice,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.BiddingTime,_pos = CommFunc.ReadString(_lpData, _pos,19) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.ItemGUID = "" | 
|---|
|  |  |  | self.AuctionType = 0 | 
|---|
|  |  |  | self.AddTime = "" | 
|---|
|  |  |  | self.BidderID = 0 | 
|---|
|  |  |  | self.BidderPrice = 0 | 
|---|
|  |  |  | self.BiddingTime = "" | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += 40 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 19 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 19 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteString(data, 40, self.ItemGUID) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.AuctionType) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, 19, self.AddTime) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.BidderID) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.BidderPrice) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, 19, self.BiddingTime) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | ItemGUID:%s, | 
|---|
|  |  |  | AuctionType:%d, | 
|---|
|  |  |  | AddTime:%s, | 
|---|
|  |  |  | BidderID:%d, | 
|---|
|  |  |  | BidderPrice:%d, | 
|---|
|  |  |  | BiddingTime:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.ItemGUID, | 
|---|
|  |  |  | self.AuctionType, | 
|---|
|  |  |  | self.AddTime, | 
|---|
|  |  |  | self.BidderID, | 
|---|
|  |  |  | self.BidderPrice, | 
|---|
|  |  |  | self.BiddingTime | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagGCRefreshAuctionItemInfo(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | RefreshCount = 0    #(BYTE RefreshCount) | 
|---|
|  |  |  | RefreshAuctionItemList = list()    #(vector<tagGCRefreshAuctionItem> RefreshAuctionItemList) | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) | 
|---|
|  |  |  | self.AuctionType,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) | 
|---|
|  |  |  | self.BidderID,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.BidderPrice,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.RefreshCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.RefreshCount): | 
|---|
|  |  |  | temRefreshAuctionItemList = tagGCRefreshAuctionItem() | 
|---|
|  |  |  | _pos = temRefreshAuctionItemList.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.RefreshAuctionItemList.append(temRefreshAuctionItemList) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xB5 | 
|---|
|  |  |  | self.Head.SubCmd = 0x08 | 
|---|
|  |  |  | self.ItemGUID = "" | 
|---|
|  |  |  | self.AuctionType = 0 | 
|---|
|  |  |  | self.AddTime = "" | 
|---|
|  |  |  | self.BidderID = 0 | 
|---|
|  |  |  | self.BidderPrice = 0 | 
|---|
|  |  |  | self.RefreshCount = 0 | 
|---|
|  |  |  | self.RefreshAuctionItemList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 40 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 19 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | for i in range(self.RefreshCount): | 
|---|
|  |  |  | length += self.RefreshAuctionItemList[i].GetLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, 40, self.ItemGUID) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.AuctionType) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, 19, self.AddTime) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.BidderID) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.BidderPrice) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.RefreshCount) | 
|---|
|  |  |  | for i in range(self.RefreshCount): | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.RefreshAuctionItemList[i].GetLength(), self.RefreshAuctionItemList[i].GetBuffer()) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | ItemGUID:%s, | 
|---|
|  |  |  | AuctionType:%d, | 
|---|
|  |  |  | AddTime:%s, | 
|---|
|  |  |  | BidderID:%d, | 
|---|
|  |  |  | BidderPrice:%d | 
|---|
|  |  |  | RefreshCount:%d, | 
|---|
|  |  |  | RefreshAuctionItemList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.ItemGUID, | 
|---|
|  |  |  | self.AuctionType, | 
|---|
|  |  |  | self.AddTime, | 
|---|
|  |  |  | self.BidderID, | 
|---|
|  |  |  | self.BidderPrice | 
|---|
|  |  |  | self.RefreshCount, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagGCRefreshAuctionItem=tagGCRefreshAuctionItem() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCRefreshAuctionItem.Head.Cmd,m_NAtagGCRefreshAuctionItem.Head.SubCmd))] = m_NAtagGCRefreshAuctionItem | 
|---|
|  |  |  | m_NAtagGCRefreshAuctionItemInfo=tagGCRefreshAuctionItemInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCRefreshAuctionItemInfo.Head.Cmd,m_NAtagGCRefreshAuctionItemInfo.Head.SubCmd))] = m_NAtagGCRefreshAuctionItemInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("ItemID", c_int),    #果实物品ID | 
|---|
|  |  |  | ("EatCnt", c_ushort),    #已使用个数 | 
|---|
|  |  |  | ("AddItemCnt", c_int),    #增幅丹使用个数 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.ItemID = 0 | 
|---|
|  |  |  | self.EatCnt = 0 | 
|---|
|  |  |  | self.AddItemCnt = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// A3 39 玩家属性果实已使用个数信息//tagMCAttrFruitEatCntList: | 
|---|
|  |  |  | ItemID:%d, | 
|---|
|  |  |  | EatCnt:%d | 
|---|
|  |  |  | EatCnt:%d, | 
|---|
|  |  |  | AddItemCnt:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.ItemID, | 
|---|
|  |  |  | self.EatCnt | 
|---|
|  |  |  | self.EatCnt, | 
|---|
|  |  |  | self.AddItemCnt | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("ActionID", c_int),    # ID | 
|---|
|  |  |  | ("DayFinishCnt", c_ushort),    # 今日已完成次数 | 
|---|
|  |  |  | ("DayBuyTimes", c_ubyte),    # 今日购买次数 | 
|---|
|  |  |  | ("DayItemTimes", c_ubyte),    # 今日物品增加次数 | 
|---|
|  |  |  | ("WeekFinishCnt", c_int),    # 本周已完成次数 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.ActionID = 0 | 
|---|
|  |  |  | self.DayFinishCnt = 0 | 
|---|
|  |  |  | self.DayBuyTimes = 0 | 
|---|
|  |  |  | self.DayItemTimes = 0 | 
|---|
|  |  |  | self.WeekFinishCnt = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | DumpString = '''// A3 15 日常活动次数通知 //tagMCDailyActionCnt: | 
|---|
|  |  |  | ActionID:%d, | 
|---|
|  |  |  | DayFinishCnt:%d, | 
|---|
|  |  |  | DayBuyTimes:%d, | 
|---|
|  |  |  | DayItemTimes:%d, | 
|---|
|  |  |  | WeekFinishCnt:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.ActionID, | 
|---|
|  |  |  | self.DayFinishCnt, | 
|---|
|  |  |  | self.DayBuyTimes, | 
|---|
|  |  |  | self.DayItemTimes, | 
|---|
|  |  |  | self.WeekFinishCnt | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A3 09 通知玩家部位套装等级 #tagMCEquipPartSuiteLVInfo | 
|---|
|  |  |  | # A3 B1 装备部位星数信息 #tagMCEquipPartStarInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCEquipPartSuiteLV(Structure): | 
|---|
|  |  |  | EquipIndex = 0    #(BYTE EquipIndex) | 
|---|
|  |  |  | Len = 0    #(WORD Len)//长度 | 
|---|
|  |  |  | SuiteLVInfo = ""    #(String SuiteLVInfo)//{套装类型:等级} | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  | class  tagMCEquipPartStar(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("EquipPackIndex", c_ushort), | 
|---|
|  |  |  | ("Star", c_ubyte), | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | def ReadData(self, stringData, _pos=0, _len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.EquipIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.Len,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.SuiteLVInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.Len) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  | memmove(addressof(self), stringData[_pos:], self.GetLength()) | 
|---|
|  |  |  | return _pos + self.GetLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.EquipIndex = 0 | 
|---|
|  |  |  | self.Len = 0 | 
|---|
|  |  |  | self.SuiteLVInfo = "" | 
|---|
|  |  |  | self.EquipPackIndex = 0 | 
|---|
|  |  |  | self.Star = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += len(self.SuiteLVInfo) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  | return sizeof(tagMCEquipPartStar) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.EquipIndex) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.Len) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Len, self.SuiteLVInfo) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | EquipIndex:%d, | 
|---|
|  |  |  | Len:%d, | 
|---|
|  |  |  | SuiteLVInfo:%s | 
|---|
|  |  |  | DumpString = '''// A3 B1 装备部位星数信息 //tagMCEquipPartStarInfo: | 
|---|
|  |  |  | EquipPackIndex:%d, | 
|---|
|  |  |  | Star:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.EquipIndex, | 
|---|
|  |  |  | self.Len, | 
|---|
|  |  |  | self.SuiteLVInfo | 
|---|
|  |  |  | self.EquipPackIndex, | 
|---|
|  |  |  | self.Star | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCEquipPartSuiteLVInfo(Structure): | 
|---|
|  |  |  | class  tagMCEquipPartStarInfo(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | Count = 0    #(BYTE Count)// 信息个数 | 
|---|
|  |  |  | InfoList = list()    #(vector<tagMCEquipPartSuiteLV> InfoList)// 信息列表 | 
|---|
|  |  |  | InfoList = list()    #(vector<tagMCEquipPartStar> InfoList)// 信息列表 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA3 | 
|---|
|  |  |  | self.Head.SubCmd = 0x09 | 
|---|
|  |  |  | self.Head.SubCmd = 0xB1 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.Count): | 
|---|
|  |  |  | temInfoList = tagMCEquipPartSuiteLV() | 
|---|
|  |  |  | temInfoList = tagMCEquipPartStar() | 
|---|
|  |  |  | _pos = temInfoList.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.InfoList.append(temInfoList) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA3 | 
|---|
|  |  |  | self.Head.SubCmd = 0x09 | 
|---|
|  |  |  | self.Head.SubCmd = 0xB1 | 
|---|
|  |  |  | self.Count = 0 | 
|---|
|  |  |  | self.InfoList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCEquipPartSuiteLVInfo=tagMCEquipPartSuiteLVInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipPartSuiteLVInfo.Head.Cmd,m_NAtagMCEquipPartSuiteLVInfo.Head.SubCmd))] = m_NAtagMCEquipPartSuiteLVInfo | 
|---|
|  |  |  | m_NAtagMCEquipPartStarInfo=tagMCEquipPartStarInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipPartStarInfo.Head.Cmd,m_NAtagMCEquipPartStarInfo.Head.SubCmd))] = m_NAtagMCEquipPartStarInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCEquipPartXLAttrInfo=tagMCEquipPartXLAttrInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipPartXLAttrInfo.Head.Cmd,m_NAtagMCEquipPartXLAttrInfo.Head.SubCmd))] = m_NAtagMCEquipPartXLAttrInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A3 07 缥缈奇遇信息 #tagMCFairyAdventuresInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCFairyAdventuresData(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("EventID", c_ubyte), | 
|---|
|  |  |  | ("Gear", c_ubyte),    #第几档 | 
|---|
|  |  |  | ("Condition", c_int),    #条件 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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.EventID = 0 | 
|---|
|  |  |  | self.Gear = 0 | 
|---|
|  |  |  | self.Condition = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCFairyAdventuresData) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// A3 07 缥缈奇遇信息 //tagMCFairyAdventuresInfo: | 
|---|
|  |  |  | EventID:%d, | 
|---|
|  |  |  | Gear:%d, | 
|---|
|  |  |  | Condition:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.EventID, | 
|---|
|  |  |  | self.Gear, | 
|---|
|  |  |  | self.Condition | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCFairyAdventuresInfo(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | Cnt = 0    #(BYTE Cnt) | 
|---|
|  |  |  | InfoList = list()    #(vector<tagMCFairyAdventuresData> InfoList)// 信息 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA3 | 
|---|
|  |  |  | self.Head.SubCmd = 0x07 | 
|---|
|  |  |  | 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 = tagMCFairyAdventuresData() | 
|---|
|  |  |  | _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 = 0x07 | 
|---|
|  |  |  | 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_NAtagMCFairyAdventuresInfo=tagMCFairyAdventuresInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFairyAdventuresInfo.Head.Cmd,m_NAtagMCFairyAdventuresInfo.Head.SubCmd))] = m_NAtagMCFairyAdventuresInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A3 06 缥缈仙域信息 #tagMCFairyDomainInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCFairyDomainEvent(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("EventID", c_ushort),    #事件ID | 
|---|
|  |  |  | ("EventState", c_ubyte),    #事件状态 1-可拜访 2-拜访中 3-已拜访 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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.EventID = 0 | 
|---|
|  |  |  | self.EventState = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCFairyDomainEvent) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// A3 06 缥缈仙域信息 //tagMCFairyDomainInfo: | 
|---|
|  |  |  | EventID:%d, | 
|---|
|  |  |  | EventState:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.EventID, | 
|---|
|  |  |  | self.EventState | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCFairyDomainInfo(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | IsAll = 0    #(BYTE IsAll)//是否全部 | 
|---|
|  |  |  | State = 0    #(BYTE State)//0-未寻访 1-寻访中 2-任务标记可寻访 | 
|---|
|  |  |  | VisitCnt = 0    #(DWORD VisitCnt)//寻访次数 | 
|---|
|  |  |  | Energy = 0    #(WORD Energy)//体力 | 
|---|
|  |  |  | Count = 0    #(BYTE Count)// 信息个数 | 
|---|
|  |  |  | InfoList = list()    #(vector<tagMCFairyDomainEvent> InfoList)// 信息列表 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA3 | 
|---|
|  |  |  | self.Head.SubCmd = 0x06 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.IsAll,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.State,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.VisitCnt,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.Energy,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.Count): | 
|---|
|  |  |  | temInfoList = tagMCFairyDomainEvent() | 
|---|
|  |  |  | _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 = 0x06 | 
|---|
|  |  |  | self.IsAll = 0 | 
|---|
|  |  |  | self.State = 0 | 
|---|
|  |  |  | self.VisitCnt = 0 | 
|---|
|  |  |  | self.Energy = 0 | 
|---|
|  |  |  | self.Count = 0 | 
|---|
|  |  |  | self.InfoList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | for i in range(self.Count): | 
|---|
|  |  |  | 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.IsAll) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.State) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.VisitCnt) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.Energy) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.Count) | 
|---|
|  |  |  | for i in range(self.Count): | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer()) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | IsAll:%d, | 
|---|
|  |  |  | State:%d, | 
|---|
|  |  |  | VisitCnt:%d, | 
|---|
|  |  |  | Energy:%d, | 
|---|
|  |  |  | Count:%d, | 
|---|
|  |  |  | InfoList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.IsAll, | 
|---|
|  |  |  | self.State, | 
|---|
|  |  |  | self.VisitCnt, | 
|---|
|  |  |  | self.Energy, | 
|---|
|  |  |  | self.Count, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCFairyDomainInfo=tagMCFairyDomainInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFairyDomainInfo.Head.Cmd,m_NAtagMCFairyDomainInfo.Head.SubCmd))] = m_NAtagMCFairyDomainInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A3 12 通知玩家法宝信息 #tagMCMagicWeaponData | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCMagicWeaponData(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | Num = 0    #(BYTE Num)//个数 | 
|---|
|  |  |  | MagicWeaponID = list()    #(vector<DWORD> MagicWeaponID)// 已激活的法宝ID列表 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA3 | 
|---|
|  |  |  | self.Head.SubCmd = 0x12 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.Num,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.Num): | 
|---|
|  |  |  | value,_pos=CommFunc.ReadDWORD(_lpData,_pos) | 
|---|
|  |  |  | self.MagicWeaponID.append(value) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA3 | 
|---|
|  |  |  | self.Head.SubCmd = 0x12 | 
|---|
|  |  |  | self.Num = 0 | 
|---|
|  |  |  | self.MagicWeaponID = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 4 * self.Num | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.Num) | 
|---|
|  |  |  | for i in range(self.Num): | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.MagicWeaponID[i]) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | Num:%d, | 
|---|
|  |  |  | MagicWeaponID:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.Num, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCMagicWeaponData=tagMCMagicWeaponData() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMagicWeaponData.Head.Cmd,m_NAtagMCMagicWeaponData.Head.SubCmd))] = m_NAtagMCMagicWeaponData | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A3 52 法宝等级信息 #tagMCMagicWeaponLVInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCMagicWeaponInfo(Structure): | 
|---|
|  |  |  | 
|---|
|  |  |  | ("MWID", c_int), | 
|---|
|  |  |  | ("LV", c_ubyte), | 
|---|
|  |  |  | ("Exp", c_int), | 
|---|
|  |  |  | ("State", c_ubyte),    #是否点击法宝认主 | 
|---|
|  |  |  | ("FBPassLV", c_ubyte),    #副本关卡 | 
|---|
|  |  |  | ("IsWear", c_ubyte),    #是否佩戴(仅适用王者法宝) | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | 
|---|
|  |  |  | self.MWID = 0 | 
|---|
|  |  |  | self.LV = 0 | 
|---|
|  |  |  | self.Exp = 0 | 
|---|
|  |  |  | self.State = 0 | 
|---|
|  |  |  | self.FBPassLV = 0 | 
|---|
|  |  |  | self.IsWear = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  | 
|---|
|  |  |  | MWID:%d, | 
|---|
|  |  |  | LV:%d, | 
|---|
|  |  |  | Exp:%d, | 
|---|
|  |  |  | State:%d, | 
|---|
|  |  |  | FBPassLV:%d, | 
|---|
|  |  |  | IsWear:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | 
|---|
|  |  |  | self.MWID, | 
|---|
|  |  |  | self.LV, | 
|---|
|  |  |  | self.Exp, | 
|---|
|  |  |  | self.State, | 
|---|
|  |  |  | self.FBPassLV, | 
|---|
|  |  |  | self.IsWear | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A3 B3 装备部位星级信息 #tagMCEquipPartStarLVInfo | 
|---|
|  |  |  | # A3 B3 装备部位强化信息 #tagMCEquipPartPlusInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCEquipPartStarLV(Structure): | 
|---|
|  |  |  | class  tagMCEquipPartPlusLV(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("PackType", c_ubyte), | 
|---|
|  |  |  | ("EquipIndex", c_ubyte), | 
|---|
|  |  |  | ("EquipPartStarLV", c_ushort), | 
|---|
|  |  |  | ("Proficiency", c_int), | 
|---|
|  |  |  | ("EvolveLV", c_ubyte), | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | 
|---|
|  |  |  | self.EquipIndex = 0 | 
|---|
|  |  |  | self.EquipPartStarLV = 0 | 
|---|
|  |  |  | self.Proficiency = 0 | 
|---|
|  |  |  | self.EvolveLV = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCEquipPartStarLV) | 
|---|
|  |  |  | return sizeof(tagMCEquipPartPlusLV) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// A3 B3 装备部位星级信息 //tagMCEquipPartStarLVInfo: | 
|---|
|  |  |  | DumpString = '''// A3 B3 装备部位强化信息 //tagMCEquipPartPlusInfo: | 
|---|
|  |  |  | PackType:%d, | 
|---|
|  |  |  | EquipIndex:%d, | 
|---|
|  |  |  | EquipPartStarLV:%d, | 
|---|
|  |  |  | Proficiency:%d | 
|---|
|  |  |  | Proficiency:%d, | 
|---|
|  |  |  | EvolveLV:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.PackType, | 
|---|
|  |  |  | self.EquipIndex, | 
|---|
|  |  |  | self.EquipPartStarLV, | 
|---|
|  |  |  | self.Proficiency | 
|---|
|  |  |  | self.Proficiency, | 
|---|
|  |  |  | self.EvolveLV | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCEquipPartStarLVInfo(Structure): | 
|---|
|  |  |  | class  tagMCEquipPartPlusInfo(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | Count = 0    #(BYTE Count)// 信息个数 | 
|---|
|  |  |  | InfoList = list()    #(vector<tagMCEquipPartStarLV> InfoList)// 信息列表 | 
|---|
|  |  |  | InfoList = list()    #(vector<tagMCEquipPartPlusLV> InfoList)// 信息列表 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.Count): | 
|---|
|  |  |  | temInfoList = tagMCEquipPartStarLV() | 
|---|
|  |  |  | temInfoList = tagMCEquipPartPlusLV() | 
|---|
|  |  |  | _pos = temInfoList.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.InfoList.append(temInfoList) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCEquipPartStarLVInfo=tagMCEquipPartStarLVInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipPartStarLVInfo.Head.Cmd,m_NAtagMCEquipPartStarLVInfo.Head.SubCmd))] = m_NAtagMCEquipPartStarLVInfo | 
|---|
|  |  |  | m_NAtagMCEquipPartPlusInfo=tagMCEquipPartPlusInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEquipPartPlusInfo.Head.Cmd,m_NAtagMCEquipPartPlusInfo.Head.SubCmd))] = m_NAtagMCEquipPartPlusInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A3 53 法宝特权数据 #tagMCMWPrivilegeDataInfo | 
|---|
|  |  |  | # A3 25 NPC已攻击次数信息 #tagMCNPCAttackCountInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCMWPrivilegeData(Structure): | 
|---|
|  |  |  | class  tagMCNPCAttackCount(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("PriID", c_int),    # 特权ID | 
|---|
|  |  |  | ("State", c_ubyte),    #激活状态 | 
|---|
|  |  |  | ("CurValue", c_int),    #当前总进度 | 
|---|
|  |  |  | ("GotValue", c_int),    #已领取进度 | 
|---|
|  |  |  | ("ItemAwardState", c_ubyte),    #物品奖励是否已领取 | 
|---|
|  |  |  | ("NPCID", c_int), | 
|---|
|  |  |  | ("AttackCount", c_ubyte),    #已攻击次数 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | 
|---|
|  |  |  | return _pos + self.GetLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.PriID = 0 | 
|---|
|  |  |  | self.State = 0 | 
|---|
|  |  |  | self.CurValue = 0 | 
|---|
|  |  |  | self.GotValue = 0 | 
|---|
|  |  |  | self.ItemAwardState = 0 | 
|---|
|  |  |  | self.NPCID = 0 | 
|---|
|  |  |  | self.AttackCount = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCMWPrivilegeData) | 
|---|
|  |  |  | return sizeof(tagMCNPCAttackCount) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// A3 53 法宝特权数据 //tagMCMWPrivilegeDataInfo: | 
|---|
|  |  |  | PriID:%d, | 
|---|
|  |  |  | State:%d, | 
|---|
|  |  |  | CurValue:%d, | 
|---|
|  |  |  | GotValue:%d, | 
|---|
|  |  |  | ItemAwardState:%d | 
|---|
|  |  |  | DumpString = '''// A3 25 NPC已攻击次数信息 //tagMCNPCAttackCountInfo: | 
|---|
|  |  |  | NPCID:%d, | 
|---|
|  |  |  | AttackCount:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.PriID, | 
|---|
|  |  |  | self.State, | 
|---|
|  |  |  | self.CurValue, | 
|---|
|  |  |  | self.GotValue, | 
|---|
|  |  |  | self.ItemAwardState | 
|---|
|  |  |  | self.NPCID, | 
|---|
|  |  |  | self.AttackCount | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCMWPrivilegeDataInfo(Structure): | 
|---|
|  |  |  | class  tagMCNPCAttackCountInfo(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | Count = 0    #(BYTE Count)// 信息个数 | 
|---|
|  |  |  | InfoList = list()    #(vector<tagMCMWPrivilegeData> InfoList)// 信息列表 | 
|---|
|  |  |  | Count = 0    #(BYTE Count) | 
|---|
|  |  |  | NPCAttackCountList = list()    #(vector<tagMCNPCAttackCount> NPCAttackCountList) | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA3 | 
|---|
|  |  |  | self.Head.SubCmd = 0x53 | 
|---|
|  |  |  | self.Head.SubCmd = 0x25 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.Count): | 
|---|
|  |  |  | temInfoList = tagMCMWPrivilegeData() | 
|---|
|  |  |  | _pos = temInfoList.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.InfoList.append(temInfoList) | 
|---|
|  |  |  | temNPCAttackCountList = tagMCNPCAttackCount() | 
|---|
|  |  |  | _pos = temNPCAttackCountList.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.NPCAttackCountList.append(temNPCAttackCountList) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA3 | 
|---|
|  |  |  | self.Head.SubCmd = 0x53 | 
|---|
|  |  |  | self.Head.SubCmd = 0x25 | 
|---|
|  |  |  | self.Count = 0 | 
|---|
|  |  |  | self.InfoList = list() | 
|---|
|  |  |  | self.NPCAttackCountList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | for i in range(self.Count): | 
|---|
|  |  |  | length += self.InfoList[i].GetLength() | 
|---|
|  |  |  | length += self.NPCAttackCountList[i].GetLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.Count) | 
|---|
|  |  |  | for i in range(self.Count): | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.NPCAttackCountList[i].GetLength(), self.NPCAttackCountList[i].GetBuffer()) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | Count:%d, | 
|---|
|  |  |  | InfoList:%s | 
|---|
|  |  |  | NPCAttackCountList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCMWPrivilegeDataInfo=tagMCMWPrivilegeDataInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMWPrivilegeDataInfo.Head.Cmd,m_NAtagMCMWPrivilegeDataInfo.Head.SubCmd))] = m_NAtagMCMWPrivilegeDataInfo | 
|---|
|  |  |  | m_NAtagMCNPCAttackCountInfo=tagMCNPCAttackCountInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNPCAttackCountInfo.Head.Cmd,m_NAtagMCNPCAttackCountInfo.Head.SubCmd))] = m_NAtagMCNPCAttackCountInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A3 BF 通知客户端炼丹炉信息 #tagMCPlayerStoveMsg | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCPlayerStoveMsg(Structure): | 
|---|
|  |  |  | class  tagMCPlayerStoveInfo(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("StoveLV", c_ubyte),    # 炼丹炉等级 | 
|---|
|  |  |  | ("StoveExp", c_int),    # 炼丹炉经验 | 
|---|
|  |  |  | ("ItemID", c_int),    # 合成物品id | 
|---|
|  |  |  | ("AlchemyID", c_int),    # 丹 ID | 
|---|
|  |  |  | ("StartTime", c_int),    # 开始炼的时间 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xA3 | 
|---|
|  |  |  | self.SubCmd = 0xBF | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, stringData, _pos=0, _len=0): | 
|---|
|  |  |  | 
|---|
|  |  |  | return _pos + self.GetLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Cmd = 0xA3 | 
|---|
|  |  |  | self.SubCmd = 0xBF | 
|---|
|  |  |  | self.StoveLV = 0 | 
|---|
|  |  |  | self.StoveExp = 0 | 
|---|
|  |  |  | self.ItemID = 0 | 
|---|
|  |  |  | self.AlchemyID = 0 | 
|---|
|  |  |  | self.StartTime = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCPlayerStoveMsg) | 
|---|
|  |  |  | return sizeof(tagMCPlayerStoveInfo) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// A3 BF 通知客户端炼丹炉信息 //tagMCPlayerStoveMsg: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | StoveLV:%d, | 
|---|
|  |  |  | StoveExp:%d, | 
|---|
|  |  |  | ItemID:%d | 
|---|
|  |  |  | AlchemyID:%d, | 
|---|
|  |  |  | StartTime:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.AlchemyID, | 
|---|
|  |  |  | self.StartTime | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCPlayerStoveMsg(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | StoveLV = 0    #(BYTE StoveLV)// 炼丹炉等级 | 
|---|
|  |  |  | StoveExp = 0    #(DWORD StoveExp)// 炼丹炉经验 | 
|---|
|  |  |  | ItemID = 0    #(DWORD ItemID)// 合成物品id | 
|---|
|  |  |  | ItemCnt = 0    #(BYTE ItemCnt)// 丹药数量 | 
|---|
|  |  |  | StoveCnt = 0    #(WORD StoveCnt)// 丹药数量 | 
|---|
|  |  |  | InfoList = list()    #(vector<tagMCPlayerStoveInfo> InfoList) | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA3 | 
|---|
|  |  |  | self.Head.SubCmd = 0xBF | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.StoveLV,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.StoveExp,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.ItemCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.StoveCnt,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.StoveCnt): | 
|---|
|  |  |  | temInfoList = tagMCPlayerStoveInfo() | 
|---|
|  |  |  | _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 = 0xBF | 
|---|
|  |  |  | self.StoveLV = 0 | 
|---|
|  |  |  | self.StoveExp = 0 | 
|---|
|  |  |  | self.ItemID = 0 | 
|---|
|  |  |  | self.ItemCnt = 0 | 
|---|
|  |  |  | self.StoveCnt = 0 | 
|---|
|  |  |  | self.InfoList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | for i in range(self.StoveCnt): | 
|---|
|  |  |  | 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.StoveLV) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.StoveExp) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.ItemID) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.ItemCnt) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.StoveCnt) | 
|---|
|  |  |  | for i in range(self.StoveCnt): | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer()) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | StoveLV:%d, | 
|---|
|  |  |  | StoveExp:%d, | 
|---|
|  |  |  | ItemID:%d, | 
|---|
|  |  |  | ItemCnt:%d, | 
|---|
|  |  |  | StoveCnt:%d, | 
|---|
|  |  |  | InfoList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.StoveLV, | 
|---|
|  |  |  | self.StoveExp, | 
|---|
|  |  |  | self.ItemID | 
|---|
|  |  |  | self.ItemID, | 
|---|
|  |  |  | self.ItemCnt, | 
|---|
|  |  |  | self.StoveCnt, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCPlayerStoveMsg=tagMCPlayerStoveMsg() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPlayerStoveMsg.Cmd,m_NAtagMCPlayerStoveMsg.SubCmd))] = m_NAtagMCPlayerStoveMsg | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPlayerStoveMsg.Head.Cmd,m_NAtagMCPlayerStoveMsg.Head.SubCmd))] = m_NAtagMCPlayerStoveMsg | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCPrayElixirResult=tagMCPrayElixirResult() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCPrayElixirResult.Cmd,m_NAtagMCPrayElixirResult.SubCmd))] = m_NAtagMCPrayElixirResult | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A3 27 境界修为池信息 #tagMCRealmExpInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCRealmExpInfo(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("BeginTime", c_int),    #开始计时时间 | 
|---|
|  |  |  | ("BuffTime", c_int),    #buff剩余时间 | 
|---|
|  |  |  | ("BuffAddRate", c_int),    #buff加成万分率 | 
|---|
|  |  |  | ("CurExp", c_int),    #当前总经验 | 
|---|
|  |  |  | ("CurExpPoint", c_int),    #当前总经验点 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xA3 | 
|---|
|  |  |  | self.SubCmd = 0x27 | 
|---|
|  |  |  | 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 = 0x27 | 
|---|
|  |  |  | self.BeginTime = 0 | 
|---|
|  |  |  | self.BuffTime = 0 | 
|---|
|  |  |  | self.BuffAddRate = 0 | 
|---|
|  |  |  | self.CurExp = 0 | 
|---|
|  |  |  | self.CurExpPoint = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCRealmExpInfo) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// A3 27 境界修为池信息 //tagMCRealmExpInfo: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | BeginTime:%d, | 
|---|
|  |  |  | BuffTime:%d, | 
|---|
|  |  |  | BuffAddRate:%d, | 
|---|
|  |  |  | CurExp:%d, | 
|---|
|  |  |  | CurExpPoint:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.BeginTime, | 
|---|
|  |  |  | self.BuffTime, | 
|---|
|  |  |  | self.BuffAddRate, | 
|---|
|  |  |  | self.CurExp, | 
|---|
|  |  |  | self.CurExpPoint | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCRealmExpInfo=tagMCRealmExpInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRealmExpInfo.Cmd,m_NAtagMCRealmExpInfo.SubCmd))] = m_NAtagMCRealmExpInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCSingleGoldGift=tagMCSingleGoldGift() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSingleGoldGift.Cmd,m_NAtagMCSingleGoldGift.SubCmd))] = m_NAtagMCSingleGoldGift | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A3 09 技能五行专精信息 #tagMCSkillElementInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCSkillElementActiveData(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("SkillID", c_int),    # 技能ID | 
|---|
|  |  |  | ("ActiveLV", c_ubyte),    # 激活等级 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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.SkillID = 0 | 
|---|
|  |  |  | self.ActiveLV = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | 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, | 
|---|
|  |  |  | SkillCnt:%d, | 
|---|
|  |  |  | ActiveSkill:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.MainSkillID, | 
|---|
|  |  |  | self.ElementSkillID, | 
|---|
|  |  |  | self.SkillCnt, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | 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 11 通知玩家境界渡劫是否开启 #tagMCSyncRealmFBIsOpen | 
|---|
|  |  |  | # A3 11 通知玩家境界信息 #tagMCSyncRealmInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCSyncRealmFBIsOpen(Structure): | 
|---|
|  |  |  | class  tagMCSyncRealmInfo(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("IsOpen", c_ubyte),    #是否开启 | 
|---|
|  |  |  | ("SitAllTime", c_ushort),    #打坐总时间秒 | 
|---|
|  |  |  | ("SitRemainTime", c_int),    #开始打坐前剩余时间秒 | 
|---|
|  |  |  | ("SitStartTime", c_int),    #开始打坐时间 | 
|---|
|  |  |  | ("LastEnterTime", c_int),    #上次进入渡劫副本时间 | 
|---|
|  |  |  | ("IsPass", c_ubyte),    #是否通关副本 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Cmd = 0xA3 | 
|---|
|  |  |  | self.SubCmd = 0x11 | 
|---|
|  |  |  | self.IsOpen = 0 | 
|---|
|  |  |  | self.SitAllTime = 0 | 
|---|
|  |  |  | self.SitRemainTime = 0 | 
|---|
|  |  |  | self.SitStartTime = 0 | 
|---|
|  |  |  | self.LastEnterTime = 0 | 
|---|
|  |  |  | self.IsPass = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCSyncRealmFBIsOpen) | 
|---|
|  |  |  | return sizeof(tagMCSyncRealmInfo) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// A3 11 通知玩家境界渡劫是否开启 //tagMCSyncRealmFBIsOpen: | 
|---|
|  |  |  | DumpString = '''// A3 11 通知玩家境界信息 //tagMCSyncRealmInfo: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | IsOpen:%d, | 
|---|
|  |  |  | SitAllTime:%d, | 
|---|
|  |  |  | SitRemainTime:%d, | 
|---|
|  |  |  | SitStartTime:%d, | 
|---|
|  |  |  | LastEnterTime:%d | 
|---|
|  |  |  | IsPass:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.IsOpen, | 
|---|
|  |  |  | self.SitAllTime, | 
|---|
|  |  |  | self.SitRemainTime, | 
|---|
|  |  |  | self.SitStartTime, | 
|---|
|  |  |  | self.LastEnterTime | 
|---|
|  |  |  | self.IsPass | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCSyncRealmFBIsOpen=tagMCSyncRealmFBIsOpen() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSyncRealmFBIsOpen.Cmd,m_NAtagMCSyncRealmFBIsOpen.SubCmd))] = m_NAtagMCSyncRealmFBIsOpen | 
|---|
|  |  |  | m_NAtagMCSyncRealmInfo=tagMCSyncRealmInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSyncRealmInfo.Cmd,m_NAtagMCSyncRealmInfo.SubCmd))] = m_NAtagMCSyncRealmInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | #A5 34 天梯竞技场状态#tagMCHighLadderState | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCHighLadderState(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("Count", c_ubyte),    #已挑战次数 | 
|---|
|  |  |  | ("MaxCount", c_ubyte),    #最大次数 | 
|---|
|  |  |  | ("CDTime", c_int),    #累计冷却时间 | 
|---|
|  |  |  | ("IsRelCD", c_ubyte),    #是否正在真实冷却状态 | 
|---|
|  |  |  | ("Currency", c_int),    #积分 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xA5 | 
|---|
|  |  |  | self.SubCmd = 0x34 | 
|---|
|  |  |  | 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 = 0xA5 | 
|---|
|  |  |  | self.SubCmd = 0x34 | 
|---|
|  |  |  | self.Count = 0 | 
|---|
|  |  |  | self.MaxCount = 0 | 
|---|
|  |  |  | self.CDTime = 0 | 
|---|
|  |  |  | self.IsRelCD = 0 | 
|---|
|  |  |  | self.Currency = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCHighLadderState) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''//A5 34 天梯竞技场状态//tagMCHighLadderState: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | Count:%d, | 
|---|
|  |  |  | MaxCount:%d, | 
|---|
|  |  |  | CDTime:%d, | 
|---|
|  |  |  | IsRelCD:%d, | 
|---|
|  |  |  | Currency:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.Count, | 
|---|
|  |  |  | self.MaxCount, | 
|---|
|  |  |  | self.CDTime, | 
|---|
|  |  |  | self.IsRelCD, | 
|---|
|  |  |  | self.Currency | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCHighLadderState=tagMCHighLadderState() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHighLadderState.Cmd,m_NAtagMCHighLadderState.SubCmd))] = m_NAtagMCHighLadderState | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | #A5 01  查看已申请加入的家族信息  #tagMCNotifyRequestJoinFamilyInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagRequestJoinFamily(Structure): | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCChatBubbleBoxState=tagMCChatBubbleBoxState() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCChatBubbleBoxState.Cmd,m_NAtagMCChatBubbleBoxState.SubCmd))] = m_NAtagMCChatBubbleBoxState | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A7 18 采集奖励物品通知 #tagMCCollectAwardItemInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCCollectAwardItem(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("ItemID", c_int), | 
|---|
|  |  |  | ("Count", c_ubyte), | 
|---|
|  |  |  | ("IsAuctionItem", c_ubyte),    #是否拍品 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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.ItemID = 0 | 
|---|
|  |  |  | self.Count = 0 | 
|---|
|  |  |  | self.IsAuctionItem = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCCollectAwardItem) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// A7 18 采集奖励物品通知 //tagMCCollectAwardItemInfo: | 
|---|
|  |  |  | ItemID:%d, | 
|---|
|  |  |  | Count:%d, | 
|---|
|  |  |  | IsAuctionItem:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.ItemID, | 
|---|
|  |  |  | self.Count, | 
|---|
|  |  |  | self.IsAuctionItem | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCCollectAwardItemInfo(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | CollectNPCID = 0    #(DWORD CollectNPCID)//采集的NPCID | 
|---|
|  |  |  | Count = 0    #(BYTE Count) | 
|---|
|  |  |  | AwardItemList = list()    #(vector<tagMCCollectAwardItem> AwardItemList)//奖励物品信息列表 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA7 | 
|---|
|  |  |  | self.Head.SubCmd = 0x18 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.CollectNPCID,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.Count): | 
|---|
|  |  |  | temAwardItemList = tagMCCollectAwardItem() | 
|---|
|  |  |  | _pos = temAwardItemList.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.AwardItemList.append(temAwardItemList) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA7 | 
|---|
|  |  |  | self.Head.SubCmd = 0x18 | 
|---|
|  |  |  | self.CollectNPCID = 0 | 
|---|
|  |  |  | self.Count = 0 | 
|---|
|  |  |  | self.AwardItemList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | for i in range(self.Count): | 
|---|
|  |  |  | length += self.AwardItemList[i].GetLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.CollectNPCID) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.Count) | 
|---|
|  |  |  | for i in range(self.Count): | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.AwardItemList[i].GetLength(), self.AwardItemList[i].GetBuffer()) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | CollectNPCID:%d, | 
|---|
|  |  |  | Count:%d, | 
|---|
|  |  |  | AwardItemList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.CollectNPCID, | 
|---|
|  |  |  | self.Count, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCCollectAwardItemInfo=tagMCCollectAwardItemInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCollectAwardItemInfo.Head.Cmd,m_NAtagMCCollectAwardItemInfo.Head.SubCmd))] = m_NAtagMCCollectAwardItemInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCNPCShow=tagMCNPCShow() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNPCShow.Cmd,m_NAtagMCNPCShow.SubCmd))] = m_NAtagMCNPCShow | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A7 19 查询玩家境界阶装备信息结果 #tagSCPlayerEquipCacheResult | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagSCPlayerEquipCacheResult(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | PlayerID = 0    #(DWORD PlayerID)//玩家ID | 
|---|
|  |  |  | EquipClassLV = 0    #(BYTE EquipClassLV) | 
|---|
|  |  |  | ItemDataSize = 0    #(WORD ItemDataSize) | 
|---|
|  |  |  | ItemData = ""    #(String ItemData)//物品记录 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA7 | 
|---|
|  |  |  | self.Head.SubCmd = 0x19 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.EquipClassLV,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.ItemDataSize,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.ItemData,_pos = CommFunc.ReadString(_lpData, _pos,self.ItemDataSize) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA7 | 
|---|
|  |  |  | self.Head.SubCmd = 0x19 | 
|---|
|  |  |  | self.PlayerID = 0 | 
|---|
|  |  |  | self.EquipClassLV = 0 | 
|---|
|  |  |  | self.ItemDataSize = 0 | 
|---|
|  |  |  | self.ItemData = "" | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += len(self.ItemData) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.PlayerID) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.EquipClassLV) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.ItemDataSize) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.ItemDataSize, self.ItemData) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | PlayerID:%d, | 
|---|
|  |  |  | EquipClassLV:%d, | 
|---|
|  |  |  | ItemDataSize:%d, | 
|---|
|  |  |  | ItemData:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.PlayerID, | 
|---|
|  |  |  | self.EquipClassLV, | 
|---|
|  |  |  | self.ItemDataSize, | 
|---|
|  |  |  | self.ItemData | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagSCPlayerEquipCacheResult=tagSCPlayerEquipCacheResult() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCPlayerEquipCacheResult.Head.Cmd,m_NAtagSCPlayerEquipCacheResult.Head.SubCmd))] = m_NAtagSCPlayerEquipCacheResult | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A8 04 通知商店限购物品已购买次数信息 # tagMCShopItemBuyCntInfoList | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCShopItemBuyCntInfo(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("ShopID", c_int), | 
|---|
|  |  |  | ("ItemShopIndex", c_ushort), | 
|---|
|  |  |  | ("ItemID", c_int), | 
|---|
|  |  |  | ("BuyCnt", c_int),    # 个人已购买数 | 
|---|
|  |  |  | ("ServerBuyCnt", c_int),    # 全服已购买数 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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.ShopID = 0 | 
|---|
|  |  |  | self.ItemShopIndex = 0 | 
|---|
|  |  |  | self.ItemID = 0 | 
|---|
|  |  |  | self.BuyCnt = 0 | 
|---|
|  |  |  | self.ServerBuyCnt = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCShopItemBuyCntInfo) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// A8 04 通知商店限购物品已购买次数信息 // tagMCShopItemBuyCntInfoList: | 
|---|
|  |  |  | ShopID:%d, | 
|---|
|  |  |  | ItemShopIndex:%d, | 
|---|
|  |  |  | ItemID:%d, | 
|---|
|  |  |  | BuyCnt:%d, | 
|---|
|  |  |  | ServerBuyCnt:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.ShopID, | 
|---|
|  |  |  | self.ItemShopIndex, | 
|---|
|  |  |  | self.ItemID, | 
|---|
|  |  |  | self.BuyCnt, | 
|---|
|  |  |  | self.ServerBuyCnt | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCShopItemBuyCntInfoList(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | Count = 0    #(BYTE Count)//通知个数 | 
|---|
|  |  |  | BuyCntList = list()    #(vector<tagMCShopItemBuyCntInfo> BuyCntList) | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA8 | 
|---|
|  |  |  | self.Head.SubCmd = 0x04 | 
|---|
|  |  |  | 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): | 
|---|
|  |  |  | temBuyCntList = tagMCShopItemBuyCntInfo() | 
|---|
|  |  |  | _pos = temBuyCntList.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.BuyCntList.append(temBuyCntList) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA8 | 
|---|
|  |  |  | self.Head.SubCmd = 0x04 | 
|---|
|  |  |  | self.Count = 0 | 
|---|
|  |  |  | self.BuyCntList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | for i in range(self.Count): | 
|---|
|  |  |  | length += self.BuyCntList[i].GetLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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.WriteString(data, self.BuyCntList[i].GetLength(), self.BuyCntList[i].GetBuffer()) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | Count:%d, | 
|---|
|  |  |  | BuyCntList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.Count, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCShopItemBuyCntInfoList=tagMCShopItemBuyCntInfoList() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShopItemBuyCntInfoList.Head.Cmd,m_NAtagMCShopItemBuyCntInfoList.Head.SubCmd))] = m_NAtagMCShopItemBuyCntInfoList | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A8 02 通知NPC商店物品今日已购买次数 #tagMCShopItemDayBuyCntInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCShopItemDayBuyCnt(Structure): | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCShopItemDayBuyCntInfo=tagMCShopItemDayBuyCntInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShopItemDayBuyCntInfo.Head.Cmd,m_NAtagMCShopItemDayBuyCntInfo.Head.SubCmd))] = m_NAtagMCShopItemDayBuyCntInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A8 03 通知自定义商店物品信息 #tagMCShopItemInfoList | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCShopItemInfo(Structure): | 
|---|
|  |  |  | ShopID = 0    #(DWORD ShopID) | 
|---|
|  |  |  | ItemShopIndex = 0    #(WORD ItemShopIndex) | 
|---|
|  |  |  | DataSize = 0    #(DWORD DataSize) | 
|---|
|  |  |  | ItemList = ""    #(String ItemList)//物品列表[[物品ID,数量,是否绑定,是否定制]] | 
|---|
|  |  |  | PriceType = 0    #(BYTE PriceType) | 
|---|
|  |  |  | Price = 0    #(DWORD Price) | 
|---|
|  |  |  | OriginalPrice = 0    #(DWORD OriginalPrice)// 原价 | 
|---|
|  |  |  | PlayerLVLimit = 0    #(WORD PlayerLVLimit)// 购买等级限制 | 
|---|
|  |  |  | FamilyLVLimit = 0    #(BYTE FamilyLVLimit)// 购买战盟等级限制 | 
|---|
|  |  |  | MaxBuyCnt = 0    #(DWORD MaxBuyCnt)// 个人限购数 | 
|---|
|  |  |  | ServerMaxBuyCnt = 0    #(DWORD ServerMaxBuyCnt)// 全服限购数 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.ShopID,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.ItemShopIndex,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.DataSize,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.ItemList,_pos = CommFunc.ReadString(_lpData, _pos,self.DataSize) | 
|---|
|  |  |  | self.PriceType,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.Price,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.OriginalPrice,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.PlayerLVLimit,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.FamilyLVLimit,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.MaxBuyCnt,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.ServerMaxBuyCnt,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.ShopID = 0 | 
|---|
|  |  |  | self.ItemShopIndex = 0 | 
|---|
|  |  |  | self.DataSize = 0 | 
|---|
|  |  |  | self.ItemList = "" | 
|---|
|  |  |  | self.PriceType = 0 | 
|---|
|  |  |  | self.Price = 0 | 
|---|
|  |  |  | self.OriginalPrice = 0 | 
|---|
|  |  |  | self.PlayerLVLimit = 0 | 
|---|
|  |  |  | self.FamilyLVLimit = 0 | 
|---|
|  |  |  | self.MaxBuyCnt = 0 | 
|---|
|  |  |  | self.ServerMaxBuyCnt = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += len(self.ItemList) | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.ShopID) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.ItemShopIndex) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.DataSize) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.DataSize, self.ItemList) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.PriceType) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.Price) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.OriginalPrice) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.PlayerLVLimit) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.FamilyLVLimit) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.MaxBuyCnt) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.ServerMaxBuyCnt) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | ShopID:%d, | 
|---|
|  |  |  | ItemShopIndex:%d, | 
|---|
|  |  |  | DataSize:%d, | 
|---|
|  |  |  | ItemList:%s, | 
|---|
|  |  |  | PriceType:%d, | 
|---|
|  |  |  | Price:%d, | 
|---|
|  |  |  | OriginalPrice:%d, | 
|---|
|  |  |  | PlayerLVLimit:%d, | 
|---|
|  |  |  | FamilyLVLimit:%d, | 
|---|
|  |  |  | MaxBuyCnt:%d, | 
|---|
|  |  |  | ServerMaxBuyCnt:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.ShopID, | 
|---|
|  |  |  | self.ItemShopIndex, | 
|---|
|  |  |  | self.DataSize, | 
|---|
|  |  |  | self.ItemList, | 
|---|
|  |  |  | self.PriceType, | 
|---|
|  |  |  | self.Price, | 
|---|
|  |  |  | self.OriginalPrice, | 
|---|
|  |  |  | self.PlayerLVLimit, | 
|---|
|  |  |  | self.FamilyLVLimit, | 
|---|
|  |  |  | self.MaxBuyCnt, | 
|---|
|  |  |  | self.ServerMaxBuyCnt | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCShopItemInfoList(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | Count = 0    #(BYTE Count)//通知个数 | 
|---|
|  |  |  | ShopItemList = list()    #(vector<tagMCShopItemInfo> ShopItemList) | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA8 | 
|---|
|  |  |  | self.Head.SubCmd = 0x03 | 
|---|
|  |  |  | 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): | 
|---|
|  |  |  | temShopItemList = tagMCShopItemInfo() | 
|---|
|  |  |  | _pos = temShopItemList.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.ShopItemList.append(temShopItemList) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xA8 | 
|---|
|  |  |  | self.Head.SubCmd = 0x03 | 
|---|
|  |  |  | self.Count = 0 | 
|---|
|  |  |  | self.ShopItemList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | for i in range(self.Count): | 
|---|
|  |  |  | length += self.ShopItemList[i].GetLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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.WriteString(data, self.ShopItemList[i].GetLength(), self.ShopItemList[i].GetBuffer()) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | Count:%d, | 
|---|
|  |  |  | ShopItemList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.Count, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCShopItemInfoList=tagMCShopItemInfoList() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShopItemInfoList.Head.Cmd,m_NAtagMCShopItemInfoList.Head.SubCmd))] = m_NAtagMCShopItemInfoList | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # A8 05 通知神秘商店刷新次数 #tagMCShopRefreshCnt | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCShopRefreshCnt(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("ShopID", c_int),    #商店ID | 
|---|
|  |  |  | ("RefreshCnt", c_ushort),    #已手动刷新次数 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xA8 | 
|---|
|  |  |  | 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 = 0xA8 | 
|---|
|  |  |  | self.SubCmd = 0x05 | 
|---|
|  |  |  | self.ShopID = 0 | 
|---|
|  |  |  | self.RefreshCnt = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCShopRefreshCnt) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// A8 05 通知神秘商店刷新次数 //tagMCShopRefreshCnt: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | ShopID:%d, | 
|---|
|  |  |  | RefreshCnt:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.ShopID, | 
|---|
|  |  |  | self.RefreshCnt | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCShopRefreshCnt=tagMCShopRefreshCnt() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCShopRefreshCnt.Cmd,m_NAtagMCShopRefreshCnt.SubCmd))] = m_NAtagMCShopRefreshCnt | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCAllPeoplePartyInfo=tagMCAllPeoplePartyInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCAllPeoplePartyInfo.Head.Cmd,m_NAtagMCAllPeoplePartyInfo.Head.SubCmd))] = m_NAtagMCAllPeoplePartyInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # AA 03 升阶功能特惠奖励记录 #tagMCClassUPDayAwardRecordList | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCClassUPDayAwardRecord(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("DayType", c_ubyte),    # 奖励日类型 | 
|---|
|  |  |  | ("Record", c_int),    # 奖励记录 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xAA | 
|---|
|  |  |  | 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 = 0xAA | 
|---|
|  |  |  | self.SubCmd = 0x03 | 
|---|
|  |  |  | self.DayType = 0 | 
|---|
|  |  |  | self.Record = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCClassUPDayAwardRecord) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// AA 03 升阶功能特惠奖励记录 //tagMCClassUPDayAwardRecordList: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | DayType:%d, | 
|---|
|  |  |  | Record:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.DayType, | 
|---|
|  |  |  | self.Record | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCClassUPDayAwardRecordList(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | RecordCount = 0    #(BYTE RecordCount)//记录个数 | 
|---|
|  |  |  | RecordInfoList = list()    #(vector<tagMCClassUPDayAwardRecord> RecordInfoList)//记录列表 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xAA | 
|---|
|  |  |  | self.Head.SubCmd = 0x03 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.RecordCount): | 
|---|
|  |  |  | temRecordInfoList = tagMCClassUPDayAwardRecord() | 
|---|
|  |  |  | _pos = temRecordInfoList.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.RecordInfoList.append(temRecordInfoList) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xAA | 
|---|
|  |  |  | self.Head.SubCmd = 0x03 | 
|---|
|  |  |  | self.RecordCount = 0 | 
|---|
|  |  |  | self.RecordInfoList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | for i in range(self.RecordCount): | 
|---|
|  |  |  | length += self.RecordInfoList[i].GetLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.RecordCount) | 
|---|
|  |  |  | for i in range(self.RecordCount): | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.RecordInfoList[i].GetLength(), self.RecordInfoList[i].GetBuffer()) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | RecordCount:%d, | 
|---|
|  |  |  | RecordInfoList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.RecordCount, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCClassUPDayAwardRecordList=tagMCClassUPDayAwardRecordList() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCClassUPDayAwardRecordList.Head.Cmd,m_NAtagMCClassUPDayAwardRecordList.Head.SubCmd))] = m_NAtagMCClassUPDayAwardRecordList | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # AA 06 消费奖励信息 #tagMCCostProfitInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCCostProfitInfo(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("ActionID", c_int),    # 活动ID | 
|---|
|  |  |  | ("TotalCost", c_int),    # 总消费 | 
|---|
|  |  |  | ("AwardState", c_int),    # 奖励领取状态 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xAA | 
|---|
|  |  |  | 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 = 0xAA | 
|---|
|  |  |  | self.SubCmd = 0x06 | 
|---|
|  |  |  | self.ActionID = 0 | 
|---|
|  |  |  | self.TotalCost = 0 | 
|---|
|  |  |  | self.AwardState = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCCostProfitInfo) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// AA 06 消费奖励信息 //tagMCCostProfitInfo: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | ActionID:%d, | 
|---|
|  |  |  | TotalCost:%d, | 
|---|
|  |  |  | AwardState:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.ActionID, | 
|---|
|  |  |  | self.TotalCost, | 
|---|
|  |  |  | self.AwardState | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCCostProfitInfo=tagMCCostProfitInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCostProfitInfo.Cmd,m_NAtagMCCostProfitInfo.SubCmd))] = m_NAtagMCCostProfitInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # AA 07 消费排行特惠信息 #tagMCCostRankTeHuiInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCCostRankTeHuiInfo(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("ActionID", c_int),    # 活动ID | 
|---|
|  |  |  | ("TotalCost", c_int),    # 总累计消费钻石 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xAA | 
|---|
|  |  |  | self.SubCmd = 0x07 | 
|---|
|  |  |  | 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 = 0xAA | 
|---|
|  |  |  | self.SubCmd = 0x07 | 
|---|
|  |  |  | self.ActionID = 0 | 
|---|
|  |  |  | self.TotalCost = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCCostRankTeHuiInfo) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// AA 07 消费排行特惠信息 //tagMCCostRankTeHuiInfo: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | ActionID:%d, | 
|---|
|  |  |  | TotalCost:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.ActionID, | 
|---|
|  |  |  | self.TotalCost | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCCostRankTeHuiInfo=tagMCCostRankTeHuiInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCostRankTeHuiInfo.Cmd,m_NAtagMCCostRankTeHuiInfo.SubCmd))] = m_NAtagMCCostRankTeHuiInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # AA 05 充值排行特惠信息 #tagMCRechargeRankTeHuiInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCRechargeRankTeHuiInfo(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("ActionID", c_int),    # 活动ID | 
|---|
|  |  |  | ("TotalGold", c_int),    # 总累计充值元宝 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xAA | 
|---|
|  |  |  | 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 = 0xAA | 
|---|
|  |  |  | self.SubCmd = 0x05 | 
|---|
|  |  |  | self.ActionID = 0 | 
|---|
|  |  |  | self.TotalGold = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCRechargeRankTeHuiInfo) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// AA 05 充值排行特惠信息 //tagMCRechargeRankTeHuiInfo: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | ActionID:%d, | 
|---|
|  |  |  | TotalGold:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.ActionID, | 
|---|
|  |  |  | self.TotalGold | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCRechargeRankTeHuiInfo=tagMCRechargeRankTeHuiInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRechargeRankTeHuiInfo.Cmd,m_NAtagMCRechargeRankTeHuiInfo.SubCmd))] = m_NAtagMCRechargeRankTeHuiInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # AA 04 充值特惠信息 #tagMCRechargeTeHuiInfoList | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCRechargeTeHuiInfo(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("GotCnt", c_ubyte),    # 已领取次数 | 
|---|
|  |  |  | ("CanGetCnt", c_ubyte),    # 当前可领取次数 | 
|---|
|  |  |  | ("CurTotalGold", c_int),    # 当前规则累计充值元宝-仅针对累充规则 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xAA | 
|---|
|  |  |  | self.SubCmd = 0x04 | 
|---|
|  |  |  | 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 = 0xAA | 
|---|
|  |  |  | self.SubCmd = 0x04 | 
|---|
|  |  |  | self.GotCnt = 0 | 
|---|
|  |  |  | self.CanGetCnt = 0 | 
|---|
|  |  |  | self.CurTotalGold = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCRechargeTeHuiInfo) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// AA 04 充值特惠信息 //tagMCRechargeTeHuiInfoList: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | GotCnt:%d, | 
|---|
|  |  |  | CanGetCnt:%d, | 
|---|
|  |  |  | CurTotalGold:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.GotCnt, | 
|---|
|  |  |  | self.CanGetCnt, | 
|---|
|  |  |  | self.CurTotalGold | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCRechargeTeHuiInfoList(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | ActionID = 0    #(DWORD ActionID)// 活动ID | 
|---|
|  |  |  | TotalGold = 0    #(DWORD TotalGold)// 总累计充值元宝 | 
|---|
|  |  |  | InfoCnt = 0    #(BYTE InfoCnt)// 信息个数 | 
|---|
|  |  |  | InfoList = list()    #(vector<tagMCRechargeTeHuiInfo> InfoList)// 信息列表 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xAA | 
|---|
|  |  |  | self.Head.SubCmd = 0x04 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.ActionID,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.TotalGold,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.InfoCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.InfoCnt): | 
|---|
|  |  |  | temInfoList = tagMCRechargeTeHuiInfo() | 
|---|
|  |  |  | _pos = temInfoList.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.InfoList.append(temInfoList) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xAA | 
|---|
|  |  |  | self.Head.SubCmd = 0x04 | 
|---|
|  |  |  | self.ActionID = 0 | 
|---|
|  |  |  | self.TotalGold = 0 | 
|---|
|  |  |  | self.InfoCnt = 0 | 
|---|
|  |  |  | self.InfoList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | for i in range(self.InfoCnt): | 
|---|
|  |  |  | length += self.InfoList[i].GetLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.ActionID) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.TotalGold) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.InfoCnt) | 
|---|
|  |  |  | for i in range(self.InfoCnt): | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer()) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | ActionID:%d, | 
|---|
|  |  |  | TotalGold:%d, | 
|---|
|  |  |  | InfoCnt:%d, | 
|---|
|  |  |  | InfoList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.ActionID, | 
|---|
|  |  |  | self.TotalGold, | 
|---|
|  |  |  | self.InfoCnt, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCRechargeTeHuiInfoList=tagMCRechargeTeHuiInfoList() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRechargeTeHuiInfoList.Head.Cmd,m_NAtagMCRechargeTeHuiInfoList.Head.SubCmd))] = m_NAtagMCRechargeTeHuiInfoList | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # AA 11 限时特惠活动信息 #tagMCSpringSaleInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCSpringSaleItem(Structure): | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCBossRebornPlayerInfo=tagMCBossRebornPlayerInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCBossRebornPlayerInfo.Head.Cmd,m_NAtagMCBossRebornPlayerInfo.Head.SubCmd))] = m_NAtagMCBossRebornPlayerInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # AB 06 活动物品兑换次数记录 #tagMCExchangeActionItemCntRecord | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCExchangeActionItemCnt(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("ItemID", c_int), | 
|---|
|  |  |  | ("ExcCnt", c_int),    # 已兑换次数 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xAB | 
|---|
|  |  |  | 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 = 0xAB | 
|---|
|  |  |  | self.SubCmd = 0x06 | 
|---|
|  |  |  | self.ItemID = 0 | 
|---|
|  |  |  | self.ExcCnt = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCExchangeActionItemCnt) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// AB 06 活动物品兑换次数记录 //tagMCExchangeActionItemCntRecord: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | ItemID:%d, | 
|---|
|  |  |  | ExcCnt:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.ItemID, | 
|---|
|  |  |  | self.ExcCnt | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCExchangeActionItemCntRecord(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | ActionKeyLen = 0    #(BYTE ActionKeyLen) | 
|---|
|  |  |  | ActionKey = ""    #(String ActionKey) | 
|---|
|  |  |  | RecordCnt = 0    #(BYTE RecordCnt) | 
|---|
|  |  |  | RecordList = list()    #(vector<tagMCExchangeActionItemCnt> RecordList) | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xAB | 
|---|
|  |  |  | self.Head.SubCmd = 0x06 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.ActionKeyLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | self.ActionKey,_pos = CommFunc.ReadString(_lpData, _pos,self.ActionKeyLen) | 
|---|
|  |  |  | self.RecordCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.RecordCnt): | 
|---|
|  |  |  | temRecordList = tagMCExchangeActionItemCnt() | 
|---|
|  |  |  | _pos = temRecordList.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.RecordList.append(temRecordList) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xAB | 
|---|
|  |  |  | self.Head.SubCmd = 0x06 | 
|---|
|  |  |  | self.ActionKeyLen = 0 | 
|---|
|  |  |  | self.ActionKey = "" | 
|---|
|  |  |  | self.RecordCnt = 0 | 
|---|
|  |  |  | self.RecordList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += len(self.ActionKey) | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | for i in range(self.RecordCnt): | 
|---|
|  |  |  | length += self.RecordList[i].GetLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.ActionKeyLen) | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.ActionKeyLen, self.ActionKey) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.RecordCnt) | 
|---|
|  |  |  | for i in range(self.RecordCnt): | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.RecordList[i].GetLength(), self.RecordList[i].GetBuffer()) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | ActionKeyLen:%d, | 
|---|
|  |  |  | ActionKey:%s, | 
|---|
|  |  |  | RecordCnt:%d, | 
|---|
|  |  |  | RecordList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.ActionKeyLen, | 
|---|
|  |  |  | self.ActionKey, | 
|---|
|  |  |  | self.RecordCnt, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCExchangeActionItemCntRecord=tagMCExchangeActionItemCntRecord() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCExchangeActionItemCntRecord.Head.Cmd,m_NAtagMCExchangeActionItemCntRecord.Head.SubCmd))] = m_NAtagMCExchangeActionItemCntRecord | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # AB 07 节日活动奖励状态 #tagMCFestivalLoginAwardState | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCFestivalLoginAwardState(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("FestivalType", c_ubyte),    # 节日类型 | 
|---|
|  |  |  | ("State", c_int),    # 领取状态 <按位取值,0-未领取 1-可领取 2-已领取> | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xAB | 
|---|
|  |  |  | self.SubCmd = 0x07 | 
|---|
|  |  |  | 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 = 0xAB | 
|---|
|  |  |  | self.SubCmd = 0x07 | 
|---|
|  |  |  | self.FestivalType = 0 | 
|---|
|  |  |  | self.State = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCFestivalLoginAwardState) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// AB 07 节日活动奖励状态 //tagMCFestivalLoginAwardState: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | FestivalType:%d, | 
|---|
|  |  |  | State:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.FestivalType, | 
|---|
|  |  |  | self.State | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCFestivalLoginAwardState=tagMCFestivalLoginAwardState() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFestivalLoginAwardState.Cmd,m_NAtagMCFestivalLoginAwardState.SubCmd))] = m_NAtagMCFestivalLoginAwardState | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # AB 02  领地占领每日奖励领奖情况 #tagMCManorDailyAward | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCManorDailyAward(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("AwardRecord", c_int),    # 按位表示每个领地领取情况;0-未领,1-已领 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xAB | 
|---|
|  |  |  | self.SubCmd = 0x02 | 
|---|
|  |  |  | 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 = 0xAB | 
|---|
|  |  |  | self.SubCmd = 0x02 | 
|---|
|  |  |  | self.AwardRecord = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCManorDailyAward) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// AB 02  领地占领每日奖励领奖情况 //tagMCManorDailyAward: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | AwardRecord:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.AwardRecord | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCManorDailyAward=tagMCManorDailyAward() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCManorDailyAward.Cmd,m_NAtagMCManorDailyAward.SubCmd))] = m_NAtagMCManorDailyAward | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # AB 01  通知领地战结果 #tagMCManorWarResult | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCManorWarResult(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("Type", c_ubyte),    # 0-普通信息;1-活动结果总结 | 
|---|
|  |  |  | ("Result", c_ubyte),    # 战盟胜负情况;0-未知,1-胜利,2-失败 | 
|---|
|  |  |  | ("JoinTime", c_int),    # 活动时总参与时间,毫秒 | 
|---|
|  |  |  | ("JoinAward", c_ubyte),    # 参与奖状态;0-不可领,1-可领,2-已领 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xAB | 
|---|
|  |  |  | self.SubCmd = 0x01 | 
|---|
|  |  |  | 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 = 0xAB | 
|---|
|  |  |  | self.SubCmd = 0x01 | 
|---|
|  |  |  | self.Type = 0 | 
|---|
|  |  |  | self.Result = 0 | 
|---|
|  |  |  | self.JoinTime = 0 | 
|---|
|  |  |  | self.JoinAward = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCManorWarResult) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// AB 01  通知领地战结果 //tagMCManorWarResult: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | Type:%d, | 
|---|
|  |  |  | Result:%d, | 
|---|
|  |  |  | JoinTime:%d, | 
|---|
|  |  |  | JoinAward:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.Type, | 
|---|
|  |  |  | self.Result, | 
|---|
|  |  |  | self.JoinTime, | 
|---|
|  |  |  | self.JoinAward | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCManorWarResult=tagMCManorWarResult() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCManorWarResult.Cmd,m_NAtagMCManorWarResult.SubCmd))] = m_NAtagMCManorWarResult | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # B1 07 玩家点数信息 #tagMCRolePointInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCRolePointInfo(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | PointAttrIDCount = 0    #(BYTE PointAttrIDCount)// 点类型个数 | 
|---|
|  |  |  | PointAttrIDList = list()    #(vector<BYTE> PointAttrIDList)// 点类型列表 | 
|---|
|  |  |  | PointValueList = list()    #(vector<WORD> PointValueList)// 点类型对应已加自由点数列表 | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xB1 | 
|---|
|  |  |  | self.Head.SubCmd = 0x07 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.PointAttrIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.PointAttrIDCount): | 
|---|
|  |  |  | value,_pos=CommFunc.ReadBYTE(_lpData,_pos) | 
|---|
|  |  |  | self.PointAttrIDList.append(value) | 
|---|
|  |  |  | for i in range(self.PointAttrIDCount): | 
|---|
|  |  |  | value,_pos=CommFunc.ReadWORD(_lpData,_pos) | 
|---|
|  |  |  | self.PointValueList.append(value) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xB1 | 
|---|
|  |  |  | self.Head.SubCmd = 0x07 | 
|---|
|  |  |  | self.PointAttrIDCount = 0 | 
|---|
|  |  |  | self.PointAttrIDList = list() | 
|---|
|  |  |  | self.PointValueList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 1 * self.PointAttrIDCount | 
|---|
|  |  |  | length += 2 * self.PointAttrIDCount | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.PointAttrIDCount) | 
|---|
|  |  |  | for i in range(self.PointAttrIDCount): | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.PointAttrIDList[i]) | 
|---|
|  |  |  | for i in range(self.PointAttrIDCount): | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.PointValueList[i]) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | PointAttrIDCount:%d, | 
|---|
|  |  |  | PointAttrIDList:%s, | 
|---|
|  |  |  | PointValueList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.PointAttrIDCount, | 
|---|
|  |  |  | "...", | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCRolePointInfo=tagMCRolePointInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCRolePointInfo.Head.Cmd,m_NAtagMCRolePointInfo.Head.SubCmd))] = m_NAtagMCRolePointInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # B1 01 玩家技能连击通知 #tagMCSkillCombo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCSkillCombo(Structure): | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | #B1 08 开始印记流失时间 #tagMCYinjiStartTime | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCYinjiStartTime(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xB1 | 
|---|
|  |  |  | 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 = 0xB1 | 
|---|
|  |  |  | self.SubCmd = 0x08 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCYinjiStartTime) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''//B1 08 开始印记流失时间 //tagMCYinjiStartTime: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCYinjiStartTime=tagMCYinjiStartTime() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCYinjiStartTime.Cmd,m_NAtagMCYinjiStartTime.SubCmd))] = m_NAtagMCYinjiStartTime | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # B2 08 获得仙缘币信息 #tagMCAddXianyuanCoinMsg | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCAddXianyuanCoinMsg(Structure): | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCAddXianyuanCoinMsg=tagMCAddXianyuanCoinMsg() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCAddXianyuanCoinMsg.Head.Cmd,m_NAtagMCAddXianyuanCoinMsg.Head.SubCmd))] = m_NAtagMCAddXianyuanCoinMsg | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # B2 14 自定义副本奖励信息 #tagMCCuntomFBPrizeInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCCuntomFBPrizeInfo(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | MapID = 0    #(DWORD MapID) | 
|---|
|  |  |  | FuncLineID = 0    #(WORD FuncLineID) | 
|---|
|  |  |  | PrizeItemCount = 0    #(BYTE PrizeItemCount) | 
|---|
|  |  |  | PrizeItemIDList = list()    #(vector<DWORD> PrizeItemIDList) | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xB2 | 
|---|
|  |  |  | self.Head.SubCmd = 0x14 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def ReadData(self, _lpData, _pos=0, _Len=0): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | _pos = self.Head.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.MapID,_pos = CommFunc.ReadDWORD(_lpData, _pos) | 
|---|
|  |  |  | self.FuncLineID,_pos = CommFunc.ReadWORD(_lpData, _pos) | 
|---|
|  |  |  | self.PrizeItemCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) | 
|---|
|  |  |  | for i in range(self.PrizeItemCount): | 
|---|
|  |  |  | value,_pos=CommFunc.ReadDWORD(_lpData,_pos) | 
|---|
|  |  |  | self.PrizeItemIDList.append(value) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xB2 | 
|---|
|  |  |  | self.Head.SubCmd = 0x14 | 
|---|
|  |  |  | self.MapID = 0 | 
|---|
|  |  |  | self.FuncLineID = 0 | 
|---|
|  |  |  | self.PrizeItemCount = 0 | 
|---|
|  |  |  | self.PrizeItemIDList = list() | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | length = 0 | 
|---|
|  |  |  | length += self.Head.GetLength() | 
|---|
|  |  |  | length += 4 | 
|---|
|  |  |  | length += 2 | 
|---|
|  |  |  | length += 1 | 
|---|
|  |  |  | length += 4 * self.PrizeItemCount | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return length | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | data = '' | 
|---|
|  |  |  | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.MapID) | 
|---|
|  |  |  | data = CommFunc.WriteWORD(data, self.FuncLineID) | 
|---|
|  |  |  | data = CommFunc.WriteBYTE(data, self.PrizeItemCount) | 
|---|
|  |  |  | for i in range(self.PrizeItemCount): | 
|---|
|  |  |  | data = CommFunc.WriteDWORD(data, self.PrizeItemIDList[i]) | 
|---|
|  |  |  | return data | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = ''' | 
|---|
|  |  |  | Head:%s, | 
|---|
|  |  |  | MapID:%d, | 
|---|
|  |  |  | FuncLineID:%d, | 
|---|
|  |  |  | PrizeItemCount:%d, | 
|---|
|  |  |  | PrizeItemIDList:%s | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Head.OutputString(), | 
|---|
|  |  |  | self.MapID, | 
|---|
|  |  |  | self.FuncLineID, | 
|---|
|  |  |  | self.PrizeItemCount, | 
|---|
|  |  |  | "..." | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCCuntomFBPrizeInfo=tagMCCuntomFBPrizeInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCCuntomFBPrizeInfo.Head.Cmd,m_NAtagMCCuntomFBPrizeInfo.Head.SubCmd))] = m_NAtagMCCuntomFBPrizeInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCFamilyWarBillboard=tagMCFamilyWarBillboard() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFamilyWarBillboard.Head.Cmd,m_NAtagMCFamilyWarBillboard.Head.SubCmd))] = m_NAtagMCFamilyWarBillboard | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # B2 15 副本买buff信息通知 #tagMCFBBuyBuffInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCFBBuyBuffTime(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("MapID", c_int), | 
|---|
|  |  |  | ("MoneyCnt", c_ushort), | 
|---|
|  |  |  | ("BuyTime", c_int), | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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.MapID = 0 | 
|---|
|  |  |  | self.MoneyCnt = 0 | 
|---|
|  |  |  | self.BuyTime = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCFBBuyBuffTime) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// B2 15 副本买buff信息通知 //tagMCFBBuyBuffInfo: | 
|---|
|  |  |  | MapID:%d, | 
|---|
|  |  |  | MoneyCnt:%d, | 
|---|
|  |  |  | BuyTime:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.MapID, | 
|---|
|  |  |  | self.MoneyCnt, | 
|---|
|  |  |  | self.BuyTime | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCFBBuyBuffInfo(Structure): | 
|---|
|  |  |  | Head = tagHead() | 
|---|
|  |  |  | Cnt = 0    #(BYTE Cnt) | 
|---|
|  |  |  | InfoList = list()    #(vector<tagMCFBBuyBuffTime> InfoList) | 
|---|
|  |  |  | data = None | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xB2 | 
|---|
|  |  |  | self.Head.SubCmd = 0x15 | 
|---|
|  |  |  | 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 = tagMCFBBuyBuffTime() | 
|---|
|  |  |  | _pos = temInfoList.ReadData(_lpData, _pos) | 
|---|
|  |  |  | self.InfoList.append(temInfoList) | 
|---|
|  |  |  | return _pos | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def Clear(self): | 
|---|
|  |  |  | self.Head = tagHead() | 
|---|
|  |  |  | self.Head.Clear() | 
|---|
|  |  |  | self.Head.Cmd = 0xB2 | 
|---|
|  |  |  | self.Head.SubCmd = 0x15 | 
|---|
|  |  |  | 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_NAtagMCFBBuyBuffInfo=tagMCFBBuyBuffInfo() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFBBuyBuffInfo.Head.Cmd,m_NAtagMCFBBuyBuffInfo.Head.SubCmd))] = m_NAtagMCFBBuyBuffInfo | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # 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 16 开始自定义场景结果 #tagMCStartCustomSceneResult | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCStartCustomSceneResult(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("MapID", c_int), | 
|---|
|  |  |  | ("FuncLineID", c_ushort), | 
|---|
|  |  |  | ("Result", c_ubyte),    #是否允许 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xB2 | 
|---|
|  |  |  | self.SubCmd = 0x16 | 
|---|
|  |  |  | 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 = 0x16 | 
|---|
|  |  |  | self.MapID = 0 | 
|---|
|  |  |  | self.FuncLineID = 0 | 
|---|
|  |  |  | self.Result = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCStartCustomSceneResult) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// B2 16 开始自定义场景结果 //tagMCStartCustomSceneResult: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | MapID:%d, | 
|---|
|  |  |  | FuncLineID:%d, | 
|---|
|  |  |  | Result:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.MapID, | 
|---|
|  |  |  | self.FuncLineID, | 
|---|
|  |  |  | self.Result | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCStartCustomSceneResult=tagMCStartCustomSceneResult() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCStartCustomSceneResult.Cmd,m_NAtagMCStartCustomSceneResult.SubCmd))] = m_NAtagMCStartCustomSceneResult | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | #B2 02 推送提醒设置通知 #tagMCPushNotificationsSetting | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCPushNotificationsSetting(Structure): | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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 | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | #B4 14 根据类型来决定移动的方式 #tagMCMoveByType | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCMoveByType(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("ID", c_int),    #玩家ID | 
|---|
|  |  |  | ("PosX", c_ushort),    # 目标X | 
|---|
|  |  |  | ("PosY", c_ushort),    # 目标Y | 
|---|
|  |  |  | ("MoveType", c_ubyte),    #移动方式 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xB4 | 
|---|
|  |  |  | self.SubCmd = 0x14 | 
|---|
|  |  |  | 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 = 0xB4 | 
|---|
|  |  |  | self.SubCmd = 0x14 | 
|---|
|  |  |  | self.ID = 0 | 
|---|
|  |  |  | self.PosX = 0 | 
|---|
|  |  |  | self.PosY = 0 | 
|---|
|  |  |  | self.MoveType = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagMCMoveByType) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''//B4 14 根据类型来决定移动的方式 //tagMCMoveByType: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | ID:%d, | 
|---|
|  |  |  | PosX:%d, | 
|---|
|  |  |  | PosY:%d, | 
|---|
|  |  |  | MoveType:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.ID, | 
|---|
|  |  |  | self.PosX, | 
|---|
|  |  |  | self.PosY, | 
|---|
|  |  |  | self.MoveType | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagMCMoveByType=tagMCMoveByType() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMoveByType.Cmd,m_NAtagMCMoveByType.SubCmd))] = m_NAtagMCMoveByType | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | #B4 07 被动技能页选择(功法) # tagMCPassivePage | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagMCPassivePage(Structure): | 
|---|