| | |
| | |
|
| | | class tagGCGetAssistThanksGiftPreview(Structure):
|
| | | Head = tagHead()
|
| | | GiftGUID = "" #(char GiftGUID[40])//礼盒GUID
|
| | | ItemID = 0 #(DWORD ItemID)//礼盒ID
|
| | | PlayerID = 0 #(DWORD PlayerID)//发起玩家ID
|
| | | PlayerName = "" #(char PlayerName[33])
|
| | |
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.GiftGUID,_pos = CommFunc.ReadString(_lpData, _pos,40)
|
| | | self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
|
| | |
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB0
|
| | | self.Head.SubCmd = 0x05
|
| | | self.GiftGUID = ""
|
| | | self.ItemID = 0
|
| | | self.PlayerID = 0
|
| | | self.PlayerName = ""
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 40
|
| | | length += 4
|
| | | length += 4
|
| | | length += 33
|
| | |
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteString(data, 40, self.GiftGUID)
|
| | | data = CommFunc.WriteDWORD(data, self.ItemID)
|
| | | data = CommFunc.WriteDWORD(data, self.PlayerID)
|
| | | data = CommFunc.WriteString(data, 33, self.PlayerName)
|
| | |
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | GiftGUID:%s,
|
| | | ItemID:%d,
|
| | | PlayerID:%d,
|
| | | PlayerName:%s,
|
| | |
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.GiftGUID,
|
| | | self.ItemID,
|
| | | self.PlayerID,
|
| | | self.PlayerName,
|
| | |
| | |
|
| | | class tagGCUseAssistThanksGiftPreview(Structure):
|
| | | Head = tagHead()
|
| | | GiftGUID = "" #(char GiftGUID[40])//礼盒GUID
|
| | | ItemID = 0 #(DWORD ItemID)//礼盒ID
|
| | | MapID = 0 #(DWORD MapID)
|
| | | LineID = 0 #(DWORD LineID)
|
| | |
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.GiftGUID,_pos = CommFunc.ReadString(_lpData, _pos,40)
|
| | | self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.MapID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.LineID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | |
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB0
|
| | | self.Head.SubCmd = 0x04
|
| | | self.GiftGUID = ""
|
| | | self.ItemID = 0
|
| | | self.MapID = 0
|
| | | self.LineID = 0
|
| | |
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 40
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | |
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteString(data, 40, self.GiftGUID)
|
| | | data = CommFunc.WriteDWORD(data, self.ItemID)
|
| | | data = CommFunc.WriteDWORD(data, self.MapID)
|
| | | data = CommFunc.WriteDWORD(data, self.LineID)
|
| | |
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | GiftGUID:%s,
|
| | | ItemID:%d,
|
| | | MapID:%d,
|
| | | LineID:%d,
|
| | |
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.GiftGUID,
|
| | | self.ItemID,
|
| | | self.MapID,
|
| | | self.LineID,
|