| | |
| | | self.fightPower = 0 # 阵容总战力
|
| | | return
|
| | |
|
| | | def UpdLineup(self, heroItemDict, shapeType=0, refreshForce=False, syncLineup=True):
|
| | | def UpdLineup(self, heroItemDict, shapeType=0, refreshForce=False, isReload=False):
|
| | | '''变更阵容时更新
|
| | | @param heroItemDict: 武将背包索引信息 {itemIndex:posNum, ...}
|
| | | @param shapeType: 阵型
|
| | | @param refreshForce: 是否强制刷属性
|
| | | '''
|
| | | self.lineupChange = True
|
| | | if not isReload: # 非重读阵容的视为变更
|
| | | self.lineupChange = True
|
| | | self.shapeType = shapeType
|
| | | self.heroItemDict = heroItemDict
|
| | | GameWorld.DebugLog("更新阵容: lineupID=%s,%s" % (self.lineupID, heroItemDict), self.playerID)
|
| | | self.RefreshLineupAttr(refreshForce)
|
| | | if syncLineup and self.olPlayer.curPlayer:
|
| | | if not isReload and self.olPlayer.curPlayer:
|
| | | PlayerHero.Sync_Lineup(self.olPlayer.curPlayer, self.lineupID)
|
| | | return
|
| | |
|
| | |
| | | # 获取其他绑定该阵容的功能,如红颜、灵兽等
|
| | |
|
| | | shapeType = lineShapeTypeDict.get(lineupID, 0)
|
| | | lineup.UpdLineup(heroItemDict, shapeType, syncLineup=False)
|
| | | lineup.UpdLineup(heroItemDict, shapeType, isReload=True)
|
| | |
|
| | | PlayerHero.Sync_Lineup(curPlayer)
|
| | | return
|