8353 【后端】个人BOSS修改(进入次数判断验证,没进入次数时也可以进入未过关过的线路)
| | |
| | | #跨服仙草园
|
| | | Def_FBMapID_CrossGrasslandXian = 32050
|
| | |
|
| | | #前端自定义场景地图
|
| | | ClientCustomScene = [Def_FBMapID_PersonalBoss]
|
| | |
|
| | | #注册上传跨服服务器数据后直接进入跨服服务器的地图
|
| | | RegisterEnter_CrossServerMapIDList = [Def_FBMapID_CrossPenglai, Def_FBMapID_CrossDemonKing, Def_FBMapID_CrossGrasslandLing, Def_FBMapID_CrossGrasslandXian]
|
| | | #跨服地图
|
| | |
| | | import PlayerControl
|
| | | import FBCommon
|
| | | import ChConfig
|
| | | import PlayerFB
|
| | |
|
| | |
|
| | | ## GM命令执行入口
|
| | |
| | | posY = paramList[3] if len(paramList) > 3 else 0
|
| | | if FBCommon.GetFBPDictValue(curPlayer, ChConfig.Def_PDict_LastEnterFBTick % mapID):
|
| | | FBCommon.SetFBPDictValue(curPlayer, ChConfig.Def_PDict_LastEnterFBTick % mapID, 0)
|
| | | if mapID in ChConfig.Def_CrossMapIDList:
|
| | | |
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | | if mapID in ChConfig.ClientCustomScene:
|
| | | PlayerFB.DoEnterCustomScene(curPlayer, mapID, lineID, tick)
|
| | | elif mapID in ChConfig.Def_CrossMapIDList:
|
| | | PlayerControl.PlayerEnterCrossServer(curPlayer, mapID, lineID)
|
| | | else:
|
| | | PlayerControl.PlayerEnterFB(curPlayer, mapID, lineID, posX, posY)
|
| | |
| | |
|
| | | import GameWorld
|
| | | import ChPlayer
|
| | | import PlayerControl
|
| | | import PlayerFB
|
| | |
|
| | | ## GM命令执行入口
|
| | | # @param curPlayer 当前玩家
|
| | |
| | | # @remarks 函数详细说明.
|
| | | def OnExec(curPlayer, paramList):
|
| | | tick = GameWorld.GetGameWorld().GetTick()
|
| | | |
| | | if PlayerControl.GetCustomMapID(curPlayer):
|
| | | PlayerFB.DoExitCustomScene(curPlayer)
|
| | | return
|
| | | |
| | | isAll = paramList[0] if paramList else 0
|
| | | if isAll:
|
| | | copyMapPlayerManager = GameWorld.GetMapCopyPlayerManager()
|
| | |
| | | import NPCCommon
|
| | | import ChConfig
|
| | |
|
| | | ## 是否能够通过活动查询进入
|
| | | def OnEnterFBEvent(curPlayer, mapID, lineID, tick):
|
| | | curfbStar = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False, [mapID])
|
| | | if not curfbStar:
|
| | | #GameWorld.DebugLog("OnEnterFBEvent 首次进入个人boss免费!mapID=%s,lineID=%s" % (mapID, lineID))
|
| | | return True
|
| | | |
| | | enterCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFbCntDay % mapID)
|
| | | maxCnt = FBCommon.GetEnterFBMaxCnt(curPlayer, mapID)
|
| | | if enterCnt >= maxCnt:
|
| | | GameWorld.ErrLog("次数不足,无法进入个人boss! mapID=%s,lineID=%s" % (mapID, lineID), curPlayer.GetPlayerID())
|
| | | return False
|
| | | |
| | | return True
|
| | |
|
| | | ## 是否需要做进入副本通用检查条件逻辑,默认需要检查
|
| | | def OnNeedCheckCanEnterFBComm(curPlayer, mapID, lineID):
|