hch
2019-05-17 9a739f5ef7dc235d8effd1b46ebe9bf747ab8e36
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FairyTreasure.py
@@ -102,6 +102,7 @@
#  @param tick
#  @return None
def DoEnterFB(curPlayer, tick):
    PlayerControl.SetSight(curPlayer, ChConfig.Def_PlayerSight_Default * 3)
    mapID = GameWorld.GetMap().GetMapID()
    mapID = FBCommon.GetRecordMapID(mapID)
    gameFB = GameWorld.GetGameFB()
@@ -111,7 +112,11 @@
    if not hadDelTicket:
        FBCommon.SetHadDelTicket(curPlayer)
        FBCommon.SetFBPropertyMark(lineID)
        boxIDList = FBCommon.GetFBLineRefreshNPC(mapID, lineID)[1:]
        npcCnt = len(boxIDList)
        NPCCustomRefresh.SetNPCRefresh(__GetFBTimeCfg()[Def_RefreshBossMark1], [[npcID,1] for npcID in boxIDList], npcCnt, npcCnt)
    if gameFB.GetGameFBDictByKey(FBPlayerDict_CurStep) == 0:
        FBCommon.SyncDynamicBarrierState(IpyGameDataPY.GetFuncEvalCfg('HazyTreasure'), 1, curPlayer) # 准备期间有动态障碍点
    if not hadDelTicket \
        and IpyGameDataPY.GetIpyGameDataByCondition("NPCShow", {"MapID":mapID, "LineID":lineID}, isLogNone=False):
        GameWorld.DebugLog("刚进入时不直接开始,需等前端通知开始才开始!", playerID)  # 掉线重上强制开始
@@ -121,10 +126,7 @@
    if fbStep < FB_Step_Prepare:
        FBCommon.SetFBStep(FB_Step_Prepare, tick)
        boxIDList = FBCommon.GetFBLineRefreshNPC(mapID, lineID)[1:]
        npcCnt = len(boxIDList)
        NPCCustomRefresh.SetNPCRefresh(__GetFBTimeCfg()[Def_RefreshBossMark1], [[npcID,1] for npcID in boxIDList], npcCnt, npcCnt)
        FBCommon.SyncDynamicBarrierState(IpyGameDataPY.GetFuncEvalCfg('HazyTreasure'), 1, curPlayer) # 准备期间有动态障碍点
    if fbStep <= FB_Step_Prepare:
        notify_tick = __GetFBTimeCfg(lineID)[Def_PrepareTime] * 1000 - (tick - GameWorld.GetGameFB().GetFBStepTick())
        curPlayer.Sync_TimeTick(IPY_GameWorld.tttWaitStart, 0, max(notify_tick, 0), True)
@@ -184,6 +186,7 @@
# @return 返回值无意义
# @remarks 玩家主动离开副本.
def DoExitFB(curPlayer, tick):
    PlayerControl.SetSight(curPlayer, ChConfig.Def_PlayerSight_Default)
    # 玩家退出默认关闭副本
    #GameWorldProcess.CloseFB(tick)
    return
@@ -351,11 +354,11 @@
    ipyData = IpyGameDataPY.GetIpyGameDataByCondition('FairyDomain', {'MapID':ChConfig.Def_FBMapID_FairyTreasure, 'LineID':lineID})
    fdeventID = ipyData.GetID()
    giveItemList = PlayerFairyDomain.GetFairyAppointAward(curPlayer, fdeventID)
    dropItemList = []
    if not giveItemList:
        awardCfg = FBCommon.GetFBLineReward(ChConfig.Def_FBMapID_FairyTreasure, lineID)
        curAlchemyLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AlchemyLV)
        giveItemList = []
        dropItemList = []
        for awardRateList in awardCfg:
            newItemInfoList = []
            for itemInfo in awardRateList:
@@ -372,10 +375,12 @@
                continue
            randomitem = GameWorld.GetResultByWeightList(newItemInfoList)
            giveItemList.append(randomitem)
            for _ in xrange(randomitem[1]):
                dropItemList.append([randomitem[0],1,randomitem[2]])
        
    if giveItemList:
        for randomitem in giveItemList:
            for _ in xrange(randomitem[1]):
                dropItemList.append([randomitem[0],1,randomitem[2]])
        NPCCommon.DoVirtualItemDrop(curPlayer, dropItemList, dropPosX, dropPosY)
        ItemControler.GivePlayerItemOrMail(curPlayer, giveItemList)
        leaveTick = __GetFBTimeCfg(lineID)[Def_LeaveTime] * 1000