| | |
| | | self.fightPower = 0 # 阵容总战力
|
| | | return
|
| | |
|
| | | def UpdLineup(self, heroItemDict, shapeType=0, refreshForce=False):
|
| | | def UpdLineup(self, heroItemDict, shapeType=0, refreshForce=False, syncLineup=True):
|
| | | '''变更阵容时更新
|
| | | @param heroItemDict: 武将背包索引信息 {itemIndex:posNum, ...}
|
| | | @param shapeType: 阵型
|
| | |
| | | self.heroItemDict = heroItemDict
|
| | | GameWorld.DebugLog("更新阵容: lineupID=%s,%s" % (self.lineupID, heroItemDict), self.playerID)
|
| | | self.RefreshLineupAttr(refreshForce)
|
| | | if syncLineup and self.olPlayer.curPlayer:
|
| | | PlayerHero.Sync_Lineup(self.olPlayer.curPlayer, self.lineupID)
|
| | | return
|
| | |
|
| | | def FreeLineupHero(self):
|
| | |
| | | return lineupHero
|
| | |
|
| | | def GetLineupHeroByID(self, heroID):
|
| | | lineupHero = None
|
| | | for posNum in self.lineupHeroDict.keys():
|
| | | lineup = self.GetLineupHero(posNum)
|
| | | if lineup.heroID == heroID:
|
| | | return lineup
|
| | | return
|
| | | lineupHero = self.GetLineupHero(posNum)
|
| | | if lineupHero.heroID == heroID:
|
| | | return lineupHero
|
| | | if False:
|
| | | lineupHero = LineupHero()
|
| | | return lineupHero
|
| | |
|
| | | def GetLineupInfo(self):
|
| | | ## 获取阵容信息,即要用到该阵容了,如战斗或者保存缓存信息等
|
| | |
| | | # 获取其他绑定该阵容的功能,如红颜、灵兽等
|
| | |
|
| | | shapeType = lineShapeTypeDict.get(lineupID, 0)
|
| | | lineup.UpdLineup(heroItemDict, shapeType)
|
| | | lineup.UpdLineup(heroItemDict, shapeType, syncLineup=False)
|
| | |
|
| | | PlayerHero.Sync_Lineup(curPlayer)
|
| | | return
|
| | |
|
| | | def doCalcAllAttr(curPlayer):
|