| | |
| | | LeaderID = 0 #(DWORD LeaderID)//族长ID
|
| | | LeaderNameLen = 0 #(BYTE LeaderNameLen)
|
| | | LeaderName = "" #(String LeaderName)//size = LeaderNameLen
|
| | | LeaderServerID = 0 #(DWORD LeaderServerID)//族长服务器ID
|
| | | FamilyLV = 0 #(BYTE FamilyLV)//家族等级
|
| | | JoinReview = 0 #(BYTE JoinReview)//成员加入是否需要审核,默认0自动加入
|
| | | JoinLVMin = 0 #(WORD JoinLVMin)//限制最低可加入的玩家等级
|
| | |
| | | self.LeaderID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.LeaderNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.LeaderName,_pos = CommFunc.ReadString(_lpData, _pos,self.LeaderNameLen)
|
| | | self.LeaderServerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FamilyLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.JoinReview,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.JoinLVMin,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | |
| | | self.LeaderID = 0
|
| | | self.LeaderNameLen = 0
|
| | | self.LeaderName = ""
|
| | | self.LeaderServerID = 0
|
| | | self.FamilyLV = 0
|
| | | self.JoinReview = 0
|
| | | self.JoinLVMin = 0
|
| | |
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.LeaderName)
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | |
| | | data = CommFunc.WriteDWORD(data, self.LeaderID)
|
| | | data = CommFunc.WriteBYTE(data, self.LeaderNameLen)
|
| | | data = CommFunc.WriteString(data, self.LeaderNameLen, self.LeaderName)
|
| | | data = CommFunc.WriteDWORD(data, self.LeaderServerID)
|
| | | data = CommFunc.WriteBYTE(data, self.FamilyLV)
|
| | | data = CommFunc.WriteBYTE(data, self.JoinReview)
|
| | | data = CommFunc.WriteWORD(data, self.JoinLVMin)
|
| | |
| | | LeaderID:%d,
|
| | | LeaderNameLen:%d,
|
| | | LeaderName:%s,
|
| | | LeaderServerID:%d,
|
| | | FamilyLV:%d,
|
| | | JoinReview:%d,
|
| | | JoinLVMin:%d,
|
| | |
| | | self.LeaderID,
|
| | | self.LeaderNameLen,
|
| | | self.LeaderName,
|
| | | self.LeaderServerID,
|
| | | self.FamilyLV,
|
| | | self.JoinReview,
|
| | | self.JoinLVMin,
|
| | |
| | | FamilyCount = 0 #(BYTE FamilyCount)
|
| | | FamilyList = list() #(vector<tagMCFamilyView> FamilyList)//本页家族信息列表
|
| | | Rank = 0 #(DWORD Rank)//玩家公会所在名次,0-没有公会或没有在榜上;>0-对应排名
|
| | | DataServerID = 0 #(DWORD DataServerID)//数据所在服务器ID
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | _pos = temFamilyList.ReadData(_lpData, _pos)
|
| | | self.FamilyList.append(temFamilyList)
|
| | | self.Rank,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.DataServerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | |
| | | self.FamilyCount = 0
|
| | | self.FamilyList = list()
|
| | | self.Rank = 0
|
| | | self.DataServerID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | length += 1
|
| | | for i in range(self.FamilyCount):
|
| | | length += self.FamilyList[i].GetLength()
|
| | | length += 4
|
| | | length += 4
|
| | |
|
| | | return length
|
| | |
| | | for i in range(self.FamilyCount):
|
| | | data = CommFunc.WriteString(data, self.FamilyList[i].GetLength(), self.FamilyList[i].GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.Rank)
|
| | | data = CommFunc.WriteDWORD(data, self.DataServerID)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | |
| | | TotalPage:%d,
|
| | | FamilyCount:%d,
|
| | | FamilyList:%s,
|
| | | Rank:%d,
|
| | | DataServerID:%d
|
| | | Rank:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | |
| | | self.TotalPage,
|
| | | self.FamilyCount,
|
| | | "...",
|
| | | self.Rank,
|
| | | self.DataServerID
|
| | | self.Rank
|
| | | )
|
| | | return DumpString
|
| | |
|