xdh
2019-06-19 688e59b6ce2aab1838a08924ddf5bbee33180f61
7389 【后端】【2.0】骑宠争夺中副本需要显示倒计时
2个文件已修改
46 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_AllFamilyBoss.py 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_HorsePetBoss.py 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_AllFamilyBoss.py
@@ -37,13 +37,12 @@
FBPlayerDict_EncourageLV = 'FBPlayerDict_EncourageLV'  # 鼓舞等级
FBDict_IsOver = 'FBDict_IsOver'  #是否已结算, 结算时的tick
FBDict_EncourageCnt = 'FBDict_EncourageCnt'  #鼓舞过次数
Map_FB_StartTick = 'Map_FB_StartTick' #活动开始时间
(
    Def_BossTime,  #BOSS时间
    Def_LeaveTime,  #离开时间
    Def_HPSpeed,  #掉血速度公式
    ) = range(3)
    ) = range(2)
#当前副本地图的状态
(
@@ -122,13 +121,23 @@
    if mapID != ChConfig.Def_FBMapID_AllFamilyBoss:
        return
    GameWorld.DebugLog('    多仙盟BOSS活动状态变更 state=%s' % state)
    if not state:
    if state:
        if not GameWorld.GetGameWorld().GetGameWorldDictByKey(Map_FB_StartTick):
            GameWorld.GetGameWorld().SetGameWorldDict(Map_FB_StartTick, tick)
    else:
        GameWorld.GetGameWorld().SetGameWorldDict(Map_FB_StartTick, 0)
        if not GameWorld.GetGameFB().GetGameFBDictByKey(FBDict_IsOver):
            GameWorld.GetGameFB().SetGameFBDict(FBDict_IsOver, tick)
            __DoLogicAllFamilyBossOver(0, tick, 0, 0)
    return
def __GetRemainTick(tick):
    ##活动剩余毫秒
    mapID = GameWorld.GetMap().GetMapID()
    startTick = GameWorld.GetGameWorld().GetGameWorldDictByKey(Map_FB_StartTick)
    closeFB_RemainTick = max(0, FBCommon.GetFBLineStepTime(mapID)[Def_BossTime] * 1000 - (tick - startTick))
    return closeFB_RemainTick
## 进副本
#  @param curPlayer
@@ -171,7 +180,9 @@
        FBCommon.AddFbEncourageBuff(curPlayer, FBPlayerDict_EncourageLV, tick, familyID)
    else:
        FBCommon.SendFBEncourageInfo(curPlayer, encourageLV, familyID)
    closeFB_RemainTick = __GetRemainTick(tick)
    curPlayer.Sync_TimeTick(IPY_GameWorld.tttTowerTake, 0, closeFB_RemainTick, True)
    DoFBHelp(curPlayer, tick)
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_HorsePetBoss.py
@@ -34,12 +34,12 @@
FBPlayerDict_EncourageLV = 'FBPlayerDict_EncourageLV'   # 鼓舞等级
FBDict_IsOver = 'FBDict_IsOver' #是否已结算, 结算时的tick
Map_FB_StartTick = 'Map_FB_StartTick' #活动开始时间
(
Def_BossTime,  #BOSS时间
Def_LeaveTime,  #离开时间
Def_HPSpeed,  #掉血速度公式
) = range(3)
) = range(2)
    
#当前副本地图的状态
(
@@ -101,12 +101,23 @@
    if mapID != ChConfig.Def_FBMapID_HorsePetBoss:
        return
    GameWorld.DebugLog('    骑宠BOSS活动状态变更 state=%s' % state)
    if not state:
    if state:
        if not GameWorld.GetGameWorld().GetGameWorldDictByKey(Map_FB_StartTick):
            GameWorld.GetGameWorld().SetGameWorldDict(Map_FB_StartTick, tick)
    else:
        GameWorld.GetGameWorld().SetGameWorldDict(Map_FB_StartTick, 0)
        if GameWorld.GetGameFB().GetFBStep() == FB_Step_Fighting:
            GameWorld.GetGameFB().SetGameFBDict(FBDict_IsOver, tick)
            __DoLogicHorsePetBossOver(0, tick, 0, 0)
    return
def __GetRemainTick(tick):
    ##活动剩余毫秒
    mapID = GameWorld.GetMap().GetMapID()
    startTick = GameWorld.GetGameWorld().GetGameWorldDictByKey(Map_FB_StartTick)
    closeFB_RemainTick = max(0, FBCommon.GetFBLineStepTime(mapID)[Def_BossTime] * 1000 - (tick - startTick))
    return closeFB_RemainTick
## 进副本
#  @param curPlayer
@@ -145,7 +156,9 @@
        FBCommon.AddFbEncourageBuff(curPlayer, FBPlayerDict_EncourageLV, tick)
    else:
        FBCommon.SendFBEncourageInfo(curPlayer, encourageLV)
    closeFB_RemainTick = __GetRemainTick(tick)
    curPlayer.Sync_TimeTick(IPY_GameWorld.tttTowerTake, 0, closeFB_RemainTick, True)
    DoFBHelp(curPlayer, tick)
    return