8333 【主干】【后端】boss之家死亡在复活点复活,不退出副本(支持和中立地图一样可返回最后一次所在的野外地图;支持从副本退出后返回boss之家不重复扣除消耗)
4个文件已修改
78 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BossHome.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -1857,6 +1857,9 @@
# 不可切换PK模式的地图
Def_CanNotChangeAtkModelMap = []
# 从副本退出时,可以返回进入前的副本ID
Def_CanBackFBMap = [Def_FBMapID_BossHome]
# 当日换战盟不可进入的地图 (本项目为24小时)
Def_ChangeFamilyCanNotEnterMap = []
@@ -3357,6 +3360,10 @@
Def_Player_Dict_FromPosX = 'FromPosX'    # 最后一次离开的非中立常规地图,坐标X
Def_Player_Dict_FromPosY = 'FromPosY'    # 最后一次离开的非中立常规地图,坐标X
Def_Player_Dict_FromLineID = 'FromLineID'    # 最后一次离开的非中立常规地图,线路ID
Def_Player_Dict_FromFBMapID = 'FromFBMapID'    # 最后一次离开的可返回的副本ID,地图ID
Def_Player_Dict_FromFBPosX = 'FromFBPosX'    # 最后一次离开的可返回的副本ID,坐标X
Def_Player_Dict_FromFBPosY = 'FromFBPosY'    # 最后一次离开的可返回的副本ID,坐标X
Def_Player_Dict_FromFBLineID = 'FromFBLineID'    # 最后一次离开的可返回的副本ID,线路ID
Def_PlayerKey_CrossRegisterMap = "CrossRegisterMap"  #跨服注册活动地图, dataMapID
Def_PlayerKey_IsCrossPKMatching = "IsCrossPKMatching"  #是否跨服匹配中
@@ -3379,6 +3386,7 @@
Def_Player_Dict_HighChangeLineID = "HighChangeLineID"     # 高线切换到低线路记录
Def_Player_Dict_FBFirstEnterRecord = "FBFEntRec"  # 记录副本是否参与过,按位0 1 存储表示
Def_FBStar_MaxKeyCnt = 5 # 暂时每个副本ID支持9*5个lineID记录
Def_Player_Dict_EnterFBFree = "EnterFBFree" # 是否免费进入副本
Def_Player_Dict_ReqFBFuncLine = "ReqFBFuncLine" # 请求进入的副本功能线路
Def_Player_Dict_ReqCrossFBZoneID = "ReqCrossFBZoneID" # 请求进入跨服的跨服分区ID
Def_Player_Dict_ReqCrossFBFuncLine = "ReqCrossFBFuncLine" # 请求进入跨服的副本功能线路
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py
@@ -570,6 +570,9 @@
    if callFunc != None:
        GameWorld.Log("DoEnterFBLogic...", curPlayer.GetPlayerID())
        callFunc(curPlayer, tick)
    #扣费一般都是在进入副本逻辑里处理,免费只有一次性的,所以放在后面进行重置,防止一直免费
    if curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFBFree):
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_EnterFBFree, 0)
    return
def OnCallHelpBattleOK(curPlayer, tick):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BossHome.py
@@ -92,7 +92,7 @@
        GameWorld.DebugLog('扣门票!')
        FBCommon.SetHadDelTicket(curPlayer)
        canEnterLine = PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_BossHome)
        if lineID+1 > canEnterLine:
        if lineID+1 > canEnterLine and not curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_EnterFBFree):
            costGold = __GetEnterCostMoney(lineID)
            costMoneyList = PlayerControl.HaveMoneyEx(curPlayer, ShareDefine.TYPE_Price_Gold_Paper_Money, costGold)
            mapID = GameWorld.GetMap().GetMapID()
@@ -139,7 +139,7 @@
# @param None
# @return 无意义
def OnResetFBRebornPlacePos(curPlayer, rebornPlace, tick):
    lineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqFBFuncLine)
    lineID = PlayerControl.GetFBFuncLineID(curPlayer)
    ipyEnterPosInfo = FBCommon.GetFBLineEnterPosInfo(ChConfig.Def_FBMapID_BossHome, lineID)
    posX, posY = ipyEnterPosInfo[:2]
    curPlayer.ResetPos(posX, posY)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -1497,24 +1497,30 @@
#        summonList.append(summonNPC)
#        summonIndex += 1
        
    changeMapID = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ChangeMapID)
    # 更新最后一次离开的非中立常规地图, 从中立地图退出时需要回到该地方,必须在 DoResetWorldPosAndClear 之前更新
    if GameWorld.GetMap().GetMapFBType() == IPY_GameWorld.fbtNull and curPlayer.GetMapID() not in IpyGameDataPY.GetFuncEvalCfg("MapLine", 4):
        mapID = curPlayer.GetMapID()
        posX = curPlayer.GetPosX()
        posY = curPlayer.GetPosY()
        lineID = curPlayer.GetClientLineID()
        lineID = curPlayer.GetClientLineID() # 常规地图用分线ID
        NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FromMapID, mapID)
        NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FromPosX, posX)
        NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FromPosY, posY)
        NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FromLineID, lineID)
        GameWorld.DebugLog("最后一次离开的非中立常规地图更新!mapID=%s,lineID=%s,Pos(%s,%s)" % (mapID, lineID, posX, posY))
    else:
        mapID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromMapID)
        posX = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromPosX)
        posY = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromPosY)
        lineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromLineID)
        GameWorld.DebugLog("最后一次离开的非中立常规地图不变!mapID=%s,lineID=%s,Pos(%s,%s)" % (mapID, lineID, posX, posY))
    # 当前是可返回的副本地图 且 目标地图为副本
    elif curPlayer.GetMapID() in ChConfig.Def_CanBackFBMap and curPlayer.GetMapID() != changeMapID \
        and GameWorld.GetMap().GetMapFBTypeByMapID(changeMapID) != IPY_GameWorld.fbtNull:
        mapID = curPlayer.GetMapID()
        posX = curPlayer.GetPosX()
        posY = curPlayer.GetPosY()
        lineID = GetFBFuncLineID(curPlayer) # 副本用功能线路ID
        NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FromFBMapID, mapID)
        NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FromFBPosX, posX)
        NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FromFBPosY, posY)
        NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FromFBLineID, lineID)
        GameWorld.DebugLog("进入副本时,最后一次离开的可返回的副本ID更新!mapID=%s,lineID=%s,Pos(%s,%s)" % (mapID, lineID, posX, posY))
        
    # 从副本中切图
    if GameWorld.GetMap().GetMapFBType() != IPY_GameWorld.fbtNull:
@@ -1553,13 +1559,17 @@
    if GameWorld.IsCrossServer():
        CrossRealmPlayer.PlayerExitCrossServer(curPlayer)
        return
    funcLineID = 0
    enterFBFree = False
    #中立地图回到上一次非中立常规地图    
    if curPlayer.GetMapID() in IpyGameDataPY.GetFuncEvalCfg("MapLine", 4):
    if curPlayer.GetMapID() in IpyGameDataPY.GetFuncEvalCfg("MapLine", 4) or curPlayer.GetMapID() in ChConfig.Def_CanBackFBMap:
        mapID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromMapID)
        posX = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromPosX)
        posY = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromPosY)
        lineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromLineID)
        # 重置
        NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FromMapID, 0)
        # 老号支持,本来就在中立地图的,返回新手村
        if not mapID:
            # {ְҵ:[dataMapID,posX,posY], ...}
@@ -1575,11 +1585,24 @@
                mapID, posX, posY = mapInfoList[0]
    #离开副本
    else:
        mapID = curPlayer.GetFromMapID()
        posX = curPlayer.GetFromPosX()
        posY = curPlayer.GetFromPosY()
        lineID = curPlayer.GetFromLineID()
        fromFBMapID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromFBMapID)
        # 回到上一次可返回的副本里
        if fromFBMapID:
            mapID = fromFBMapID
            posX = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromFBPosX)
            posY = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromFBPosY)
            lineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FromFBLineID)
            funcLineID = lineID # 回副本的要指定功能线路ID
            enterFBFree = True # 返回的免费进入
            # 重置
            NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FromFBMapID, 0)
            GameWorld.DebugLog("离开副本,返回可之前可返回的副本! fromFBMapID=%s,lineID=%s,posXY(%s,%s)" % (mapID, lineID, posX, posY))
        else:
            mapID = curPlayer.GetFromMapID()
            posX = curPlayer.GetFromPosX()
            posY = curPlayer.GetFromPosY()
            lineID = curPlayer.GetFromLineID()
    if mapID == curPlayer.GetMapID():
        # 如果在同一张地图, 取DB重生点, 普通地图下线重上时FromMapID会被设置为本地图
        gameMap = GameWorld.GetMap()
@@ -1602,7 +1625,7 @@
    #    ChangePlayerAction(curPlayer, IPY_GameWorld.paNull)
    #===============================================================================================
    
    PlayerResetWorldPosFB(curPlayer, mapID, posX, posY, False, lineID)
    PlayerResetWorldPosFB(curPlayer, mapID, posX, posY, False, lineID, funcLineID=funcLineID, enterFBFree=enterFBFree)
    
    #在空闲或者移动状态下,才能锁死玩家
    if curPlayer.GetPlayerAction() in [IPY_GameWorld.paNull] or curPlayer.IsMoving():
@@ -1933,7 +1956,7 @@
        curMapID = GameWorld.GetMap().GetMapID()
        if curMapID in fbEnableTransportMap and mapID in fbEnableTransportMap[curMapID]:
            canFBMoveToOther = True
        if curMapID == ChConfig.Def_FBMapID_BossHome:
        if curMapID in ChConfig.Def_CanBackFBMap:
            canFBMoveToOther = True
        toMapFBType = GameWorld.GetMap().GetMapFBTypeByMapID(mapID)
        if toMapFBType == IPY_GameWorld.fbtNull:
@@ -2020,7 +2043,7 @@
# @param funcLineID 副本功能线路ID,由前端请求
# @return 返回值无意义
# @remarks 玩家切换到指定副本ID
def PlayerResetWorldPosFB(curPlayer, mapID, posX, posY, takeTruck, fbID=0, msg='', canLock=True, funcLineID=0):
def PlayerResetWorldPosFB(curPlayer, mapID, posX, posY, takeTruck, fbID=0, msg='', canLock=True, funcLineID=0, enterFBFree=False):
    '''
    参数说明:
        @param fbID:
@@ -2077,9 +2100,11 @@
    msg = FBLogic.GetPlayerResetWorldPosFBMsg(curPlayer, mapID, funcLineID)
    
    NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_ReqFBFuncLine, funcLineID)
    GameWorld.Log("玩家请求开始切图: sceneMapID=%s,posX=%s,posY=%s,takeTruck=%s,fbID=%s,msg=%s,funcLineID=%s,tick=%s,lastTransTick=%s" 
                  % (sceneMapID, posX, posY, takeTruck, fbID, msg, funcLineID, tick, lastTransTick), curPlayer.GetPlayerID())
    if enterFBFree:
        NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_EnterFBFree, 1)
        GameWorld.DebugLog("    本次免费进入副本!")
    curPlayer.ResetWorldPosReq(sceneMapID, posX, posY, takeTruck, fbID, msg)
    curPlayer.SetDict(ChConfig.Def_PlayerKey_ChangeMapID, sceneMapID)