| | |
| | | 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
|
| | |
|
| | |
|
| | |
| | | # 如果在副本中过天,则只给物品奖励,不变更过关信息
|
| | | 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
|