| | |
| | | import ChConfig
|
| | | import FBCommon
|
| | |
|
| | | FBDict_SyncFBNPC = 'SyncFBNPC' #是否需要同步副本NPC
|
| | |
|
| | | def DoResetCrossGrassland(curPlayer, eventType, fdeventID):
|
| | | ## 草园重置
|
| | |
|
| | |
| | |
|
| | | return
|
| | |
|
| | | def GetCurFBFuncLineID():
|
| | | ## 获取本线路功能线路ID
|
| | | return GameWorld.GetGameWorld().GetPropertyID() % 10000 / 10
|
| | |
|
| | | def GetCurFBLineZoneID():
|
| | | ## 获取本线路所属跨服分区
|
| | | return GameWorld.GetGameWorld().GetPropertyID() / 10000
|
| | |
|
| | | ## 进副本
|
| | | def DoEnterFB(curPlayer, tick):
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | zoneID = GetCurFBLineZoneID()
|
| | | funcLineID = GetCurFBFuncLineID()
|
| | | GameWorld.Log("DoEnterFB zoneID=%s,funcLineID=%s" % (zoneID, funcLineID), playerID)
|
| | | zoneID = FBCommon.GetCrossDynamicLineMapZoneID()
|
| | | funcLineID = FBCommon.GetCrossDynamicLineMapFuncLineID()
|
| | | 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):
|
| | |
| | | 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
|
| | |
|