| | |
| | | ('Face', ctypes.c_int),
|
| | | ('FacePic', ctypes.c_int),
|
| | | ('ModelMark', ctypes.c_ulong),
|
| | | ('EquipShowSwitch', ctypes.c_ulong),
|
| | | ('FamilyID', ctypes.c_ulong),
|
| | | ('FamilyName', ctypes.c_char * 33),
|
| | | ('FamilyEmblemID', ctypes.c_ushort),
|
| | |
| | | self.Face = 0
|
| | | self.FacePic = 0
|
| | | self.ModelMark = 0
|
| | | self.EquipShowSwitch = 0
|
| | | self.FamilyID = 0
|
| | | self.FamilyName = ''
|
| | | self.FamilyEmblemID = 0
|
| | |
| | | self.Face, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.FacePic, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.ModelMark, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.EquipShowSwitch, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.FamilyID, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.FamilyName, pos = CommFunc.ReadString(buf, pos, 33)
|
| | | self.FamilyEmblemID, pos = CommFunc.ReadWORD(buf, pos)
|
| | |
| | | buf = CommFunc.WriteDWORD(buf, self.Face)
|
| | | buf = CommFunc.WriteDWORD(buf, self.FacePic)
|
| | | buf = CommFunc.WriteDWORD(buf, self.ModelMark)
|
| | | buf = CommFunc.WriteDWORD(buf, self.EquipShowSwitch)
|
| | | buf = CommFunc.WriteDWORD(buf, self.FamilyID)
|
| | | buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 33, self.FamilyName)
|
| | | buf = CommFunc.WriteWORD(buf, self.FamilyEmblemID)
|
| | |
| | | length += sizeof(ctypes.c_ubyte)
|
| | | length += sizeof(ctypes.c_int)
|
| | | length += sizeof(ctypes.c_int)
|
| | | length += sizeof(ctypes.c_ulong)
|
| | | length += sizeof(ctypes.c_ulong)
|
| | | length += sizeof(ctypes.c_ulong)
|
| | | length += sizeof(ctypes.c_char) * 33
|
| | |
| | | rec[u'Face'] = self.Face
|
| | | rec[u'FacePic'] = self.FacePic
|
| | | rec[u'ModelMark'] = self.ModelMark
|
| | | rec[u'EquipShowSwitch'] = self.EquipShowSwitch
|
| | | rec[u'FamilyID'] = self.FamilyID
|
| | | rec[u'FamilyName'] = fix_incomingText(self.FamilyName)
|
| | | rec[u'FamilyEmblemID'] = self.FamilyEmblemID
|
| | |
| | | self.Face = rec.get(u'Face', 0)
|
| | | self.FacePic = rec.get(u'FacePic', 0)
|
| | | self.ModelMark = rec.get(u'ModelMark', 0)
|
| | | self.EquipShowSwitch = rec.get(u'EquipShowSwitch', 0)
|
| | | self.FamilyID = rec.get(u'FamilyID', 0)
|
| | | self.FamilyName = fix_outgoingText(rec.get(u'FamilyName', u''))
|
| | | self.FamilyEmblemID = rec.get(u'FamilyEmblemID', 0)
|
| | |
| | | Face = %s,
|
| | | FacePic = %s,
|
| | | ModelMark = %s,
|
| | | EquipShowSwitch = %s,
|
| | | FamilyID = %s,
|
| | | FamilyName = %s,
|
| | | FamilyEmblemID = %s,
|
| | |
| | | self.Face,
|
| | | self.FacePic,
|
| | | self.ModelMark,
|
| | | self.EquipShowSwitch,
|
| | | self.FamilyID,
|
| | | self.FamilyName,
|
| | | self.FamilyEmblemID,
|
| | |
| | | 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'''%(
|
| | | 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'''%(
|
| | | self.PlayerID,
|
| | | self.AccID,
|
| | | self.PlayerName,
|
| | |
| | | self.Face,
|
| | | self.FacePic,
|
| | | self.ModelMark,
|
| | | self.EquipShowSwitch,
|
| | | self.FamilyID,
|
| | | self.FamilyName,
|
| | | self.FamilyEmblemID,
|
| | |
| | | ('FightPowerEx', ctypes.c_ulong),
|
| | | ('EmblemID', ctypes.c_ushort),
|
| | | ('EmblemWord', ctypes.c_char * 3),
|
| | | ('Extra1', ctypes.c_ulong),
|
| | | ('Extra2', ctypes.c_ulong),
|
| | | ('Extra3', ctypes.c_ulong),
|
| | | ('Extra4', ctypes.c_ulong),
|
| | | ('Extra5', ctypes.c_ulong),
|
| | | ('ADOResult', ctypes.c_ulong),
|
| | | ]
|
| | |
|
| | |
| | | self.FightPowerEx = 0
|
| | | self.EmblemID = 0
|
| | | self.EmblemWord = ''
|
| | | self.Extra1 = 0
|
| | | self.Extra2 = 0
|
| | | self.Extra3 = 0
|
| | | self.Extra4 = 0
|
| | | self.Extra5 = 0
|
| | |
|
| | | def readData(self, buf, pos = 0, length = 0):
|
| | | if not pos <= length:
|
| | |
| | | self.FightPowerEx, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.EmblemID, pos = CommFunc.ReadWORD(buf, pos)
|
| | | self.EmblemWord, pos = CommFunc.ReadString(buf, pos, 3)
|
| | | self.Extra1, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Extra2, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Extra3, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Extra4, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | self.Extra5, pos = CommFunc.ReadDWORD(buf, pos)
|
| | | return self.getLength()
|
| | |
|
| | | def getBuffer(self):
|
| | |
| | | buf = CommFunc.WriteDWORD(buf, self.FightPowerEx)
|
| | | buf = CommFunc.WriteWORD(buf, self.EmblemID)
|
| | | buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 3, self.EmblemWord)
|
| | | buf = CommFunc.WriteDWORD(buf, self.Extra1)
|
| | | buf = CommFunc.WriteDWORD(buf, self.Extra2)
|
| | | buf = CommFunc.WriteDWORD(buf, self.Extra3)
|
| | | buf = CommFunc.WriteDWORD(buf, self.Extra4)
|
| | | buf = CommFunc.WriteDWORD(buf, self.Extra5)
|
| | | return buf
|
| | |
|
| | | def getLength(self):
|
| | |
| | | length += sizeof(ctypes.c_ulong)
|
| | | 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)
|
| | | length += sizeof(ctypes.c_ulong)
|
| | | length += sizeof(ctypes.c_ulong)
|
| | | return length
|
| | |
|
| | | def getRecord(self):
|
| | |
| | | rec[u'FightPowerEx'] = self.FightPowerEx
|
| | | rec[u'EmblemID'] = self.EmblemID
|
| | | rec[u'EmblemWord'] = fix_incomingText(self.EmblemWord)
|
| | | rec[u'Extra1'] = self.Extra1
|
| | | rec[u'Extra2'] = self.Extra2
|
| | | rec[u'Extra3'] = self.Extra3
|
| | | rec[u'Extra4'] = self.Extra4
|
| | | rec[u'Extra5'] = self.Extra5
|
| | | return rec
|
| | |
|
| | | def readRecord(self, rec):
|
| | |
| | | self.FightPowerEx = rec.get(u'FightPowerEx', 0)
|
| | | self.EmblemID = rec.get(u'EmblemID', 0)
|
| | | self.EmblemWord = fix_outgoingText(rec.get(u'EmblemWord', u''))
|
| | | self.Extra1 = rec.get(u'Extra1', 0)
|
| | | self.Extra2 = rec.get(u'Extra2', 0)
|
| | | self.Extra3 = rec.get(u'Extra3', 0)
|
| | | self.Extra4 = rec.get(u'Extra4', 0)
|
| | | self.Extra5 = rec.get(u'Extra5', 0)
|
| | |
|
| | | def adoLoad(self, collection):
|
| | | '''使用KEY查找并读取'''
|
| | |
| | | FightPowerEx = %s,
|
| | | EmblemID = %s,
|
| | | EmblemWord = %s,
|
| | | Extra1 = %s,
|
| | | Extra2 = %s,
|
| | | Extra3 = %s,
|
| | | Extra4 = %s,
|
| | | Extra5 = %s,
|
| | | ADOResult = %s,
|
| | | '''%(
|
| | | self.ID,
|
| | |
| | | self.FightPowerEx,
|
| | | self.EmblemID,
|
| | | self.EmblemWord,
|
| | | self.Extra1,
|
| | | self.Extra2,
|
| | | self.Extra3,
|
| | | self.Extra4,
|
| | | self.Extra5,
|
| | | 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'''%(
|
| | | 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'''%(
|
| | | self.ID,
|
| | | self.Name,
|
| | | self.LeaderID,
|
| | |
| | | self.FightPowerEx,
|
| | | self.EmblemID,
|
| | | self.EmblemWord,
|
| | | self.Extra1,
|
| | | self.Extra2,
|
| | | self.Extra3,
|
| | | self.Extra4,
|
| | | self.Extra5,
|
| | | )
|
| | | return output
|
| | |
|