| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A8 06 通知神秘限购商品时间 #tagMCMysticalShopTimeInfo
|
| | |
|
| | | class tagMCMysticalShopTime(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("GoodsID", c_int), # 商品ID
|
| | | ("StartTime", 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.StartTime = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCMysticalShopTime)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A8 06 通知神秘限购商品时间 //tagMCMysticalShopTimeInfo:
|
| | | GoodsID:%d,
|
| | | StartTime:%d
|
| | | '''\
|
| | | %(
|
| | | self.GoodsID,
|
| | | self.StartTime
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCMysticalShopTimeInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(WORD Count)// 商品数
|
| | | ShopTimeList = list() #(vector<tagMCMysticalShopTime> ShopTimeList)// 商品开卖信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA8
|
| | | 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):
|
| | | temShopTimeList = tagMCMysticalShopTime()
|
| | | _pos = temShopTimeList.ReadData(_lpData, _pos)
|
| | | self.ShopTimeList.append(temShopTimeList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA8
|
| | | self.Head.SubCmd = 0x06
|
| | | self.Count = 0
|
| | | self.ShopTimeList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 2
|
| | | for i in range(self.Count):
|
| | | length += self.ShopTimeList[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.ShopTimeList[i].GetLength(), self.ShopTimeList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | ShopTimeList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCMysticalShopTimeInfo=tagMCMysticalShopTimeInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMysticalShopTimeInfo.Head.Cmd,m_NAtagMCMysticalShopTimeInfo.Head.SubCmd))] = m_NAtagMCMysticalShopTimeInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A8 10 通知获得物品 #tagMCNotifyUseItemGetItem
|
| | |
|
| | | class tagMCNotifyUseItemGetItem(Structure):
|
| | |
| | | ("ItemCnt", c_ushort), # 物品数量
|
| | | ("IsBind", c_ubyte), # 是否绑定
|
| | | ("Mark", c_int), # 排序标识
|
| | | ("Rare", c_ubyte), # 珍稀值
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.ItemCnt = 0
|
| | | self.IsBind = 0
|
| | | self.Mark = 0
|
| | | self.Rare = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | ItemID:%d,
|
| | | ItemCnt:%d,
|
| | | IsBind:%d,
|
| | | Mark:%d
|
| | | Mark:%d,
|
| | | Rare:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCnt,
|
| | | self.IsBind,
|
| | | self.Mark
|
| | | self.Mark,
|
| | | self.Rare
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("IsDouble", c_ubyte), #是否双倍
|
| | | ("OldDouble", c_ubyte), #是否曾经允许双倍
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x01
|
| | | self.IsDouble = 0
|
| | | self.OldDouble = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | DumpString = '''// B2 01 通知封魔坛双倍击杀状态 //tagMCFMTDoubleState:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | IsDouble:%d
|
| | | IsDouble:%d,
|
| | | OldDouble:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.IsDouble
|
| | | self.IsDouble,
|
| | | self.OldDouble
|
| | | )
|
| | | return DumpString
|
| | |
|