| | |
| | | ('FightPower', ctypes.c_ulong),
|
| | | ('FightPowerEx', ctypes.c_ulong),
|
| | | ('EmblemID', ctypes.c_ushort),
|
| | | ('EmblemWord', ctypes.c_char * 3),
|
| | | ('ADOResult', ctypes.c_ulong),
|
| | | ]
|
| | |
|
| | |
| | | self.FightPower = 0
|
| | | self.FightPowerEx = 0
|
| | | self.EmblemID = 0
|
| | | self.EmblemWord = ''
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | |
| | | self.FightPower, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.FightPowerEx, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.EmblemID, pos = CommFunc.ReadWORD(buf, pos)
|
| | | self.EmblemWord, pos = CommFunc.ReadString(buf, pos, 3)
|
| | | return self.getLength()
|
| | |
|
| | | def getBuffer(self):
|
| | |
| | | buf = CommFunc.WriteDWORD(buf, self.FightPower)
|
| | | buf = CommFunc.WriteDWORD(buf, self.FightPowerEx)
|
| | | buf = CommFunc.WriteWORD(buf, self.EmblemID)
|
| | | buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 3, self.EmblemWord)
|
| | | return buf
|
| | |
|
| | | def getLength(self):
|
| | |
| | | length += sizeof(ctypes.c_ulong)
|
| | | length += sizeof(ctypes.c_ulong)
|
| | | length += sizeof(ctypes.c_ushort)
|
| | | length += sizeof(ctypes.c_char) * 3
|
| | | return length
|
| | |
|
| | | def outputString(self):
|
| | |
| | | FightPower = %s,
|
| | | FightPowerEx = %s,
|
| | | EmblemID = %s,
|
| | | EmblemWord = %s,
|
| | | ADOResult = %s,
|
| | | '''%(
|
| | | self.ID,
|
| | |
| | | self.FightPower,
|
| | | self.FightPowerEx,
|
| | | self.EmblemID,
|
| | | self.EmblemWord,
|
| | | self.ADOResult,
|
| | | )
|
| | | return output
|
| | |
| | | self.Name = Str
|
| | | else:
|
| | | self.Name = Str[:33]
|
| | | |
| | | def SetEmblemWord(self,Str):
|
| | | if len(Str)<=3:
|
| | | self.EmblemWord = Str
|
| | | else:
|
| | | self.EmblemWord = Str[:3]
|
| | |
|
| | |
|
| | | # 家族成员表 #tagDBFamilyMem
|
| | |
| | | ('OffTime', ctypes.c_ulong),
|
| | | ('FmLV', ctypes.c_ubyte),
|
| | | ('ContribTotal', ctypes.c_ulong),
|
| | | ('ContribWeek', ctypes.c_ulong),
|
| | | ('ContribDay', ctypes.c_ulong),
|
| | | ('DonateCntTotal', ctypes.c_ulong),
|
| | | ('DonateCntDay', ctypes.c_ubyte),
|
| | | ('TitleID', ctypes.c_ulong),
|
| | | ('ADOResult', ctypes.c_ulong),
|
| | | ]
|
| | |
|
| | |
| | | self.OffTime, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.FmLV, pos = CommFunc.ReadBYTE(buf, pos)
|
| | | self.ContribTotal, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.ContribWeek, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | 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()
|
| | |
|
| | |
|
| | |
| | | OffTime = %s,
|
| | | FmLV = %s,
|
| | | ContribTotal = %s,
|
| | | ContribWeek = %s,
|
| | | ContribDay = %s,
|
| | | DonateCntTotal = %s,
|
| | | DonateCntDay = %s,
|
| | | TitleID = %s,
|
| | | ADOResult = %s,
|
| | | '''%(
|
| | | self.PlayerID,
|
| | |
| | | self.OffTime,
|
| | | self.FmLV,
|
| | | self.ContribTotal,
|
| | | self.ContribWeek,
|
| | | self.ContribDay,
|
| | | self.DonateCntTotal,
|
| | | self.DonateCntDay,
|
| | | self.TitleID,
|
| | | self.ADOResult,
|
| | | )
|
| | | return output
|
| | |
| | | ('FamilyID', ctypes.c_ulong),
|
| | | ('FamilyName', ctypes.c_char * 33),
|
| | | ('FamilyEmblemID', ctypes.c_ushort),
|
| | | ('FamilyEmblemWord', ctypes.c_char * 3),
|
| | | ('TitleID', ctypes.c_ulong),
|
| | | ('FightPower', ctypes.c_ulong),
|
| | | ('FightPowerEx', ctypes.c_ulong),
|
| | |
| | | self.FamilyID = 0
|
| | | self.FamilyName = ''
|
| | | self.FamilyEmblemID = 0
|
| | | self.FamilyEmblemWord = ''
|
| | | self.TitleID = 0
|
| | | self.FightPower = 0
|
| | | self.FightPowerEx = 0
|
| | |
| | | self.FamilyID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.FamilyName, pos = CommFunc.ReadString(buf, pos, 33)
|
| | | self.FamilyEmblemID, pos = CommFunc.ReadWORD(buf, pos)
|
| | | self.FamilyEmblemWord, pos = CommFunc.ReadString(buf, pos, 3)
|
| | | self.TitleID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.FightPower, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.FightPowerEx, pos = CommFunc.ReadDWORD(buf, pos)
|
| | |
| | | buf = CommFunc.WriteDWORD(buf, self.FamilyID)
|
| | | buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 33, self.FamilyName)
|
| | | buf = CommFunc.WriteWORD(buf, self.FamilyEmblemID)
|
| | | buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 3, self.FamilyEmblemWord)
|
| | | buf = CommFunc.WriteDWORD(buf, self.TitleID)
|
| | | buf = CommFunc.WriteDWORD(buf, self.FightPower)
|
| | | buf = CommFunc.WriteDWORD(buf, self.FightPowerEx)
|
| | |
| | | length += sizeof(ctypes.c_ulong)
|
| | | length += sizeof(ctypes.c_char) * 33
|
| | | length += sizeof(ctypes.c_ushort)
|
| | | length += sizeof(ctypes.c_char) * 3
|
| | | length += sizeof(ctypes.c_ulong)
|
| | | length += sizeof(ctypes.c_ulong)
|
| | | length += sizeof(ctypes.c_ulong)
|
| | |
| | | FamilyID = %s,
|
| | | FamilyName = %s,
|
| | | FamilyEmblemID = %s,
|
| | | FamilyEmblemWord = %s,
|
| | | TitleID = %s,
|
| | | FightPower = %s,
|
| | | FightPowerEx = %s,
|
| | |
| | | self.FamilyID,
|
| | | self.FamilyName,
|
| | | self.FamilyEmblemID,
|
| | | self.FamilyEmblemWord,
|
| | | self.TitleID,
|
| | | self.FightPower,
|
| | | self.FightPowerEx,
|
| | |
| | | self.FamilyName = Str
|
| | | else:
|
| | | self.FamilyName = Str[:33]
|
| | | |
| | | def SetFamilyEmblemWord(self,Str):
|
| | | if len(Str)<=3:
|
| | | self.FamilyEmblemWord = Str
|
| | | else:
|
| | | self.FamilyEmblemWord = Str[:3]
|
| | |
|
| | |
|
| | | # 邮件个人邮件表 #tagDBMailPersonal
|
| | |
| | | ('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)
|
| | |
| | | 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,
|