| | |
| | | import NPCCommon
|
| | | import FBHelpBattle
|
| | | import PlayerActLogin
|
| | | import PlayerPet
|
| | | import PlayerHorse
|
| | |
|
| | | import math
|
| | |
|
| | |
| | | if historyStar < needStar:
|
| | | GameWorld.DebugLog(' 上一层评级未达到%s,无法挑战本层!' % needStar)
|
| | | return False
|
| | | #坐骑与灵宠总等级
|
| | | needSumLV = IpyGameDataPY.GetFuncEvalCfg('MunekadoLockLimit', 2, {}).get(lineID, 0)
|
| | | if PlayerPet.GetTotalPetLV(curPlayer) + PlayerHorse.GetHorseSumLV(curPlayer) < needSumLV:
|
| | | GameWorld.DebugLog(' 坐骑与灵宠总等级未达到%s,无法挑战本层!' % needSumLV)
|
| | | return False
|
| | | return True
|
| | |
|
| | |
|
| | |
| | | notify_tick = ZMSLCfg[Def_FightTime] * 1000 - (tick - GameWorld.GetGameFB().GetFBStepTick())
|
| | | curPlayer.Sync_TimeTick(IPY_GameWorld.tttTowerTake, 0, max(notify_tick, 0), True)
|
| | |
|
| | | __UpdZMSLFBStar(tick, True, curPlayer)
|
| | | __UpdZMSLFBStar(tick, True, curPlayer)
|
| | | DoFBHelp(curPlayer, tick)
|
| | | return
|
| | |
|
| | |
| | | gameFB.SetGameFBDict(ZMSL_FBNextRefreshStep, refreshStep + 1)
|
| | | gameFB.SetGameFBDict(ZMSL_FBStepStartTick, tick)
|
| | | gameFB.SetGameFBDict(ZMSL_FBStepStar, gameFB.GetGameFBDictByKey(ChConfig.Def_FB_Grade))
|
| | | __UpdZMSLFBStar(tick, True)
|
| | |
|
| | | return
|
| | |
|
| | |
|
| | |
| | | if fbStep == FB_Step_Prepare:
|
| | | __DoLogic_FB_Prepare(tick)
|
| | | elif fbStep == FB_Step_Fight:
|
| | | __ProcessOverFight(tick)
|
| | | __UpdZMSLFBStar(tick)
|
| | | __ProcessOverFight(tick)
|
| | | elif fbStep == FB_Step_PickItem:
|
| | | __DoLogic_FB_PickItem(tick)
|
| | | elif fbStep == FB_Step_Over:
|
| | |
| | | costTime = tick - GameWorld.GetGameFB().GetFBStepTick()
|
| | | gameFB = GameWorld.GetGameFB()
|
| | | gameFB.SetGameFBDict(ZMSL_CostTime, costTime)
|
| | | GameWorld.DebugLog("__DoZMSLOver isPass=%s,killNPCID=%s" % (isPass, killNPCID))
|
| | | star = GameWorld.GetGameFB().GetGameFBDictByKey(ChConfig.Def_FB_Grade)
|
| | | GameWorld.DebugLog("__DoZMSLOver isPass=%s,killNPCID=%s,star=%s" % (isPass, killNPCID, star))
|
| | | #===============================================================================================
|
| | | # canDropPlayerList = GetCanDropPlayerList()
|
| | | # if isPass and canDropPlayerList:
|
| | |
| | | mapID = GameWorld.GetMap().GetMapID()
|
| | | mapID = FBCommon.GetRecordMapID(mapID)
|
| | | lineID = FBCommon.GetFBPropertyMark()
|
| | | star = GameWorld.GetGameFB().GetGameFBDictByKey(ChConfig.Def_FB_Grade)
|
| | | |
| | | #awardDict = FBCommon.GetFBLineReward(mapID, lineID)
|
| | | #prizeItemList = awardDict.get(star, [])
|
| | | overDict = {FBCommon.Over_grade:star,FBCommon.Over_dataMapID:mapID,FBCommon.Over_isPass:int(isPass), FBCommon.Over_costTime:costTime}
|
| | |
| | | # 如果在副本中过天,则只给物品奖励,不变更过关信息
|
| | | if not isInFBOnDay:
|
| | | FBCommon.AddEnterFBCount(curPlayer, mapID, 1)
|
| | | addXianyuanCoin, reason = FBHelpBattle.DoFBAddXianyuanCoin(curPlayer, mapID, lineID)
|
| | | overDict[FBCommon.Over_xianyuanCoin] = [addXianyuanCoin, reason]
|
| | | needSyncFBData = False
|
| | | else:
|
| | | curPlayer.SetDict(ChConfig.Def_PlayerKey_IsInFBOnDay, 0)
|
| | | FBHelpBattle.DoFBHelpBattleFinish(curPlayer, mapID, lineID)
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_MunekadoTrialEx, 1)
|
| | | PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_MunekadoTrial, 1)
|
| | | #=======================================================================================
|
| | |
| | | return True
|
| | |
|
| | | ## 助战扫荡结果
|
| | | def OnPlayerFBHelpBattleSweepResult(curPlayer, mapID, lineID, helpBattlePlayerDict, addXianyuanCoin, reason):
|
| | | def OnPlayerFBHelpBattleSweepResult(curPlayer, mapID, lineID, helpBattlePlayerDict):
|
| | | #扣门票要在公共逻辑中完成
|
| | |
|
| | | refreshNPCList = __GetZMSLnpcCfg(lineID, mapID)[0]
|
| | |
| | | if not lastNPCList:
|
| | | return
|
| | | killNPCID = lastNPCList[0][0] # 默认最后一波的NPCID为通关boss奖励ID
|
| | | GameWorld.DebugLog("扫荡宗门试炼: killNPCID=%s,addXianyuanCoin=%s,reason=%s,helpBattlePlayerDict=%s" |
| | | % (killNPCID, addXianyuanCoin, reason, helpBattlePlayerDict))
|
| | | GameWorld.DebugLog("扫荡宗门试炼: killNPCID=%s,helpBattlePlayerDict=%s" |
| | | % (killNPCID, helpBattlePlayerDict))
|
| | |
|
| | | star = 5
|
| | | EventReport.WriteEvent_FB(curPlayer, mapID, lineID, ChConfig.CME_Log_End, 0, 1)
|
| | |
| | | # 通知结果
|
| | | overDict = {FBCommon.Over_grade:star,FBCommon.Over_dataMapID:mapID,FBCommon.Over_isPass:1, FBCommon.Over_isSweep:1}
|
| | | overDict[FBCommon.Over_helpPlayer] = helpBattlePlayerDict
|
| | | overDict[FBCommon.Over_xianyuanCoin] = [addXianyuanCoin, reason]
|
| | | overDict[FBCommon.Over_itemInfo] = jsonItemList
|
| | | FBCommon.Notify_FB_Over(curPlayer, overDict)
|
| | | return True
|