hxp
2019-05-17 112e6e57009cdfee014bdfeb97c22b9520fd4dca
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py
@@ -19,13 +19,14 @@
import GameWorldProcess
import PlayerFairyDomain
import NPCCustomRefresh
import CrossRealmPlayer
import IpyGameDataPY
import PyGameData
import NPCCommon
import PlayerControl
import ChConfig
import FBCommon
FBDict_SyncFBNPC = 'SyncFBNPC' #是否需要同步副本NPC
def DoResetCrossGrassland(curPlayer, eventType, fdeventID):
    ## 草园重置
@@ -88,12 +89,23 @@
    playerID = curPlayer.GetPlayerID()
    zoneID = FBCommon.GetCrossDynamicLineMapZoneID()
    funcLineID = FBCommon.GetCrossDynamicLineMapFuncLineID()
    GameWorld.Log("DoEnterFB zoneID=%s,funcLineID=%s" % (zoneID, funcLineID), playerID)
    crossMapID = PlayerControl.GetCrossMapID(curPlayer)
    GameWorld.Log("DoEnterFB zoneID=%s,funcLineID=%s,crossMapID=%s" % (zoneID, funcLineID, crossMapID), playerID)
    FBCommon.Sync_FBNPC(curPlayer=curPlayer)
    if crossMapID == ChConfig.Def_FBMapID_CrossGrasslandXian:
        boxNPCID = IpyGameDataPY.GetFuncCfg("CrossGrasslandCfg", 1)
        if boxNPCID:
            NPCCommon.SyncNPCAttackCount(curPlayer, [boxNPCID])
    return
### 副本总逻辑计时器
#def OnProcess(tick):
#    return
## 副本总逻辑计时器
def OnProcess(tick):
    gameFB = GameWorld.GetGameFB()
    if gameFB.GetGameFBDictByKey(FBDict_SyncFBNPC):
        gameFB.SetGameFBDict(FBDict_SyncFBNPC, 0)
        FBCommon.Sync_FBNPC()
    return
#
### 关闭副本
#def OnCloseFB(tick):
@@ -169,4 +181,13 @@
    GameWorld.DebugLog("设置草园已完成!mapID=%s, lineID=%s" % (mapID, lineID))
    return
def DoFB_NPCDead(curNPC):
    #GameWorld.DebugLog("DoFB_NPCDead 设置需要同步副本NPC!")
    GameWorld.GetGameFB().SetGameFBDict(FBDict_SyncFBNPC, 1)
    return
def OnNPCRebornInFB(curNPC):
    #GameWorld.DebugLog("OnNPCRebornInFB 设置需要同步副本NPC!")
    GameWorld.GetGameFB().SetGameFBDict(FBDict_SyncFBNPC, 1)
    return