hxp
2026-03-12 5c8b87ef0812652af80655923ac5ca277b346f61
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
@@ -18,11 +18,8 @@
import IPY_GameWorld
import PlayerControl
import GameWorldProcess
import CrossRealmPlayer
import DataRecordPack
import ReadChConfig
import ShareDefine
import PyGameData
import FBCommon
import GameObj
@@ -482,36 +479,6 @@
def DoEnterFBLogic(curPlayer, tick):
    curPlayerID = curPlayer.GetID()
    
    if GameWorld.IsCrossServer():
        mapID = GameWorld.GetMap().GetMapID()
        mapID = FBCommon.GetRecordMapID(mapID)
        gameWorld = GameWorld.GetGameWorld()
        copyMapID = gameWorld.GetCopyMapID()
        dataDict = {"PlayerID":curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(), "AccID":curPlayer.GetAccID(),
                    "recordMapID":mapID, "mapID":GameWorld.GetMap().GetMapID(), "realMapID":gameWorld.GetRealMapID(), "copyMapID":copyMapID}
        if mapID in ChConfig.Def_CrossDynamicLineMap:
            fbZoneID = FBCommon.GetCrossDynamicLineMapZoneID()
            fbFuncLineID = FBCommon.GetCrossDynamicLineMapFuncLineID()
            playerZoneID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqCrossFBZoneID)
            playerFuncLineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqCrossFBFuncLine)
            # 跨服排位分区与玩家分区可能不一样
            if (fbZoneID != playerZoneID or fbFuncLineID != playerFuncLineID) and mapID not in []:
                GameWorld.ErrLog("DoEnterFB 玩家与当前副本线路所属分区或功能分线不同,踢出玩家!fbZoneID=%s,playerZoneID=%s,fbFuncLineID=%s,playerFuncLineID=%s"
                                 % (fbZoneID, playerZoneID, fbFuncLineID, playerFuncLineID), curPlayerID)
                CrossRealmPlayer.PlayerExitCrossServer(curPlayer)
                dataDict.update({"Error":"zoneLineIDError"})
                DataRecordPack.SendEventPack("CrossFBEnter", dataDict, curPlayer)
                return
            GameWorld.Log("玩家进入跨服副本动态分配的线路: fbZoneID=%s,playerZoneID=%s,fbFuncLineID=%s,playerFuncLineID=%s"
                          % (fbZoneID, playerZoneID, fbFuncLineID, playerFuncLineID), curPlayerID)
            dataDict.update({"fbZoneID":fbZoneID, "fbFuncLineID":fbFuncLineID, "playerZoneID":playerZoneID, "playerFuncLineID":playerFuncLineID})
        if copyMapID not in PyGameData.g_crossPlayerServerGroupIDInfo:
            PyGameData.g_crossPlayerServerGroupIDInfo[copyMapID] = {}
        playerServerGroupIDDict = PyGameData.g_crossPlayerServerGroupIDInfo[copyMapID]
        playerServerGroupIDDict[curPlayerID] = PlayerControl.GetPlayerServerGroupID(curPlayer)
        DataRecordPack.SendEventPack("CrossFBEnter", dataDict, curPlayer)
    # 自伸缩副本根据玩家进入开启,主动调用一次,避免间隔调用时机未触发导致逻辑错乱
    GameWorldProcess.EnterOpenFB(tick)
    
@@ -1026,37 +993,32 @@
        PlayerControl.PlayerLeaveFB(curPlayer)
    return
## 副本每周逻辑
#  @param tick 当前时间
#  @return None or False
#  @remarks 函数详细说明.
def OnWeek(tick):
    do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())
    callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnWeek"))
    if callFunc == None:
        return False
    #执行副本逻辑
    callFunc(tick)
def OnWeek():
    for key, mapIDList in ChConfig.Def_FB_MapID.items():
        if not mapIDList:
            continue
        callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (key, "OnWeek"))
        if callFunc:
            callFunc()
    return
## 副本每日逻辑
#  @param tick 当前时间
#  @return None or False
#  @remarks 函数详细说明.
def OnDay(tick):
    do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())
    callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnDay"))
    if callFunc == None:
        #GameWorld.Log("副本逻辑不可使用   GameLogic_%d"%(mapID))
        return False
    #执行副本逻辑
    callFunc(tick)
def OnDay():
    for key, mapIDList in ChConfig.Def_FB_MapID.items():
        if not mapIDList:
            continue
        callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (key, "OnDay"))
        if callFunc:
            callFunc()
    return
## 副本每周逻辑-玩家, 不管玩家是否在该副本地图中都会触发
def OnFBPlayerOnWeek(curPlayer, onWeekType):
    for key, mapIDList in ChConfig.Def_FB_MapID.items():
        if not mapIDList:
            continue
        callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (key, "OnFBPlayerOnWeek"))
        if callFunc:
            callFunc(curPlayer)
    return
## 副本每日逻辑-玩家, 不管玩家是否在该副本地图中都会触发