| | |
| | | if not helpBattleNPC:
|
| | | continue
|
| | | objID = helpBattleNPC.GetID()
|
| | | helpBattleNPC.SetIsNeedProcess(True)
|
| | | GameWorld.Log("召唤助战成功: calledPlayerID=%s,objID=%s,fightPower=%s" % (calledPlayerID, objID, fightPower), playerID)
|
| | | gameFB.SetGameFBDict(ChConfig.Def_FB_HelpBattleFBObjID % calledPlayerID, objID)
|
| | | helpBattleNPC.SetDict(ChConfig.Def_NPC_Dict_AtkDelayTick, calledCount * 1000) # 按转换顺序每个延长1秒攻击,防止动作一致
|
| | | calledCount += 1
|
| | | # 设置助战属性
|
| | | npcControl = NPCCommon.NPCControl(helpBattleNPC)
|
| | |
| | | costMoneyList = []
|
| | | calledPlayerIDDict = {} # 已经召唤的玩家ID字典 {playerID:[是否付费召唤, 职业], ...}
|
| | |
|
| | | refreshCount = gameFB.GetPlayerGameFBDictByKey(playerID, ChConfig.FBPD_HelpBattleRefreshCount)
|
| | | if isClientRefresh:
|
| | | refreshCount = gameFB.GetPlayerGameFBDictByKey(playerID, ChConfig.FBPD_HelpBattleRefreshCount)
|
| | | freeRefreshCount = IpyGameDataPY.GetFuncCfg("HelpBattleRefresh", 1)
|
| | | goldRefreshCount = IpyGameDataPY.GetFuncCfg("HelpBattleRefresh", 2)
|
| | | if refreshCount >= (freeRefreshCount + goldRefreshCount):
|
| | |
| | |
|
| | | # 非客户端刷新的视为重新开始,重置刷新次数
|
| | | else:
|
| | | gameFB.SetPlayerGameFBDict(playerID, ChConfig.FBPD_HelpBattleRefreshCount, 0)
|
| | | if not refreshCount:
|
| | | gameFB.SetPlayerGameFBDict(playerID, ChConfig.FBPD_HelpBattleRefreshCount, 0)
|
| | | gameFB.SetGameFBDict(ChConfig.FBPD_HelpBattleFBFightPower, ipyData.GetFightPowerMin())
|
| | | gameFB.SetGameFBDict(ChConfig.FBPD_HelpBattleFBBaseHurt, ipyData.GetRobotBaseHurt())
|
| | | GameWorld.DebugLog("设置副本战力=%s,保底伤害=%s" % (ipyData.GetFightPowerMin(), ipyData.GetRobotBaseHurt()))
|