| | |
| | | def OnChangeMapAsk(ask, tick):
|
| | | return IPY_GameWorld.cmeAccept
|
| | |
|
| | |
|
| | | ## 进副本
|
| | | # @param curPlayer
|
| | | # @param tick
|
| | | # @return None
|
| | | def DoEnterFB(curPlayer, tick):
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | if curPlayer.GetHP() == 0:
|
| | | PlayerControl.PlayerLeaveFB(curPlayer)
|
| | | return
|
| | |
|
| | | # 设置副本公共属性的单独处理,防止队员进入后被修改
|
| | | if not FBCommon.GetHadSetFBPropertyMark():
|
| | | lineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqFBFuncLine)
|
| | | FBCommon.SetFBPropertyMark(lineID)
|
| | | |
| | | GameWorld.DebugLog("DoEnterFB...lineID=%s" % FBCommon.GetFBPropertyMark(), playerID)
|
| | | lineID = PlayerControl.GetFBFuncLineID(curPlayer) |
| | | GameWorld.DebugLog("DoEnterFB...lineID=%s" % lineID, playerID)
|
| | | hadDelTicket = FBCommon.GetHadDelTicket(curPlayer)
|
| | | if not hadDelTicket:
|
| | | GameWorld.DebugLog('扣门票!')
|
| | | FBCommon.SetHadDelTicket(curPlayer)
|
| | | canEnterLine = PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_BossHome)
|
| | | lineID = FBCommon.GetFBPropertyMark()
|
| | | if lineID+1 > canEnterLine:
|
| | | costGold = __GetEnterCostMoney(lineID)
|
| | | costMoneyList = PlayerControl.HaveMoneyEx(curPlayer, ShareDefine.TYPE_Price_Gold_Paper_Money, costGold)
|
| | |
| | | infoDict = {"MapID":mapID,"LineID":lineID}
|
| | | for moneyType, moneyNum in costMoneyList:
|
| | | if not PlayerControl.PayMoney(curPlayer, moneyType, moneyNum, ChConfig.Def_Cost_EnterFB, infoDict):
|
| | | GameWorld.DebugLog("仙玉不足!costGold=%s" % costGold)
|
| | | GameWorld.Log("仙玉不足!costGold=%s" % costGold)
|
| | | PlayerControl.PlayerLeaveFB(curPlayer)
|
| | | return
|
| | | EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_BossHome, lineID, ChConfig.CME_Log_Start)
|
| | |
|
| | |
| | | # @remarks 玩家主动离开副本.
|
| | | def DoPlayerDead(curPlayer):
|
| | | FBCommon.Notify_FB_Over(curPlayer, {FBCommon.Over_isPass:0})
|
| | | lineID = FBCommon.GetFBPropertyMark()
|
| | | lineID = PlayerControl.GetFBFuncLineID(curPlayer) |
| | | leaveTime = int(FBCommon.GetFBLineStepTime(ChConfig.Def_FBMapID_BossHome, lineID))
|
| | | curPlayer.Sync_TimeTick(IPY_GameWorld.tttLeaveMap, 0, leaveTime*1000, True)
|
| | | return |