|  |  |  | 
|---|
|  |  |  | if gameWorld.GetCloseFBTick() > 0: | 
|---|
|  |  |  | #不可进入 | 
|---|
|  |  |  | return False | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if askStruct.GetTeamLV() == IPY_GameWorld.tmlLeader: | 
|---|
|  |  |  | '''原因: | 
|---|
|  |  |  | 队长退出组队副本,其他队员还在里面,此时副本不会被关闭 | 
|---|
|  |  |  | 队长在队伍ID不变的情况下又组了其他人,然后又想进去该副本,那么这时会进入之前队员还在的那条队伍分线,导致队伍线路错乱 | 
|---|
|  |  |  | 所以此处不允许该队长进入,并提示其等待或重新建队进入 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | FBinCantEnter 副本清理中,请等待关闭或重新创建队伍进入 | 
|---|
|  |  |  | ''' | 
|---|
|  |  |  | return False, "FBinCantEnter" | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #副本在等待关闭状态不允许玩家进入 | 
|---|
|  |  |  | return (gameWorld.GetOpenState() != IPY_GameWorld.fbosWaitForClose) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | #根据副本需求, 过滤NPC | 
|---|
|  |  |  | for curNPC in gameNPCList: | 
|---|
|  |  |  | #尸体不处理 | 
|---|
|  |  |  | if curNPC.GetHP() <= 0: | 
|---|
|  |  |  | if GameObj.GetHP(curNPC) <= 0: | 
|---|
|  |  |  | continue | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #召唤兽特殊判断 | 
|---|
|  |  |  | 
|---|
|  |  |  | fbIpyData = GetFBIpyData(mapID) | 
|---|
|  |  |  | maxTimes = fbIpyData.GetDayTimes() | 
|---|
|  |  |  | MWPrivilegeID = fbIpyData.GetExtraTimesMWPriID() | 
|---|
|  |  |  | wmpIpyData = PlayerMagicWeapon.GetMagicWeaponPrivilege(curPlayer, MWPrivilegeID) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | mwAddCnt = 0#wmpIpyData.GetEffectValue() if wmpIpyData else 0 | 
|---|
|  |  |  | extraTimesVIPPriID = fbIpyData.GetExtraTimesVIPPriID() | 
|---|
|  |  |  | extraCnt = PlayerVip.GetPrivilegeValue(curPlayer, extraTimesVIPPriID) | 
|---|
|  |  |  | 
|---|
|  |  |  | enterCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFbCntDay % mapID) | 
|---|
|  |  |  | maxTimes = fbIpyData.GetDayTimes() | 
|---|
|  |  |  | MWPrivilegeID = fbIpyData.GetExtraTimesMWPriID() | 
|---|
|  |  |  | wmpIpyData = PlayerMagicWeapon.GetMagicWeaponPrivilege(curPlayer, MWPrivilegeID) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | mwAddCnt = 0#wmpIpyData.GetEffectValue() if wmpIpyData else 0 | 
|---|
|  |  |  | maxTimes += mwAddCnt #法宝增加的次数加到基础次数里 | 
|---|
|  |  |  | extraTimesVIPPriID = fbIpyData.GetExtraTimesVIPPriID() | 
|---|
|  |  |  | 
|---|
|  |  |  | return | 
|---|
|  |  |  | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_BuyFbCntDay % mapID, hasBuyCnt + 1) | 
|---|
|  |  |  | Sync_FBPlayerFBBuyCount(curPlayer, [mapID]) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | PlayerControl.NotifyCode(curPlayer, 'FBEnterTimeBuy', [mapID]) | 
|---|
|  |  |  | lastRegainTime= curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FbCntRegainStartTime % mapID) | 
|---|
|  |  |  | if lastRegainTime: | 
|---|
|  |  |  | maxDayTimes = ipyData.GetDayTimes() | 
|---|
|  |  |  | 
|---|
|  |  |  | ## 副本行为 - 鼓舞buff | 
|---|
|  |  |  | #  @param curPlayer 玩家 | 
|---|
|  |  |  | #  @param key 副本玩家字典key | 
|---|
|  |  |  | #  @param encourageType 1-铜钱 2-消耗绑玉或仙玉 | 
|---|
|  |  |  | #  @param encourageType 金钱类型 | 
|---|
|  |  |  | #  @param tick 当前时间 | 
|---|
|  |  |  | #  @param isMaxlv 是否直接满级 | 
|---|
|  |  |  | #  @return None | 
|---|
|  |  |  | 
|---|
|  |  |  | encourageLV = gameFB.GetPlayerGameFBDictByKey(curPlayerID, key) | 
|---|
|  |  |  | encourageCntKey = 'FbEncourageCnt_%s' % encourageType | 
|---|
|  |  |  | encourageCnt = gameFB.GetPlayerGameFBDictByKey(curPlayerID, encourageCntKey) | 
|---|
|  |  |  | if encourageLV >= 10: | 
|---|
|  |  |  | maxLV = IpyGameDataPY.GetFuncEvalCfg('FBEncourageBuff', 2, {}).get(curMapID, 0) | 
|---|
|  |  |  | if encourageLV >= maxLV: | 
|---|
|  |  |  | PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_93643") | 
|---|
|  |  |  | return | 
|---|
|  |  |  | if encourageCnt >= maxCnt: | 
|---|
|  |  |  | if encourageType == 1: | 
|---|
|  |  |  | if encourageType == IPY_GameWorld.TYPE_Price_Silver_Money: | 
|---|
|  |  |  | PlayerControl.NotifyCode(curPlayer, "Xjmj_CopperInspireFull") | 
|---|
|  |  |  | else: | 
|---|
|  |  |  | PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_93643") | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | encourageCost = ipyData.GetMoneyCount() | 
|---|
|  |  |  | if encourageType == 1: | 
|---|
|  |  |  | costMoneyList = [[IPY_GameWorld.TYPE_Price_Silver_Money, encourageCost]] | 
|---|
|  |  |  | else: | 
|---|
|  |  |  | costMoneyList = PlayerControl.HaveMoneyEx(curPlayer, ShareDefine.TYPE_Price_Gold_Paper_Money, encourageCost) | 
|---|
|  |  |  | encourageCost = eval(ipyData.GetMoneyCount()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | costMoneyList = PlayerControl.HaveMoneyEx(curPlayer, encourageType, encourageCost) | 
|---|
|  |  |  | if not costMoneyList: | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | gameFB.SetPlayerGameFBDict(curPlayerID, key, encourageLV+1) | 
|---|
|  |  |  | gameFB.SetPlayerGameFBDict(curPlayerID, encourageCntKey, encourageCnt+1) | 
|---|
|  |  |  | #GameWorld.Log("FbEncourageBuff encourage nextLV=%s success" % encourageLV) | 
|---|
|  |  |  | PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_628920", [(encourageLV+1)*10]) | 
|---|
|  |  |  | addHurtNum = IpyGameDataPY.GetFuncEvalCfg('FBEncourageBuff', 3, {}).get(curMapID, 0) | 
|---|
|  |  |  | PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_628920", [(encourageLV+1)*addHurtNum]) | 
|---|
|  |  |  | SendFBEncourageInfo(curPlayer, encourageLV+1) | 
|---|
|  |  |  | #成就 | 
|---|
|  |  |  | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_FBEncourage, 1, [curMapID]) | 
|---|
|  |  |  | 
|---|
|  |  |  | #  @return None | 
|---|
|  |  |  | def SendFBEncourageInfo(curPlayer, lv): | 
|---|
|  |  |  | #//A3 0A 副本鼓舞信息通知 #tagMCFBEncourageInfo | 
|---|
|  |  |  | curMapID = curPlayer.GetMapID() | 
|---|
|  |  |  | curMapID = GetRecordMapID(curMapID) | 
|---|
|  |  |  | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('FbEncourage', {'DataMapID':curMapID}, True) | 
|---|
|  |  |  | if not ipyDataList: | 
|---|
|  |  |  | return | 
|---|
|  |  |  | encourageInfo = ChPyNetSendPack.tagMCFBEncourageInfo() | 
|---|
|  |  |  | encourageInfo.Clear() | 
|---|
|  |  |  | #encourageInfo.LV = lv | 
|---|
|  |  |  | encourageInfo.InfoList = [] | 
|---|
|  |  |  | encourageCntKey = 'FbEncourageCnt_%s' | 
|---|
|  |  |  | gameFB = GameWorld.GetGameFB() | 
|---|
|  |  |  | curPlayerID = curPlayer.GetID() | 
|---|
|  |  |  | encourageInfo.Cnt1 = gameFB.GetPlayerGameFBDictByKey(curPlayerID, encourageCntKey%1) | 
|---|
|  |  |  | encourageInfo.Cnt2 = gameFB.GetPlayerGameFBDictByKey(curPlayerID, encourageCntKey%2) | 
|---|
|  |  |  | NetPackCommon.SendFakePack(curPlayer, encourageInfo) | 
|---|
|  |  |  | for ipyData in ipyDataList: | 
|---|
|  |  |  | inspireType = ipyData.GetInspireType() | 
|---|
|  |  |  | packData = ChPyNetSendPack.tagMCFBEncourageCnt() | 
|---|
|  |  |  | packData.MoneyType = inspireType | 
|---|
|  |  |  | packData.EncourageCnt = gameFB.GetPlayerGameFBDictByKey(curPlayerID, encourageCntKey % inspireType) | 
|---|
|  |  |  | encourageInfo.InfoList.append(packData) | 
|---|
|  |  |  | encourageInfo.Cnt = len(encourageInfo.InfoList) | 
|---|
|  |  |  | NetPackCommon.SendFakePack(curPlayer, encourageInfo) | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ## 获取玩家所在副本区域福利倍值 | 
|---|