| | |
| | | ('CmpValue', ctypes.c_ulong),
|
| | | ('CmpValue2', ctypes.c_ulong),
|
| | | ('CmpValue3', ctypes.c_ulong),
|
| | | ('Time', ctypes.c_ulong),
|
| | | ('DataLen', ctypes.c_ushort),
|
| | | ('UserData', ctypes.c_char_p),
|
| | | ('ADOResult', ctypes.c_ulong),
|
| | |
| | | self.CmpValue = 0
|
| | | self.CmpValue2 = 0
|
| | | self.CmpValue3 = 0
|
| | | self.Time = 0
|
| | | self.DataLen = 0
|
| | | self.UserData = ''
|
| | |
|
| | |
| | | self.CmpValue, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.CmpValue2, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.CmpValue3, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Time, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.DataLen, pos = CommFunc.ReadWORD(buf, pos)
|
| | | tmp, pos = CommFunc.ReadString(buf, pos, self.DataLen)
|
| | | self.UserData = ctypes.c_char_p(tmp)
|
| | |
| | | buf = CommFunc.WriteDWORD(buf, self.CmpValue)
|
| | | buf = CommFunc.WriteDWORD(buf, self.CmpValue2)
|
| | | buf = CommFunc.WriteDWORD(buf, self.CmpValue3)
|
| | | buf = CommFunc.WriteDWORD(buf, self.Time)
|
| | | buf = CommFunc.WriteWORD(buf, self.DataLen)
|
| | | buf = CommFunc.WriteString(buf, self.DataLen, self.UserData)
|
| | | return buf
|
| | |
| | | length += sizeof(ctypes.c_char) * 33
|
| | | length += sizeof(ctypes.c_char) * 65
|
| | | length += sizeof(ctypes.c_ubyte)
|
| | | length += sizeof(ctypes.c_ulong)
|
| | | length += sizeof(ctypes.c_ulong)
|
| | | length += sizeof(ctypes.c_ulong)
|
| | | length += sizeof(ctypes.c_ulong)
|
| | |
| | | rec[u'CmpValue'] = self.CmpValue
|
| | | rec[u'CmpValue2'] = self.CmpValue2
|
| | | rec[u'CmpValue3'] = self.CmpValue3
|
| | | rec[u'Time'] = self.Time
|
| | | rec[u'DataLen'] = self.DataLen
|
| | | rec[u'UserData'] = fix_incomingText(self.UserData)
|
| | | return rec
|
| | |
| | | self.CmpValue = rec.get(u'CmpValue', 0)
|
| | | self.CmpValue2 = rec.get(u'CmpValue2', 0)
|
| | | self.CmpValue3 = rec.get(u'CmpValue3', 0)
|
| | | self.Time = rec.get(u'Time', 0)
|
| | | self.DataLen = rec.get(u'DataLen', 0)
|
| | | self.UserData = fix_outgoingText(rec.get(u'UserData', u''))
|
| | |
|
| | |
| | | CmpValue = %s,
|
| | | CmpValue2 = %s,
|
| | | CmpValue3 = %s,
|
| | | Time = %s,
|
| | | DataLen = %s,
|
| | | UserData = %s,
|
| | | ADOResult = %s,
|
| | |
| | | self.CmpValue,
|
| | | self.CmpValue2,
|
| | | self.CmpValue3,
|
| | | self.Time,
|
| | | self.DataLen,
|
| | | self.UserData,
|
| | | self.ADOResult,
|
| | |
| | | return output
|
| | |
|
| | | def dumpString(self):
|
| | | output = '''%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s'''%(
|
| | | output = '''%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s'''%(
|
| | | self.GroupValue1,
|
| | | self.GroupValue2,
|
| | | self.BillboardType,
|
| | |
| | | self.CmpValue,
|
| | | self.CmpValue2,
|
| | | self.CmpValue3,
|
| | | self.Time,
|
| | | self.DataLen,
|
| | | self.UserData,
|
| | | )
|
| | |
| | | ('ContribDay', ctypes.c_ulong),
|
| | | ('DonateCntTotal', ctypes.c_ulong),
|
| | | ('DonateCntDay', ctypes.c_ubyte),
|
| | | ('TitleID', ctypes.c_ulong),
|
| | | ('ADOResult', ctypes.c_ulong),
|
| | | ]
|
| | |
|
| | |
| | | self.ContribDay, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.DonateCntTotal, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.DonateCntDay, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.TitleID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | |
|
| | |
| | | rec[u'ContribDay'] = self.ContribDay
|
| | | rec[u'DonateCntTotal'] = self.DonateCntTotal
|
| | | rec[u'DonateCntDay'] = self.DonateCntDay
|
| | | rec[u'TitleID'] = self.TitleID
|
| | | return rec
|
| | |
|
| | | def readRecord(self, rec):
|
| | |
| | | self.ContribDay = rec.get(u'ContribDay', 0)
|
| | | self.DonateCntTotal = rec.get(u'DonateCntTotal', 0)
|
| | | self.DonateCntDay = rec.get(u'DonateCntDay', 0)
|
| | | self.TitleID = rec.get(u'TitleID', 0)
|
| | |
|
| | | def adoLoad(self, collection):
|
| | | '''使用KEY查找并读取'''
|
| | |
| | | ContribDay = %s,
|
| | | DonateCntTotal = %s,
|
| | | DonateCntDay = %s,
|
| | | TitleID = %s,
|
| | | ADOResult = %s,
|
| | | '''%(
|
| | | self.PlayerID,
|
| | |
| | | self.ContribDay,
|
| | | self.DonateCntTotal,
|
| | | self.DonateCntDay,
|
| | | self.TitleID,
|
| | | self.ADOResult,
|
| | | )
|
| | | return output
|
| | |
|
| | | def dumpString(self):
|
| | | output = '''%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s'''%(
|
| | | output = '''%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s\t%1s'''%(
|
| | | self.PlayerID,
|
| | | self.FamilyID,
|
| | | self.JoinTime,
|
| | |
| | | self.ContribDay,
|
| | | self.DonateCntTotal,
|
| | | self.DonateCntDay,
|
| | | self.TitleID,
|
| | | )
|
| | | return output
|
| | |
|