| | |
| | | familyIndex = -1
|
| | | familyList = []
|
| | | for index, batFamily in enumerate(self.battleFamilySortList):
|
| | | batFamily.syncRank = index + 1
|
| | | if familyID == batFamily.familyID:
|
| | | familyIndex = index
|
| | | break
|
| | | |
| | | # 第一名默认取前3名
|
| | | if familyIndex == 0:
|
| | | familyList = self.battleFamilySortList[:3]
|
| | | # 第一名默认取前3名
|
| | | # 最后一名默认取最后3名
|
| | | elif familyIndex == len(self.battleFamilySortList) - 1:
|
| | | familyList = self.battleFamilySortList[-3:]
|
| | | elif familyIndex > 0:
|
| | | familyList = self.battleFamilySortList[familyIndex - 1:familyIndex + 2]
|
| | | for i, batFamily in enumerate(familyList):
|
| | | familyList[i] = [batFamily.familyID, batFamily.score, batFamily.name]
|
| | | familyList[i] = [batFamily.familyID, batFamily.score, batFamily.name, batFamily.syncRank]
|
| | | helpInfo["familyList"] = familyList
|
| | | return {"world":helpInfo}
|
| | |
|
| | |
| | | self.homePlayerIDList = [] # 在复活点里的玩家
|
| | |
|
| | | self.familyHelpDict = {} # 未通知的仙盟变更信息
|
| | | |
| | | self.syncRank = -1 # 仅用于同步前端用的名次
|
| | | return
|
| | |
|
| | | def addJoinPlayer(self, playerID):
|