hch
2019-04-19 f37fe3b1d7b81b2dcdaeeb81971a6cbdf0b9372d
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py
@@ -35,7 +35,7 @@
    if eventType == PlayerFairyDomain.FDEventType_GrasslandXian:
        npcID = IpyGameDataPY.GetFuncCfg("CrossGrasslandCfg", 1)
        if npcID:
            NPCCommon.UpdateNPCAttackCount(curPlayer, [npcID], 0)
            NPCCommon.UpdateNPCAttackCount(curPlayer, npcID, 0)
            
    return
    
@@ -53,13 +53,18 @@
        return False
    return True
## 跨服功能线路数据缓存,下次开启同样功能线路时会用该数据进行还原之前的副本状态
def OnGetCrossFuncLineDataCache():
    refreshNPCInfo = NPCCustomRefresh.GetCopyMapRandomRefreshNPCInfo()
    return refreshNPCInfo
## 开启副本
def OnOpenFB(tick):
    gameWorld = GameWorld.GetGameWorld()
    realMapID, copyMapID = gameWorld.GetRealMapID(), gameWorld.GetCopyMapID()
    key = (realMapID, copyMapID)
    if key in PyGameData.g_crossFuncLineDataCache:
        refreshNPCInfo = PyGameData.g_crossFuncLineDataCache[key]
        refreshNPCInfo = PyGameData.g_crossFuncLineDataCache.pop(key)
        GameWorld.DebugLog("副本开启根据保存的虚拟线路标试点刷怪信息刷怪: realMapID=%s,copyMapID=%s,refreshNPCInfo=%s" % (realMapID, copyMapID, refreshNPCInfo))
        NPCCustomRefresh.OnFBOpenSetRandomRefreshNPCInfo(refreshNPCInfo, tick)
        
@@ -81,26 +86,17 @@
    GameWorld.Log("DoEnterFB zoneID=%s,funcLineID=%s" % (zoneID, funcLineID), playerID)
    return
## 副本总逻辑计时器
def OnProcess(tick):
    return
## 关闭副本
def OnCloseFB(tick):
    gameWorld = GameWorld.GetGameWorld()
    refreshNPCInfo = NPCCustomRefresh.GetCopyMapRandomRefreshNPCInfo()
    if refreshNPCInfo:
        realMapID, copyMapID = gameWorld.GetRealMapID(), gameWorld.GetCopyMapID()
        key = (realMapID, copyMapID)
        PyGameData.g_crossFuncLineDataCache[key] = refreshNPCInfo
        GameWorld.DebugLog("缓存虚拟线路标试点刷怪信息: realMapID=%s,copyMapID=%s,refreshNPCInfo=%s" % (realMapID, copyMapID, refreshNPCInfo))
    GameWorld.GetGameWorld().SetPropertyID(0)
    return
## 玩家退出副本
def DoExitFB(curPlayer, tick):
    return
### 副本总逻辑计时器
#def OnProcess(tick):
#    return
#
### 关闭副本
#def OnCloseFB(tick):
#    return
#
### 玩家退出副本
#def DoExitFB(curPlayer, tick):
#    return
##玩家主动离开副本.
def DoPlayerLeaveFB(curPlayer, tick):