8360 【主干】仙界秘境修改(刷怪改为一直补充刷怪,不受总击杀数影响;达到指定总击杀数后无法再击杀怪物)
1个文件已修改
54 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BZZD.py 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BZZD.py
@@ -56,6 +56,8 @@
) = range(5)
BZZD_TotalNPCCount = 'BZZD_TotalNPCCount'   # 总需击杀NPC数量
BZZD_LastNPCID = 'BZZD_LastNPCID'   # 最后一只怪NPCID,指定怪物刷完后,后续补刷的怪直接刷该NPCID,防止异常导致怪物不够杀无法结算
BZZD_IsKillAll = 'BZZD_IsKillAll'   # 是否已经击杀到指定怪物数量
FBPlayerDict_KillCnt = 'FBPlayerDict_KillCnt'   # 击杀数
FBPlayerDict_EnterLV = 'FBPlayerDict_EnterLV'   # 进入副本时的等级
@@ -291,9 +293,11 @@
    if lineID not in PyGameData.g_bzzdRefreshNPCListDict:
        return
    refreshNPCList = PyGameData.g_bzzdRefreshNPCListDict[lineID]
    if not refreshNPCList:
        return
    #if not refreshNPCList:
    #    return
    
    isRefresh = False
    gameFB = GameWorld.GetGameFB()
    gameNPC = GameWorld.GetNPCManager()
    customNPCRefreshCount = gameNPC.GetCustomNPCRefreshCount()
    for i in xrange(customNPCRefreshCount):
@@ -301,14 +305,21 @@
        if npcRefresh.GetCount():
            continue
        rMark = npcRefresh.GetRefreshMark()
        npcID = refreshNPCList.pop(0) # 直接按顺序取NPCID
        NPCCustomRefresh.SetNPCRefresh(rMark, [npcID])
        if not refreshNPCList:
            GameWorld.DebugLog("怪全部刷完了,没怪了!")
        if refreshNPCList:
            npcID = refreshNPCList.pop(0) # 直接按顺序取NPCID
            gameFB.SetGameFBDict(BZZD_LastNPCID, npcID)
        else:
            npcID = gameFB.GetGameFBDictByKey(BZZD_LastNPCID)
            GameWorld.DebugLog("怪全部刷完了,使用最后一次刷怪的NPCID=%s" % npcID)
        if not npcID:
            break
        
    NPCCustomRefresh.ProcessAllNPCRefresh(tick) # 立即出发一次标识点刷新
        isRefresh = True
        NPCCustomRefresh.SetNPCRefresh(rMark, [npcID])
    if isRefresh:
        NPCCustomRefresh.ProcessAllNPCRefresh(tick) # 立即触发一次标识点刷新
    return
## 副本进行中
@@ -345,6 +356,11 @@
    gameFB = GameWorld.GetGameFB()
    if gameFB.GetFBStep() != FB_Step_Fighting:
        return False
    if gameFB.GetGameFBDictByKey(BZZD_IsKillAll):
        #GameWorld.DebugLog("击杀怪物数已达到最大,无法再攻击!")
        return False
    return True
@@ -353,9 +369,14 @@
    if not curPlayer:
        return 0
    
    gameFB = GameWorld.GetGameFB()
    isKillAll = gameFB.GetGameFBDictByKey(BZZD_IsKillAll)
    if isKillAll:
        GameWorld.DebugLog("已经杀到指定怪物数了,无法再获得经验! isKillAll=%s" % isKillAll)
        return 0
    npcID = curNPC.GetNPCID()
    playerID = curPlayer.GetPlayerID()
    gameFB = GameWorld.GetGameFB()
    reExp = PlayerControl.GetPlayerReExp(curPlayer)
    baseExp = curNPC.GetExp()
    expMulti = IpyGameDataPY.GetFuncCfg("XjmjMonsterExp", 2)
@@ -368,6 +389,12 @@
    killNPCCnt = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_KillCnt) + 1
    gameFB.SetPlayerGameFBDict(playerID, FBPlayerDict_KillCnt, killNPCCnt)
    DoFBHelp(curPlayer, GameWorld.GetGameWorld().GetTick())
    totalNPCCount = gameFB.GetGameFBDictByKey(BZZD_TotalNPCCount)
    if killNPCCnt >= totalNPCCount:
        gameFB.SetGameFBDict(BZZD_IsKillAll, killNPCCnt)
        GameWorld.DebugLog("怪物已击杀到指定数量: killNPCCnt=%s,totalNPCCount=%s" % (killNPCCnt, totalNPCCount))
    return addExp
## 获得经验
@@ -378,6 +405,11 @@
    
    playerID = curPlayer.GetID() 
    gameFB = GameWorld.GetGameFB()
    if gameFB.GetFBStep() != FB_Step_Fighting:
        #GameWorld.DebugLog("非战斗阶段,不处理! addExp=%s" % addExp)
        return
    exp = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_TotalExp)
    expPoint = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_TotalExpPoint)
    totalExp = expPoint * ChConfig.Def_PerPointValue + exp
@@ -389,9 +421,7 @@
    
    #GameWorld.DebugLog("OnGetExp() totalExp=%s,addExp=%s,updTotalExp=%s" % (totalExp, addExp, updTotalExp), playerID)
    
    killNPCCnt = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_KillCnt)
    totalNPCCount = gameFB.GetGameFBDictByKey(BZZD_TotalNPCCount)
    if killNPCCnt >= totalNPCCount:
    if gameFB.GetGameFBDictByKey(BZZD_IsKillAll):
        GameWorld.DebugLog("怪物已全部杀完,结算副本!")
        __DoBZZDOver()
    return