xdh
2019-03-12 de73a9a2464ae7357ab170699d5f552594769e3a
3053 【2.0】刚进仙盟boss副本,击杀进度就显示100%
1个文件已修改
27 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_AllFamilyBoss.py 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_AllFamilyBoss.py
@@ -36,10 +36,10 @@
FBPlayerDict_EncourageLV = 'FBPlayerDict_EncourageLV'  # 鼓舞等级
FBDict_IsOver = 'FBDict_IsOver'  #是否已结算, 结算时的tick
FBDict_IsReduceing = 'FBDict_IsReduceing'  #是否掉血中
FBPlayerDict_Rank = "FBPlayerDict_Rank"  # 玩家排名
FBDict_BossTotalHP = 'FBDict_BossTotalHP'  #BOSS血量
FBDict_LastHurtTick = 'FBDict_LastHurtTick'  #上次伤害时间
FBDict_IsEncourage = 'FBDict_IsEncourage'  #是否鼓舞过
FBDict_LastHPNotify = 'FBDict_LastHPNotify'  #上一个血量广播
(
    Def_BossTime, #BOSS时间
@@ -53,6 +53,7 @@
FB_Step_Over, # 副本结束
FB_Step_Close, # 副本关闭
) = range(4)
def OnFBPlayerOnLogin(curPlayer):
@@ -189,7 +190,7 @@
    gameWorld.SetGameWorldDict(FBDict_StartTick, 0)
    gameWorld.SetGameWorldDict(FBDict_Speed, 0)
    gameWorld.SetGameWorldDict(FBDict_RemainHP, 0)
    gameWorld.SetGameWorldDict(FBDict_IsReduceing, 0)
    gameWorld.SetPropertyID(0)
    PyGameData.g_allfamilyBossDict = {}
    return
@@ -357,7 +358,6 @@
            FBCommon.SetFBStep(FB_Step_Close, tick)
            return
    elif fbStep == FB_Step_Fighting:
        startTick = gameWorld.GetGameWorldDictByKey(FBDict_StartTick)
        if not startTick or overTick:
@@ -446,6 +446,7 @@
  
    return
def __GetFamilyBossAward(rank, worldLV):
    familyAuctionItemList, menberItemList = [], []
    awardRateList = []
@@ -480,8 +481,8 @@
    gameFB = GameWorld.GetGameFB()
    isOver = gameFB.GetGameFBDictByKey(FBDict_IsOver)
 
    if not isOver and GetBossRemainHP(tick) == 0:
    if not isOver:
        if GetBossRemainHP(tick) == 0:
        #结束 设置BOSS死亡
        FBCommon.ClearFBNPC()
        FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 0)
@@ -490,6 +491,20 @@
        gameFB.SetGameFBDict(FBDict_IsOver, tick)
        
        __DoLogicAllFamilyBossOver(1, tick)
        else:
            #血量广播
            needNotifyHPPerList = [50, 20]
            lastIndex = gameFB.GetGameFBDictByKey(FBDict_LastHPNotify)
            if lastIndex >= len(needNotifyHPPerList):
                return
            remainPer = GetBossRemainHPPer(tick)
            notifyHPPer = needNotifyHPPerList[lastIndex]
            if remainPer == notifyHPPer or remainPer - 1 == notifyHPPer:
                gameFB.SetGameFBDict(FBDict_LastHPNotify, lastIndex + 1)
                lineID = GameWorld.GetGameWorld().GetPropertyID() - 1
                bossID = CurFBLineBOSSID(lineID)
                msgMark = 'AllianceBossHP1' if lineID == 0 else 'AllianceBossHP2'
                PlayerControl.WorldNotify(0, msgMark, [bossID, remainPer])
        
    return
@@ -562,7 +577,7 @@
    lastSpeed = gameWorld.GetGameWorldDictByKey(FBDict_Speed) 
    remainHP = gameWorld.GetGameWorldDictByKey(FBDict_RemainHP)
    if not gameWorld.GetGameWorldDictByKey(FBDict_IsReduceing):
        return remainHP
        return remainHP if startTick else __GetBossTotalHP()
    if not startTick:
        startTick = tick
        remainHP = __GetBossTotalHP()