| | |
| | | # @param lineID 线路id
|
| | | # @return None
|
| | | def __CheckEnter(curPlayer, mapID, lineID):
|
| | | if lineID == 0 or curPlayer.GetTeamLV() == IPY_GameWorld.tmlLeader:
|
| | | if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Official):
|
| | | GameWorld.DebugLog("爵位境界功能未开启, 无法开启渡劫!curLV=%s" % curPlayer.GetLV())
|
| | | return False
|
| | | if lineID == 0 or curPlayer.GetTeamLV() == IPY_GameWorld.tmlLeader or (lineID == 1 and curPlayer.GetTeamID() == 0):
|
| | | curRealmLV = curPlayer.GetOfficialRank()
|
| | | realmIpyData = PlayerPrestigeSys.GetRealmIpyData(curRealmLV)
|
| | | if not realmIpyData:
|
| | |
| | | # if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmFBIsOpen) != 1:
|
| | | # return False
|
| | |
|
| | | if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Official):
|
| | | GameWorld.DebugLog("爵位境界功能未开启, 无法开启渡劫!curLV=%s" % curPlayer.GetLV())
|
| | | return False
|
| | | |
| | | return True
|
| | |
|
| | |
|
| | |
| | | FBCommon.SetFBStep(FB_Step_MapPrepare, tick)
|
| | |
|
| | |
|
| | | |
| | | fbPlayerCnt = gameFB.GetGameFBDictByKey(ChConfig.Def_FB_NPCStrengthenPlayerCnt)
|
| | | DuJieFBCfg = GetRealmFBTimeCfg()
|
| | | if not gameFB.GetGameFBDictByKey(DuJieFB_LeaderPlayerID):
|
| | | #重置属性加成
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmFBAttrAdd % attrID, 0)
|
| | |
|
| | | GameWorld.DebugLog('玩家进入副本')
|
| | | if lineID == 0 or curPlayer.GetTeamLV() == IPY_GameWorld.tmlLeader:
|
| | | |
| | | if lineID == 0 or fbPlayerCnt == 1 or curPlayer.GetTeamLV() == IPY_GameWorld.tmlLeader:
|
| | | __SetFBLeaderPlayer(curPlayer)
|
| | | if gameFB.GetFBStep() == FB_Step_Fighting:
|
| | | __OnDuJieFBStart(tick)
|
| | | isHelpFight = lineID == 1 and curPlayer.GetTeamLV() != IPY_GameWorld.tmlLeader
|
| | | isHelpFight = lineID == 1 and curPlayer.GetTeamLV() != IPY_GameWorld.tmlLeader and fbPlayerCnt > 1
|
| | | joinType = FBCommon.GetFBJoinType(curPlayer, isHelpFight)
|
| | | EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_DuJie, lineID, ChConfig.CME_Log_Start, joinType)
|
| | |
|
| | |
| | | return
|
| | |
|
| | | def __OnDuJieFBStart(tick):
|
| | | lineID = FBCommon.GetFBPropertyMark()
|
| | | if not GameWorld.GetGameFB().GetGameFBDictByKey(DuJieFB_LeaderPlayerID):
|
| | | findLeader = False
|
| | | playerManager = GameWorld.GetMapCopyPlayerManager()
|
| | |
| | | curPlayer = playerManager.GetPlayerByIndex(index)
|
| | | if not curPlayer:
|
| | | continue
|
| | | if curPlayer.GetTeamLV() == IPY_GameWorld.tmlLeader:
|
| | | if curPlayer.GetTeamLV() == IPY_GameWorld.tmlLeader or (lineID == 1 and curPlayer.GetTeamID() == 0):
|
| | | __SetFBLeaderPlayer(curPlayer)
|
| | | findLeader = True
|
| | | break
|
| | | if not findLeader:
|
| | | GameWorld.Log(' 准备倒计时已过,队长仍未进入副本!!! ')
|
| | | FBCommon.DoLogic_FBKickAllPlayer()
|
| | | return
|
| | | DuJieFBCfg = GetRealmFBTimeCfg()
|
| | | bossID = GetDuJieBossID()
|
| | | if not bossID:
|
| | | return
|
| | | mapID = GameWorld.GetMap().GetMapID()
|
| | | lineID = FBCommon.GetFBPropertyMark()
|
| | | |
| | | refreshBossMark = FBCommon.GetFBLineRefreshNPC(mapID, lineID)
|
| | | NPCCustomRefresh.SetNPCRefresh(refreshBossMark, [bossID])
|
| | |
|
| | |
| | |
|
| | | curStar = gameFB.GetGameFBDictByKey(DuJieFB_Star)
|
| | | realmLV = gameFB.GetGameFBDictByKey(DuJieFB_RealmLV)
|
| | | |
| | | realmIpyData = PlayerPrestigeSys.GetRealmIpyData(realmLV)
|
| | | lineID = FBCommon.GetFBPropertyMark()
|
| | | leaveTick = invadeCfg[Def_Time_Leave] * 1000
|
| | | overDict = {FBCommon.Over_costTime:costTime,FBCommon.Over_grade:curStar, FBCommon.Over_leaderID:leaderPlayerID}
|
| | | for i in xrange(copyMapPlayerManager.GetPlayerCount()):
|
| | | playerCnt = copyMapPlayerManager.GetPlayerCount()
|
| | | for i in xrange(playerCnt):
|
| | |
|
| | | curPlayer = copyMapPlayerManager.GetPlayerByIndex(i)
|
| | |
|
| | |
| | | FBCommon.SyncFBEnterTick(curPlayer)
|
| | | else:
|
| | | #帮忙打的给奖励
|
| | | __GiveTeamAward(curPlayer, leaderPlayer, realmLV, curStar)
|
| | | __GiveTeamAward(curPlayer, leaderPlayer, realmIpyData, curStar)
|
| | | EventShell.EventRespons_DujieFBHelpPass(curPlayer)
|
| | | |
| | | realmIpyData = PlayerPrestigeSys.GetRealmIpyData(realmLV)
|
| | | FBCommon.AddFBHelpPoint(curPlayer, ChConfig.Def_FBMapID_DuJie, 1)
|
| | | |
| | | if realmIpyData and realmIpyData.GetIsBigRealm():
|
| | | #成就
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_DujieFBHelpPass, 1)
|
| | | |
| | | if playerCnt > 1: #多人组队渡劫
|
| | | EventShell.EventRespons_FBEvent(curPlayer, 'teamdujie')
|
| | |
|
| | | return
|
| | |
|
| | | def __GiveTeamAward(curPlayer, leaderPlayer, realmLV, curStar):
|
| | | def __GiveTeamAward(curPlayer, leaderPlayer, realmIpyData, curStar):
|
| | | #帮忙打的给奖励
|
| | | realmIpyData = PlayerPrestigeSys.GetRealmIpyData(realmLV)
|
| | | if not realmIpyData:
|
| | | return
|
| | | teamAwardDict = realmIpyData.GetTeamAward()
|