| | |
| | | import FBLogic
|
| | | import IpyGameDataPY
|
| | | import ShareDefine
|
| | | import NPCCommon
|
| | | import ChConfig
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | def OnLogin(curPlayer):
|
| | |
| | | GameWorld.DebugLog("不存在该副本或线路无法扫荡!mapID=%s, lineID=%s" % (mapID, lineID))
|
| | | return
|
| | |
|
| | | if not FBCommon.IsFBPass(curPlayer, mapID, lineID):
|
| | | if mapID not in ChConfig.SweepUnCheckPassMapIDList and not FBCommon.IsFBPass(curPlayer, mapID, lineID):
|
| | | GameWorld.DebugLog("未过关无法扫荡!mapID=%s, lineID=%s" % (mapID, lineID))
|
| | | return
|
| | |
|
| | |
| | | return
|
| | |
|
| | | # 副本是否可扫荡, 这里只判断副本自身的特殊条件, 公共条件上面已经判断
|
| | | if not FBLogic.OnPlayerFBSweepAsk(curPlayer, mapID, lineID, cnt, dataEx):
|
| | | askRet = FBLogic.OnPlayerFBSweepAsk(curPlayer, mapID, lineID, cnt, dataEx)
|
| | | if not askRet:
|
| | | GameWorld.DebugLog("该副本当前无法扫荡!mapID=%s, lineID=%s" % (mapID, lineID))
|
| | | return
|
| | | |
| | | #PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_FeastRedPack_FBSweep, 1, [mapID])
|
| | |
|
| | | #需先扣除门票, 再增加次数, 否则可能导致扣除的数量错误
|
| | | #FBCommon.DelFBEnterTicket(curPlayer, mapID, lineID, cnt)
|
| | |
| | | FBCommon.AddEnterFBCount(curPlayer, mapID, cnt)
|
| | |
|
| | | #扫荡结果给奖励等
|
| | | FBLogic.OnPlayerFBSweepResult(curPlayer, mapID, lineID, cnt, dataEx)
|
| | | FBLogic.OnPlayerFBSweepResult(curPlayer, mapID, lineID, cnt, dataEx, askRet)
|
| | | return
|
| | |
|
| | | #// B1 08 快速一键过关副本 #tagCMFBQuickPass
|
| | |
| | | return
|
| | |
|
| | | reqRet = FBLogic.OnPlayerFBQuickPass(curPlayer, mapID, lineID)
|
| | | if not reqRet or len(reqRet) != 2:
|
| | | if not reqRet:
|
| | | GameWorld.DebugLog("无法一键过关副本: mapID=%s,lineID=%s" % (mapID, lineID), playerID)
|
| | | return
|
| | | bossID, quickCnt = reqRet
|
| | | if bossID:
|
| | | npcData = GameWorld.GetGameData().FindNPCDataByID(bossID)
|
| | | if not npcData:
|
| | | return
|
| | | npcFightPower = NPCCommon.GetSuppressFightPower(npcData)
|
| | | lineID = reqRet[0]
|
| | | quickCnt = reqRet[1] if len(reqRet) > 1 else 0
|
| | | quickFightPower = reqRet[2] if len(reqRet) > 2 else 0
|
| | | quickData = reqRet[3] if len(reqRet) > 3 else []
|
| | | if quickFightPower:
|
| | | quickNeedRatio = IpyGameDataPY.GetFuncCfg("FBQuickPass", 1)
|
| | | quickNeedFightPower = int(npcFightPower * quickNeedRatio)
|
| | | quickNeedFightPower = int(quickFightPower * quickNeedRatio)
|
| | | curFightPower = PlayerControl.GetFightPower(curPlayer)
|
| | | if quickNeedFightPower and curFightPower < quickNeedFightPower:
|
| | | GameWorld.DebugLog("无法一键过关副本! 战力限制: mapID=%s,lineID=%s,bossID=%s,npcFightPower=%s,quickNeedFightPower=%s > %s" |
| | | % (mapID, lineID, bossID, npcFightPower, quickNeedFightPower, curFightPower), playerID)
|
| | | GameWorld.DebugLog("无法一键过关副本! 战力限制: mapID=%s,lineID=%s,quickFightPower=%s,quickNeedFightPower=%s > %s" |
| | | % (mapID, lineID, quickFightPower, quickNeedFightPower, curFightPower), playerID)
|
| | | PlayerControl.NotifyCode(curPlayer, 'TaskFeedback4')
|
| | | return
|
| | |
|
| | |
| | | FBCommon.AddEnterFBCount(curPlayer, mapID, quickCnt)
|
| | |
|
| | | #扫荡结果给奖励等
|
| | | FBLogic.OnPlayerFBQuickPassResult(curPlayer, mapID, lineID)
|
| | | FBLogic.OnPlayerFBQuickPassResult(curPlayer, mapID, lineID, quickData)
|
| | | return
|
| | |
|