8353 【后端】个人BOSS修改(支持免费进入也可增加活跃、成就等额外逻辑,只是不加进入次数)
2个文件已修改
17 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_PersonalBoss.py 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
@@ -1543,7 +1543,10 @@
#  @param fbID 副本id
#  @param addCount 增加次数
#  @return 返回值无意义
def AddEnterFBCount(curPlayer, fbID, addCount=1, lineBit=-1):
def AddEnterFBCount(curPlayer, fbID, addCount=1, lineBit=-1, isFree=False):
    ## @param isFree: 是否免费进入的,免费的不增加实际进入次数,但需要触发进入次数额外处理,如活跃、成就等
    addCountEx = addCount
    addCount = 0 if isFree else addCount
    fbID = GetRecordMapID(fbID)
    enterCntKey = ChConfig.Def_Player_Dict_EnterFbCntDay % fbID
    enterCnt = curPlayer.NomalDictGetProperty(enterCntKey)
@@ -1560,8 +1563,8 @@
        addCount = updCnt-enterCnt
        PlayerControl.NomalDictSetProperty(curPlayer, enterCntKey, updCnt)
        
        PlayerActivity.OnEnterFBActivity(curPlayer, fbID, updCnt, addCount)
        PlayerSuccess.AddEnterFBSuccess(curPlayer, fbID, addCount)
        PlayerActivity.OnEnterFBActivity(curPlayer, fbID, updCnt, addCountEx)
        PlayerSuccess.AddEnterFBSuccess(curPlayer, fbID, addCountEx)
        updValue = updCnt
    GameWorld.DebugLog("    AddEnterFBCount fbID=%s, addCount=%s, lineBit=%s, enterCnt=%s,updValue=%s" 
                       % (fbID, addCount, lineBit, enterCnt, updValue), curPlayer.GetPlayerID())
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_PersonalBoss.py
@@ -70,15 +70,17 @@
    if FBCommon.GetCustomMapStep(curPlayer, mapID, lineID) != ChConfig.CustomMapStep_Fight:
        return
    
    isFree = False
    curfbStar = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False, [mapID])
    # 首次过关不扣次数
    if not curfbStar:
        isFree = True
        GameWorld.DebugLog("    首次过关!mapID=%s,lineID=%s" % (mapID, lineID), curPlayer.GetPlayerID())
        GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, 1, False, [mapID])
        FBCommon.Sync_FBPlayerFBInfoData(curPlayer, mapID) # 同步信息
    else:
        #增加进入次数
        FBCommon.AddEnterFBCount(curPlayer, ChConfig.Def_FBMapID_PersonalBoss)
    #增加进入次数
    FBCommon.AddEnterFBCount(curPlayer, ChConfig.Def_FBMapID_PersonalBoss, isFree=isFree)
        
    FBCommon.DelFBEnterTicket(curPlayer, ChConfig.Def_FBMapID_PersonalBoss)
    PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_VIPBOSS, 1)