| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A9 06 商城全服购买次数通知 #tagGCStoreServerBuyCntInfo
|
| | |
|
| | | class tagGCStoreServerBuyCnt(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("GoodsID", c_int), #商品标识
|
| | | ("BuyCnt", 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.GoodsID = 0
|
| | | self.BuyCnt = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagGCStoreServerBuyCnt)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A9 06 商城全服购买次数通知 //tagGCStoreServerBuyCntInfo:
|
| | | GoodsID:%d,
|
| | | BuyCnt:%d
|
| | | '''\
|
| | | %(
|
| | | self.GoodsID,
|
| | | self.BuyCnt
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagGCStoreServerBuyCntInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(WORD Count)//数量
|
| | | InfoList = list() #(vector<tagGCStoreServerBuyCnt> InfoList)//次数信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA9
|
| | | self.Head.SubCmd = 0x06
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temInfoList = tagGCStoreServerBuyCnt()
|
| | | _pos = temInfoList.ReadData(_lpData, _pos)
|
| | | self.InfoList.append(temInfoList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA9
|
| | | self.Head.SubCmd = 0x06
|
| | | self.Count = 0
|
| | | self.InfoList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 2
|
| | | 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.WriteWORD(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,
|
| | | Count:%d,
|
| | | InfoList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagGCStoreServerBuyCntInfo=tagGCStoreServerBuyCntInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCStoreServerBuyCntInfo.Head.Cmd,m_NAtagGCStoreServerBuyCntInfo.Head.SubCmd))] = m_NAtagGCStoreServerBuyCntInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A9 21 角色改名结果 #tagUpdatePlayerNameResult
|
| | |
|
| | | class tagUpdatePlayerNameResult(Structure):
|
| | |
| | | #------------------------------------------------------
|
| | | # AA 18 限时抢购活动玩家预约信息 #tagMCFlashSaleAppointmentInfo
|
| | |
|
| | | class tagMCFlashSaleAppointmentState(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("GoodsMark", c_int), # 商品标识
|
| | | ("State", 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.GoodsMark = 0
|
| | | self.State = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCFlashSaleAppointmentState)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 18 限时抢购活动玩家预约信息 //tagMCFlashSaleAppointmentInfo:
|
| | | GoodsMark:%d,
|
| | | State:%d
|
| | | '''\
|
| | | %(
|
| | | self.GoodsMark,
|
| | | self.State
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCFlashSaleAppointmentInfo(Structure):
|
| | | Head = tagHead()
|
| | | IsAll = 0 #(BYTE IsAll)// 是否全部
|
| | | GoodsCount = 0 #(WORD GoodsCount)// 商品数
|
| | | GoodsList = list() #(vector<DWORD> GoodsList)// 预约的商品
|
| | | GoodsList = list() #(vector<tagMCFlashSaleAppointmentState> GoodsList)// 预约的商品
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.IsAll,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.GoodsCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.GoodsCount):
|
| | | value,_pos=CommFunc.ReadDWORD(_lpData,_pos)
|
| | | self.GoodsList.append(value)
|
| | | temGoodsList = tagMCFlashSaleAppointmentState()
|
| | | _pos = temGoodsList.ReadData(_lpData, _pos)
|
| | | self.GoodsList.append(temGoodsList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAA
|
| | | self.Head.SubCmd = 0x18
|
| | | self.IsAll = 0
|
| | | self.GoodsCount = 0
|
| | | self.GoodsList = list()
|
| | | return
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 2
|
| | | length += 4 * self.GoodsCount
|
| | | for i in range(self.GoodsCount):
|
| | | length += self.GoodsList[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.WriteWORD(data, self.GoodsCount)
|
| | | for i in range(self.GoodsCount):
|
| | | data = CommFunc.WriteDWORD(data, self.GoodsList[i])
|
| | | data = CommFunc.WriteString(data, self.GoodsList[i].GetLength(), self.GoodsList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | IsAll:%d,
|
| | | GoodsCount:%d,
|
| | | GoodsList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.IsAll,
|
| | | self.GoodsCount,
|
| | | "..."
|
| | | )
|