| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #  | 
| ##@package E:/GameSVN/U3DGame/ProjectSServer/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBLogic.py  | 
| # @todo:   | 
| #  | 
| # @author: Alee  | 
| # @date 2017-10-24 ÏÂÎç08:22:05  | 
| # @version 1.0  | 
| #  | 
| # @note:   | 
| #  | 
| #---------------------------------------------------------------------  | 
| import GameWorld  | 
| import ChConfig  | 
| import NPCCommon  | 
| import FBProcess  | 
| import IPY_GameWorld  | 
| import PlayerControl  | 
| import GameWorldProcess  | 
| import PlayerMergeEvent  | 
| import ReadChConfig  | 
| import ShareDefine  | 
| import FBCommon  | 
| import GameMap  | 
| import GameObj  | 
|   | 
| import random  | 
| #---------------------------------------------------------------------  | 
|   | 
| #-----------------------------------------------------------------------  | 
| #µ¼ÈëËùÓеĸ±±¾Âß¼  | 
| GameWorld.ImportAll("Script\\GameWorldLogic\\" , "FBProcess")  | 
| GameWorld.ImportAll("Script\\GameWorldLogic\\" , "")  | 
| #---------------------------------------------------------------------  | 
| ## ÖØÐ¶ÁÈ¡ËùÓи±±¾  | 
| #  @param µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def ReloadFBLogic(tick):  | 
|     scriptPath = ChConfig.GetAppPath() + "Script\\GameWorldLogic\\FBProcess"  | 
|     GameWorld.ReloadScript(scriptPath, "FBProcess")  | 
|       | 
|     scriptPath = ChConfig.GetAppPath() + "Script\\GameWorldLogic"  | 
|     GameWorld.ReloadScript(scriptPath, "")  | 
|     return  | 
| #-----------------------------------------------------------------------  | 
|   | 
| ## Íæ¼ÒµÇ¼ , ¿ªÆô¸±±¾  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnOpenFB(tick):  | 
|     #--------¸±±¾³õʼ»¯  | 
|     __DoLogic_FBInit(tick)  | 
|       | 
|     #----------------Íæ¼ÒÂß¼´¦Àí  | 
|     curPlayer = GameWorld.GetMapCopyPlayerManager().GetPlayerByIndex(0)  | 
|     #----------------³õʼ»¯¸±±¾ , Çå¿Õ´ø¹ýÀ´µÄNPC  | 
|     if curPlayer != None:    | 
|         gameNPC = GameWorld.GetNPCManager()  | 
|         for i in range(gameNPC.GetCustomNPCRefreshCount()):  | 
|             npcRefresh = gameNPC.GetCustomNPCRefreshAt(i)  | 
|             funcName = "NPCRefreshInit_%d" % npcRefresh.GetRefreshMark()  | 
|             if globals().has_key(funcName):  | 
|                 globals()[funcName](curPlayer, npcRefresh, tick)  | 
|           | 
|         curPlayer.ClearChangeMapTakeCreateNPC()  | 
|           | 
|     #---------------µ÷Óø±±¾£º¿ªÆô´¥·¢Æ÷  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|     #¿ªÆô¸±±¾´¥·¢  | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnOpenFB"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(tick)  | 
|       | 
|     return  | 
|   | 
| ## ¸±±¾³õʼ»¯  | 
| #  @param tick µ±Ç°Ê±¼ä   | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def __DoLogic_FBInit(tick):  | 
|     #-------------------Çå¿Õ×ÖµäÐÅÏ¢  | 
|     gameFB = GameWorld.GetGameFB()  | 
|     gameFB.ClearGameFBDict()  | 
|     gameFB.ClearAllPlayerGameFBDict()  | 
|     #-------------------Çå¿Õ¸±±¾×Ô¶¨ÒåˢеĹÖÎï  | 
|     gameNPC = GameWorld.GetNPCManager()  | 
|       | 
|     for i in range(gameNPC.GetCustomNPCRefreshCount()):  | 
|         npcRefresh = gameNPC.GetCustomNPCRefreshAt(i)  | 
|         #½«Éæ¼°µ½C++ÖÐÁбíɾ³ýµÄ¹¦ÄÜ,ͳһ¸Ä³É -> ¸´ÖÆPyÁбíºó,È»ºó½øÐÐɾ³ýÂß¼ (ÒòWhileÓм¸Âʽ«µ¼ÖÂËÀËø)  | 
|         npc_List = []  | 
|         for index in range(npcRefresh.GetCount()):  | 
|             curNPC = npcRefresh.GetAt(index)  | 
|             npc_List.append(curNPC)  | 
|           | 
|         for npc in npc_List:  | 
|             NPCCommon.SetDeadEx(npc)  | 
|               | 
|     #------------------¸´»îËùÓи±±¾¹Ì¶¨µÄNPC  | 
|     for i in range(gameNPC.GetNormalNPCCount()):  | 
|         curNPC = gameNPC.GetNormalNPCAt(i)  | 
|         __CheckRebornNPC(curNPC, tick)  | 
|           | 
|     #¸´»îËùÓеÄboss  | 
|     for i in range(gameNPC.GetBossCount()):  | 
|         curNPC = gameNPC.GetBossAt(i)  | 
|         __CheckRebornNPC(curNPC, tick)  | 
|       | 
|     #------------------Çå¿ÕËùÓеذåÎïÆ·  | 
|     #½«Éæ¼°µ½C++ÖÐÁбíɾ³ýµÄ¹¦ÄÜ,ͳһ¸Ä³É -> ¸´ÖÆPyÁбíºó,È»ºó½øÐÐɾ³ýÂß¼ (ÒòWhileÓм¸Âʽ«µ¼ÖÂËÀËø)  | 
|     mapItem_List = []  | 
|     mapItemManager = GameWorld.GetMapItemManager()  | 
|     for index in range(mapItemManager.GetMapItemCount()):  | 
|         curMapItem = mapItemManager.GetMapItemByIndex(index)  | 
|         mapItem_List.append(curMapItem)  | 
|       | 
|     for mapItem in mapItem_List:  | 
|         #ÎÞ´ËÎïÆ·  | 
|         if not mapItem or mapItem.IsEmpty():  | 
|             continue  | 
|           | 
|         mapItem.Disappear()  | 
|       | 
|     return  | 
| #-----------------------------------------------------------------------  | 
| ## NPCˢеã³õʼ»¯  | 
| #  @param curPlayer Íæ¼Ò  | 
| #  @param npcRefresh IPY_CustomNPCRefresh  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def NPCRefreshInit_2(curPlayer, npcRefresh, tick):  | 
|     if npcRefresh.GetCount() != 0:  | 
|         #»¹ÓÐ¹Ö  | 
|         #GameWorld.Log('»¹ÓйÖ,²»Ë¢Ð %s'%npcRefresh.GetAt(0).GetName())  | 
|         return  | 
|     #ÕÒµ½Íæ¼Ò´ø¹ýÀ´µÄNPC, ´´½¨Ëü  | 
|     for i in range(curPlayer.GetChangeMapTakeNPCCount()):  | 
|         curNPCID = curPlayer.GetChangeMapTakeNPCIDByIndex(i)  | 
|         curNPCCount = curPlayer.GetChangeMapTakeNPCCountByIndex(i)  | 
|         npcRefresh.Refresh(curNPCID, ChConfig.Def_NormalNPCAngryCount, curNPCCount)  | 
|       | 
|     return  | 
| #---------------------------------------------------------------------  | 
| ## Íæ¼ÒÈ«²¿À뿪,¹Ø±Õ¸±±¾  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnCloseFB(tick):  | 
|     #¹Ø±Õ¸±±¾´¥·¢  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnCloseFB"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(tick)  | 
|       | 
|     #Íæ¼Ò¶¼À뿪ÁË  | 
|     GameWorld.Log("mapID = %s OnCloseFB" % (GameWorld.GetMap().GetMapID()))  | 
|     return  | 
|   | 
| #----------------------------------------------------------------------  | 
| ## ¼ì²éNPCÖØÉú  | 
| #  @param curNPC µ±Ç°NPC  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def __CheckRebornNPC(curNPC, tick):  | 
|     #»î×ÅÖØÖÃ״̬  | 
|     if curNPC.IsAlive() and GameObj.GetHP(curNPC) > 0:  | 
|         __DoLogic_NPCAlive(curNPC)  | 
|         return  | 
|     #ËÀÍöÖØÉú  | 
|     npcControl = NPCCommon.NPCControl(curNPC)  | 
|     npcControl.DoNPCReborn(tick)  | 
|     return  | 
|   | 
| ## ¶Ô»î×ŵÄNPCÖ´ÐÐһЩ²Ù×÷  | 
| #  @param curNPC  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def __DoLogic_NPCAlive(curNPC):  | 
|     npcControl = NPCCommon.NPCControl(curNPC)  | 
|     #------ÏÈÖØÖÃÊôÐÔ  | 
|     npcControl.ResetNPC_Init()  | 
|       | 
|     #------¼ì²éNPCѪÁ¿ÊÇ·ñÂúѪ£¬²»ÎªÂúѪ£¬ÉèÖÃÂúѪ  | 
|     curNPCMaxHP = GameObj.GetMaxHP(curNPC)  | 
|       | 
|     if GameObj.GetHP(curNPC) != curNPCMaxHP :  | 
|         GameObj.SetHP(curNPC, curNPCMaxHP)  | 
|       | 
|     #·µ»ØÖµ£¬ÎÞÒâÒå  | 
|     return  | 
|   | 
| #----------------------------------------------------------------------  | 
| ## ³õʼ»¯¸±±¾  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnInit(tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFBInit"))  | 
|       | 
|     if callFunc:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         callFunc(tick)  | 
|       | 
|     return  | 
|   | 
| #---------------------------------------------------------------------  | 
| ## ÈÎÎñרÓÃ,´¥·¢Ê¼þ£¨¸±±¾ÄÚɱ¹Ö£©  | 
| #  @param curPlayer µ±Ç°É±¹ÖÕß  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoFBOnKill_NPC(curPlayer , tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFBOnKill_NPC"))  | 
|       | 
|     if callFunc:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         callFunc(curPlayer , tick)  | 
|       | 
|     return  | 
|   | 
|   | 
| ## ÈÎÎñרÓÃ,´¥·¢Ê¼þ£¨¸±±¾ÄÚÍê³ÉijÈÎÎñ£©  | 
| #  @param curPlayer Íæ¼ÒʵÀý  | 
| #  @param isAchieve ÊÇ·ñÍê³ÉÈÎÎñ  | 
| #  @return None  | 
| def DoFB_OnAchieveTask(curPlayer, isAchieve):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFB_OnAchieveTask"))  | 
|       | 
|     if callFunc:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         callFunc(curPlayer, isAchieve)  | 
|           | 
|     return  | 
|   | 
| ## ÈÎÎñרÓÃ,´¥·¢Ê¼þ£¨¸±±¾ÄÚÍê³ÉÅÜ»·ÈÎÎñ£©  | 
| #  @param curPlayer Íæ¼ÒʵÀý  | 
| #  @param isAchieve ÊÇ·ñÍê³ÉÈÎÎñ  | 
| #  @return None  | 
| def DoFB_OnFinishRunAroundTask(curPlayer, curMissionID, exp=0, moneyDict={}, itemList=[]):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFB_OnFinishRunAroundTask"))  | 
|       | 
|     if callFunc:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         callFunc(curPlayer, curMissionID, exp, moneyDict, itemList)  | 
|           | 
|     return  | 
|   | 
|   | 
| #---------------------------------------------------------------------  | 
| ## Íæ¼ÒɱËÀNPC,Çø±ð£¨ÉÏÃæµÄ£©ÈÎÎñÂß¼  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param curNPC ±»É±µÄNPC  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoFB_Player_KillNPC(curPlayer , curNPC , tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFB_Player_KillNPC"))  | 
|       | 
|     if callFunc:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         callFunc(curPlayer , curNPC , tick)  | 
|       | 
|     return  | 
|   | 
| ## ¸±±¾NPC×Ô±¬  | 
| def DoFB_NPCSelfDestruction(curNPC, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFB_NPCSelfDestruction"))  | 
|       | 
|     if callFunc:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         callFunc(curNPC, tick)  | 
|       | 
|     return  | 
|   | 
| ## »÷ɱnpcµôÂä¹éÊô  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param curNPC ±»É±µÄNPC  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoFB_DropOwner(curPlayer , curNPC):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFB_DropOwner"))  | 
|       | 
|     if callFunc:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         callFunc(curPlayer , curNPC)  | 
|       | 
|     return  | 
|   | 
| ## NpcɱËÀNPC,  | 
| #  @param attacker£º¹¥»÷·½:NPC  | 
| #  @param defender£º±»É±µÄNPC  | 
| #  @param tick£ºµ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoFB_Npc_KillNPC(attacker, defender, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFB_Npc_KillNPC"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(attacker, defender, tick)  | 
|       | 
|     return  | 
|   | 
| ## ¸±±¾ÖÐÕÙ»½ÊÞËÀÍö(±»»÷ɱ»òÕßʱ¼äµ½µÈ)  | 
| #  @param curNPC  | 
| #  @return None.  | 
| def DoFB_SummonNPCDead(curNPC):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFB_SummonNPCDead"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(curNPC)  | 
|       | 
|     return  | 
| #---------------------------------------------------------------------  | 
| ## ÈÎÎñרÓÃ,´¥·¢Ê¼þ£¨¸±±¾ÄÚɱÈË£©  | 
| #  @param curPlayer É±ÈËÕß  | 
| #  @param defender ±»É±Õß  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoFBOnKill_Player(curPlayer, defender, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFBOnKill_Player"))  | 
|       | 
|     if callFunc:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         return  callFunc(curPlayer, defender, tick)  | 
|       | 
|     return  | 
|   | 
| #---------------------------------------------------------------------  | 
| ## ÈÎÎñרÓÃ,´¥·¢Ê¼þ£¨¸±±¾ÄÚ¹¥»÷ÈË£©  | 
| #  @param curPlayer ¹¥»÷Õß  | 
| #  @param defender ±»¹¥»÷Õß  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoFBOnHit_Player(curPlayer, defender, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFBOnHit_Player"))  | 
|       | 
|     if callFunc:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         return  callFunc(curPlayer, defender, tick)  | 
|       | 
|     return  | 
| #---------------------------------------------------------------------  | 
| ## Íæ¼Ò¹¥»÷Íæ¼Ò,Çø±ð£¨ÉÏÃæµÄ£©ÈÎÎñÂß¼  | 
| #  @param curPlayer ¹¥»÷Õß  | 
| #  @param defender ±»¹¥»÷Õß  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoFB_Player_HitNPC(curPlayer, defender, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFB_Player_HitNPC"))  | 
|       | 
|     if callFunc:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         return  callFunc(curPlayer, defender, tick)  | 
|       | 
|     return  | 
| #---------------------------------------------------------------------  | 
| ## ¸±±¾ÄÚÖØÉú  | 
| #  @param curPlayer ÖØÉúµÄÍæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoFBOnReborn(curPlayer, rebornType, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFBOnReborn"))  | 
|       | 
|     if callFunc:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         callFunc(curPlayer, rebornType, tick)  | 
|       | 
|     return  | 
| #---------------------------------------------------------------------  | 
| ## »ñµÃ¸±±¾µ±Ç°ÐÅÏ¢  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoGetFBState(curPlayer, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoGetFBState"))  | 
|       | 
|     if callFunc:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         return  callFunc(curPlayer, tick)  | 
|       | 
|     return  | 
| #---------------------------------------------------------------------  | 
| ## »ñµÃ¸±±¾°ïÖú  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoFBHelp(curPlayer , tick):  | 
|     if GameWorld.GetGameWorld().GetOpenState() != IPY_GameWorld.fbosOpen:  | 
|         return  | 
|       | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFBHelp"))  | 
|       | 
|     if callFunc:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         return  callFunc(curPlayer, tick)  | 
|       | 
|     return  | 
| #---------------------------------------------------------------------  | 
| # NPC¸´»î֪ͨ¸±±¾  | 
| def OnNPCRebornInFB(curNPC):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnNPCRebornInFB"))  | 
|       | 
|     if callFunc == None:  | 
|         return True  | 
|       | 
|     return callFunc(curNPC)  | 
|   | 
| ## ÅжÏÄÜ·ñº°»°  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnCanTalk(curPlayer , tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnCanTalk"))  | 
|       | 
|     if callFunc == None:  | 
|         return True  | 
|       | 
|     return callFunc(curPlayer , tick)  | 
| #---------------------------------------------------------------------  | 
| ## Ö´ÐнøÈ븱±¾Âß¼  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoEnterFBLogic(curPlayer, tick):  | 
|     curPlayerID = curPlayer.GetID()  | 
|       | 
|     # ×ÔÉìËõ¸±±¾¸ù¾ÝÍæ¼Ò½øÈ뿪Æô£¬Ö÷¶¯µ÷ÓÃÒ»´Î£¬±ÜÃâ¼ä¸ôµ÷ÓÃʱ»úδ´¥·¢µ¼ÖÂÂß¼´íÂÒ  | 
|     GameWorldProcess.EnterOpenFB(tick)  | 
|       | 
|     #---֪ͨµØÍ¼À뿪µ¹¼ÆÊ±---  | 
|     Sync_LeaveMapTick(curPlayer, tick)  | 
|       | 
|     #---Ö´ÐеØÍ¼OnEnterFBÂß¼---  | 
|     gameMap = GameWorld.GetMap()  | 
|     gameMapID = gameMap.GetMapID()  | 
|       | 
|     #Èç¹ûÒѾÉèÖùý¸±±¾¹¦ÄÜÏß·ÊôÐÔ£¬Ôò½øÈëʱͬ²½Íæ¼Ò£¬Ò»°ãÏÂÏßÖØµÇ»òÕ߷ǵÚÒ»¸ö½øÈë¸Ã¸±±¾µÄÍæ¼Ò£¨Èç¶ÓÓÑ£©»áÊÕµ½¸Ã°ü  | 
|     if FBCommon.GetHadSetFBPropertyMark():  | 
|         PlayerControl.SetFBFuncLineID(curPlayer, FBCommon.GetFBPropertyMark())  | 
|           | 
|     #³É³¤NPCËùÐèÊý¾Ý³õʼ»¯  | 
|     InitFBNPCStrengthenData(curPlayer, gameMap)  | 
|       | 
|     DoEnterFB(curPlayer, tick)  | 
|       | 
|     RecordFirstEnterMap(curPlayer, gameMapID)  | 
|     #---ÒÔÏÂÂ߼Ϊ¸±±¾×¨ÓÃÂß¼---  | 
|     if gameMap.GetMapFBType() == IPY_GameWorld.fbtNull:  | 
|         return  | 
|       | 
|     #¸±±¾¹ÜÀíÆ÷  | 
|     gameFBMgr = GameWorld.GetGameFB()  | 
|       | 
|     if gameMap.GetMapFBType() == IPY_GameWorld.fbtSingle:  | 
|         gameFBMgr.SetGameFBDict(ChConfig.Def_FB_SingleFBPlayerID, curPlayerID)  | 
|           | 
|     #×¢²áÍæ¼ÒÀ뿪¸±±¾Ê±¼ä  | 
|     gameFBMgr.SetPlayerLogoffTick(0)  | 
|       | 
|     if gameFBMgr.HaveFBPlayer(curPlayerID):  | 
|         #ÒѾע²áÁËÕâ¸öÍæ¼Ò, ²»Çå³ýÒÑ×¢²áµÄÍæ¼ÒµÄ×ÖµäÐÅÏ¢  | 
|         return  | 
|       | 
|     #×¢²á½øÈëÕâ¸ö¸±±¾µÄÍæ¼Ò  | 
|     gameFBMgr.AddFBPlayer(curPlayerID)  | 
|     return  | 
|   | 
| def DoEnterFB(curPlayer, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoEnterFB"))  | 
|       | 
|     if callFunc != None:  | 
|         GameWorld.Log("DoEnterFBLogic...", curPlayer.GetPlayerID())  | 
|         callFunc(curPlayer, tick)  | 
|     return  | 
|   | 
| def InitFBNPCStrengthenData(curPlayer, gameMap):  | 
|     #¸±±¾NPC³É³¤Ïà¹ØÊý¾ÝÔÚ DoEnterFB Ö®Ç°³õʼ»¯  | 
|     gameFB = GameWorld.GetGameFB()  | 
|     playerID = curPlayer.GetPlayerID()  | 
|       | 
|     if gameMap.GetMapFBType() == IPY_GameWorld.fbtSingle:  | 
|         if not gameFB.GetGameFBDictByKey(ChConfig.Def_FB_NPCStrengthenMaxLV):  | 
|             gameFB.SetGameFBDict(ChConfig.Def_FB_NPCStrengthenAverageLV, curPlayer.GetLV())  | 
|             gameFB.SetGameFBDict(ChConfig.Def_FB_NPCStrengthenMaxLV, curPlayer.GetLV())  | 
|             gameFB.SetGameFBDict(ChConfig.Def_FB_NPCStrengthenPlayerCnt, 1)  | 
|             GameWorld.Log("¸±±¾³É³¤NPCµÈ¼¶: %s" % curPlayer.GetLV(), playerID)  | 
|               | 
|     elif gameMap.GetMapFBType() == IPY_GameWorld.fbtTeam:  | 
|         if not FBCommon.UpdFBLineNPCStrengthenLV(playerID, False):  | 
|             if not gameFB.GetGameFBDictByKey(ChConfig.Def_FB_NPCStrengthenAverageLV):  | 
|                 fbAverageLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_TeamFBAverageLV)  | 
|                 if not fbAverageLV:  | 
|                     fbAverageLV = curPlayer.GetLV()  | 
|                 gameFB.SetGameFBDict(ChConfig.Def_FB_NPCStrengthenAverageLV, fbAverageLV)  | 
|                 GameWorld.Log("¸±±¾³É³¤NPCƽ¾ùµÈ¼¶: %s" % fbAverageLV, playerID)  | 
|                       | 
|             if not gameFB.GetGameFBDictByKey(ChConfig.Def_FB_NPCStrengthenMaxLV):  | 
|                 fbMaxLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_TeamFBMaxLV)  | 
|                 if not fbMaxLV:  | 
|                     fbMaxLV = curPlayer.GetLV()  | 
|                 gameFB.SetGameFBDict(ChConfig.Def_FB_NPCStrengthenMaxLV, fbMaxLV)  | 
|                 GameWorld.Log("¸±±¾³É³¤NPC×î´óµÈ¼¶: %s" % fbMaxLV, playerID)  | 
|                   | 
|         if not FBCommon.UpdFBLineNPCStrengthenPlayerCnt(playerID, False):  | 
|             if not gameFB.GetGameFBDictByKey(ChConfig.Def_FB_NPCStrengthenPlayerCnt):  | 
|                 fbPlayerCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_TeamFBPlayerCnt)  | 
|                 if not fbPlayerCnt:  | 
|                     fbPlayerCnt = 1  | 
|                 gameFB.SetGameFBDict(ChConfig.Def_FB_NPCStrengthenPlayerCnt, fbPlayerCnt)  | 
|                 GameWorld.Log("¸±±¾³É³¤NPCÍæ¼ÒÈËÊý: %s" % fbPlayerCnt, playerID)  | 
|                   | 
|         if not gameFB.GetGameFBDictByKey(ChConfig.Def_FB_TeamPlayerCount):  | 
|             fbPlayerCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_TeamFBPlayerCnt)  | 
|             gameFB.SetGameFBDict(ChConfig.Def_FB_TeamPlayerCount, fbPlayerCnt)  | 
|               | 
|         # Íæ¼ÒÉíÉÏ´øµÄÕâÈý¸öÖµÎÞÂÛʲôÇé¿ö£¬Ö»ÒªÒ»½ø×é¶Ó¸±±¾£¬²»¹ÜÓÐûÓÐÓõ½£¬ÓÐûÓÐÖµ£¬¾ùÖ±½ÓÖØÖ㬷ÀÖ¹Ó°Ïìµ½ÏÂÒ»´ÎµÄÂß¼  | 
|         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_TeamFBAverageLV, 0)  | 
|         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_TeamFBMaxLV, 0)  | 
|         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_TeamFBPlayerCnt, 0)  | 
|           | 
|     else:  | 
|         FBCommon.UpdFBLineNPCStrengthenLV(playerID, False)  | 
|         FBCommon.UpdFBLineNPCStrengthenPlayerCnt(playerID, False)  | 
|           | 
|     return  | 
|   | 
| def RecordFirstEnterMap(curPlayer, mapID):  | 
|     #¼Ç¼²ÎÓë¹ý¸±±¾  | 
|     needRecordMapIDList = ReadChConfig.GetEvalChConfig("MapID_FirstEnterRecord")  | 
|     recordMapID = FBCommon.GetRecordMapID(mapID)  | 
|     if recordMapID in needRecordMapIDList:  | 
|         index = needRecordMapIDList.index(recordMapID)  | 
|         curRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FBFirstEnterRecord)  | 
|         if not curRecord&pow(2, index):  | 
|             updRecord = curRecord|pow(2, index)  | 
|             PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FBFirstEnterRecord, updRecord)  | 
|     return  | 
|   | 
| def GetHadEnterFB(curPlayer, mapID):  | 
|     #ÊÇ·ñ½øÈë¹ý¸Ã¸±±¾  | 
|     needRecordMapIDList = ReadChConfig.GetEvalChConfig("MapID_FirstEnterRecord")  | 
|     recordMapID = FBCommon.GetRecordMapID(mapID)  | 
|     if recordMapID not in needRecordMapIDList:  | 
|         return False  | 
|     index = needRecordMapIDList.index(recordMapID)  | 
|     curRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FBFirstEnterRecord)  | 
|     return curRecord&pow(2, index)  | 
|   | 
| #---------------------------------------------------------------------  | 
| ##Í¨ÖªÍæ¼ÒµØÍ¼À뿪µ¹¼ÆÊ±.  | 
| # @param curPlayer Íæ¼ÒʵÀý  | 
| # @param tick Ê±¼ä´Á  | 
| # @return ·µ»ØÖµÎÞÒâÒå  | 
| # @remarks Í¨ÖªÍæ¼ÒµØÍ¼À뿪µ¹¼ÆÊ±  | 
| def Sync_LeaveMapTick(curPlayer, tick):  | 
|     gameMap = GameWorld.GetMap()  | 
|     gameMapID = gameMap.GetMapID()  | 
|     #¸±±¾²ß»®Ìî±í³ÖÐøÊ±¼ä  | 
|     mapExistTime = gameMap.GetExistTime()  | 
|       | 
|     #ÊÇ·ñ֪ͨ¸±±¾À뿪µ¹¼ÆÊ±  | 
|     if mapExistTime == 0 or (gameMap.GetMapFBType() in ChConfig.Def_FBNoShowLeaveTime) \  | 
|             or (gameMapID not in ChConfig.Def_FBShowLeaveMapTick_MapID):  | 
|         return  | 
|       | 
|     existTime = mapExistTime - (tick - GameWorld.GetGameWorld().GetOpenFBTick())  | 
|       | 
|     if existTime <= 0:  | 
|         #20090427, Íæ¼ÒÓпÉÄÜÔÚµØÍ¼openTickÉèÖÃǰµÇ¼,֪ͨµ¹¼ÆÊ±¾ÍΪ¸±±¾³ÖÐøÊ±¼ä  | 
|         existTime = mapExistTime  | 
|       | 
|     #֪ͨÀ뿪¸±±¾µ¹¼ÆÊ±  | 
|     GameWorld.Log("Íæ¼Ò = %sµÇ½µØÍ¼£¬Í¨ÖªÍæ¼ÒÀ뿪µØÍ¼µ¹¼ÆÊ± = %s" % (curPlayer.GetName(), existTime), curPlayer.GetID())  | 
|       | 
|     curPlayer.Sync_TimeTick(IPY_GameWorld.tttLeaveMap, 0, existTime, True)  | 
|     return  | 
| #------------------------------------------------------------------------  | 
| ## ¸±±¾³¬Ê±Âß¼  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoFBTimeOut(tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFBTimeOut"))  | 
|       | 
|     if callFunc:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         callFunc(tick)  | 
|       | 
|     return  | 
| #---------------------------------------------------------------------  | 
| ## Íæ¼ÒÀ뿪ʱ£¬ÉèÖÃÍæ¼ÒÀ뿪µÄʱ¼ä  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def __PlayerLeaveSetPlayerLogoffTick(curPlayer, tick):  | 
|     #Èç¹ûÊÇ×îºóÒ»¸öÈËÀ뿪¸±±¾, ÄÇôÉèÖø±±¾µÄÀ뿪ʱ¼ä, 5·ÖÖӺ󸱱¾¹Ø±Õ  | 
|     gameMap = GameWorld.GetMap()  | 
|     if gameMap.GetMapFBType() == 0:  | 
|         return  | 
|     gameWorld = GameWorld.GetGameWorld()  | 
|     playerManager = gameWorld.GetMapCopyPlayerManager()  | 
|     playerCount = playerManager.GetPlayerCount()  | 
|     if playerCount != 1:  | 
|         return  | 
|       | 
|     GameWorld.GetGameFB().SetPlayerLogoffTick(tick)  | 
|   | 
| ## Ö´ÐÐÍ˳ö¸±±¾Âß¼  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoExitFBLogic(curPlayer, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoExitFB"))  | 
|       | 
|     if callFunc:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         callFunc(curPlayer , tick)  | 
|       | 
|     #ÓÐÍæ¼ÒÀ뿪¸±±¾¹ã²¥Ò»´Î  | 
|     PlayerMergeEvent.BroadcastMergePlayerEvent()  | 
|       | 
|     #Èç¹ûÊÇ×îºóÒ»¸öÈËÀ뿪¸±±¾, ÄÇôÉèÖø±±¾µÄÀ뿪ʱ¼ä, 5·ÖÖӺ󸱱¾¹Ø±Õ  | 
|     __PlayerLeaveSetPlayerLogoffTick(curPlayer, tick)  | 
|     return  | 
|   | 
| ## Íæ¼ÒÖ÷¶¯Í˳öFB,ÏÈ´¦ÀíFBÏà¹ØÐÅÏ¢£¬ÔÙÈÃÍæ¼ÒÍ˳ö  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return True or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoPlayerLeaveFB(curPlayer, tick):  | 
|     # Ö»Íæ¼ÒÖ÷¶¯Í˳öʱ²Å´¥·¢¶¯Ì¬Ë¢Ð£¬µôÏß²»Ëã  | 
|     playerID = curPlayer.GetPlayerID()  | 
|     FBCommon.UpdFBLineNPCStrengthenLV(playerID, True)  | 
|     FBCommon.UpdFBLineNPCStrengthenPlayerCnt(playerID, True)  | 
|       | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoPlayerLeaveFB"))  | 
|       | 
|     if callFunc == None:  | 
|         return  | 
|       | 
|     #Ö´Ðи±±¾Âß¼  | 
|     return  callFunc(curPlayer, tick)  | 
|   | 
| ## Íæ¼ÒÇл»µØÍ¼  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return True or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoPlayerChangeMapLogic(curPlayer, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoPlayerChangeMapLogic"))  | 
|       | 
|     if callFunc == None:  | 
|         return True  | 
|       | 
|     #Ö´Ðи±±¾Âß¼  | 
|     return callFunc(curPlayer)  | 
|   | 
| ## Ñ¯ÎÊÍæ¼ÒÊÇ·ñ¿ÉÒÔÀ뿪¸±±¾  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @return True or False  | 
| def CanPlayerLeaveFB(curPlayer):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "CanPlayerLeaveFB"))  | 
|       | 
|     if callFunc == None:  | 
|         return True  | 
|       | 
|     #Ö´Ðи±±¾Âß¼  | 
|     return callFunc(curPlayer)  | 
|   | 
| ## Ñ¯ÎÊÍæ¼ÒÊÇ·ñÇл»Í¬¸ö¹¦ÄܵØÍ¼µÄ²»Í¬³¡¾°µØÍ¼  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @return True or False  | 
| def CanChangeSameDataMapFB(curPlayer, mapID, lineID):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "CanChangeSameDataMapFB"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     #Ö´Ðи±±¾Âß¼  | 
|     return callFunc(curPlayer, mapID, lineID)  | 
|   | 
| ## ÊÇ·ñ¿ÉÒÔ¿ªÊ¼ÊÕ¼¯  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param curNPC ÎïÆ·NPC  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return True or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnCanCollect(curPlayer, curNPC, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|   | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnCanCollect"))  | 
|       | 
|     if callFunc == None:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         return True  | 
|       | 
|     #Ö´Ðи±±¾Âß¼  | 
|     return  callFunc(curPlayer, curNPC, tick)  | 
|   | 
| ## ÅжÏÊÇ·ñµ½Ö¸¶¨Ê±¼ä  | 
| #  @param hour Ö¸¶¨µÄhour  | 
| #  @param min Ö¸¶¨µÄmin  | 
| #  @return True or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def __CheckTime(hour, min):  | 
|     today = GameWorld.GetCurrentTime()  | 
|       | 
|     if hour == today.hour and min == today.minute:  | 
|         return True  | 
|       | 
|     return  False  | 
|   | 
| ## ´Ë¸±±¾ÊÇÖÜÆÚÐÔ¿ªÆôµÄ, ¼ì²éÊÇ·ñÒª¿ªÆô´Ë¸±±¾  | 
| #  @param period Ö¸¶¨µÄvalue ÀàÐÍ  | 
| #  @param value Ö¸¶¨µÄday or Month  | 
| #  @param hour Ö¸¶¨µÄhour  | 
| #  @param minute Ö¸¶¨µÄmin  | 
| #  @return True or False or None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def __CheckOpenFBPeriod(period, value, hour, minute):  | 
|     #´Ë¸±±¾ÊÇÖÜÆÚÐÔ¿ªÆôµÄ, ¼ì²éÊÇ·ñÒª¿ªÆô´Ë¸±±¾  | 
| #    gameMap = GameWorld.GetMap()  | 
| #    period = gameMap.GetPeriod()  | 
|     if period == 0:  | 
|         return  | 
|       | 
|     today = GameWorld.GetCurrentTime()  | 
|     if period == IPY_GameWorld.gmpDay:  | 
|         #ÿÈÕ¿ªÆô  | 
|         pass          | 
|     elif period == IPY_GameWorld.gmpWeek:  | 
|         if today.weekday() + 1 != value:  | 
|             return False  | 
|     elif period == IPY_GameWorld.gmpMonth:  | 
|         if today.day != value:  | 
|             return False  | 
|           | 
|       | 
|     return __CheckTime(hour, minute)      | 
|   | 
| #==================================================================================  | 
| ## ÅжÏÌØÊâFB£¨Ä³ÔÂijÈÕ²ÅÄÜ¿ª£©ÊÇ·ñ¿ÉÒÔÆô¶¯  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return ×Ö·û´® ¡®None¡¯ or ÆäËû  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnCanOpen(tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnCanOpen"))  | 
|       | 
|     if callFunc == None:  | 
|         return 'None'  | 
|       | 
|     #Ö´Ðи±±¾Âß¼  | 
|     return callFunc(tick)  | 
|   | 
|   | 
| ## ¶¨Ê±µÄÈë¿Ú  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.      | 
| def OnProcess(tick):  | 
|     gameMap = GameWorld.GetMap()  | 
|     gameWorld = GameWorld.GetGameWorld()  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(gameMap.GetMapID())  | 
|     #---¸±±¾¹Ø±Õ״̬´¦Àí---  | 
|     if gameWorld.GetOpenState() == IPY_GameWorld.fbosClosed:  | 
|   | 
|         if gameWorld.GetFBFirstOpen():  | 
|             #¸±±¾ÒѾÔÚ×¼±¸¿ªÆô״̬ÁË  | 
|             return  | 
|           | 
|         openByTime = OnCanOpen(tick)  | 
|           | 
|         #¸±±¾¿ªÆôʱ¼äÌî±íµÄ¸±±¾  | 
|         if openByTime == 'None':  | 
|             #¸±±¾Ã»ÓпªÆô  | 
|             if not __CheckOpenFBPeriod(gameMap.GetPeriod(), gameMap.GetPeriodValue1(), gameMap.GetPeriodHour1(), gameMap.GetPeriodMinute1()) and \  | 
|                     not __CheckOpenFBPeriod(gameMap.GetPeriod(), gameMap.GetPeriodValue2(), gameMap.GetPeriodHour2(), gameMap.GetPeriodMinute2()):  | 
|                 return  | 
|               | 
|             #¿ªÆô´Ë¸±±¾  | 
|             gameWorld.SetFBFirstOpen(1)  | 
|           | 
|         #¸±±¾¿ªÆôʱ¼äÌîÔÚ¸±±¾pyÖеĸ±±¾  | 
|         elif openByTime:  | 
|             #¿ªÆô´Ë¸±±¾  | 
|             gameWorld.SetFBFirstOpen(1)  | 
|           | 
|         return  | 
|   | 
|     #---¸±±¾ÆäËû״̬´¦Àí---  | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnProcess"))  | 
|   | 
|     if not callFunc:  | 
|         return  | 
|   | 
|     #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|     callFunc(tick)  | 
|     return  | 
|   | 
| ## ÊÕ¼¯ÖÐ(¼Ò×åÕ½¸±±¾ÖÐµÄÆåºÍËþ)  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnCollecting(curPlayer, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnCollecting"))  | 
|     if callFunc:  | 
|         callFunc(curPlayer, tick)  | 
|     return  | 
|   | 
| ## ÊÕ¼¯³É¹¦(¼Ò×åÕ½¸±±¾ÖÐµÄÆåºÍËþ)  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnCollectOK(curPlayer, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnCollectOK"))  | 
|       | 
|     if callFunc == None:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         return False  | 
|       | 
|     #Ö´Ðи±±¾Âß¼  | 
|     callFunc(curPlayer, tick)  | 
|     return  | 
|   | 
| ## Íæ¼ÒÀ뿪¸±±¾  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def GameServer_LeaveFB(curPlayer, tick):  | 
|     if GameWorld.GetMap().GetMapFBType() != IPY_GameWorld.fbtTeam:  | 
|         #²»ÊÇ×é¶Ó¸±±¾, ·µ»Ø  | 
|         return  | 
|       | 
|     isLeave = True  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s"   | 
|                                      % (do_FBLogic_ID, "IsLeaveFBOnTeamChange"))  | 
|     if callFunc != None:  | 
|         isLeave = callFunc()  | 
|       | 
|     #GameServerÍ¨ÖªÍæ¼ÒÀ뿪¸±±¾  | 
|     #ÕâÀï¿ÉÒÔ¼ÓÉϵ¹¼ÆÊ±Âß¼  | 
|     if isLeave:  | 
|         PlayerControl.PlayerLeaveFB(curPlayer)  | 
|     return  | 
|   | 
| ## Íæ¼ÒÀ뿪¼Ò×帱±¾  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnLeaveFamily(curPlayer, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnLeaveFamily"))  | 
|       | 
|     if callFunc != None:  | 
|         return callFunc(curPlayer, tick)  | 
|       | 
|     if GameWorld.GetMap().GetMapFBType() == IPY_GameWorld.fbtFamily:  | 
|         PlayerControl.PlayerLeaveFB(curPlayer)  | 
|     elif GameWorld.GetMap().GetMapFBType() == IPY_GameWorld.fbtFamilyWar:  | 
|         PlayerControl.PlayerLeaveFB(curPlayer)  | 
|     return  | 
|   | 
| ## ¸±±¾Ã¿ÖÜÂß¼  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnWeek(tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnWeek"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     #Ö´Ðи±±¾Âß¼  | 
|     callFunc(tick)  | 
|     return  | 
|   | 
| ## ¸±±¾Ã¿ÈÕÂß¼  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnDay(tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnDay"))  | 
|       | 
|     if callFunc == None:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         return False  | 
|       | 
|     #Ö´Ðи±±¾Âß¼  | 
|     callFunc(tick)  | 
|     return  | 
|   | 
| ## ¸±±¾Ã¿ÈÕÂß¼-Íæ¼Ò, ²»¹ÜÍæ¼ÒÊÇ·ñÔڸø±±¾µØÍ¼Öж¼»á´¥·¢  | 
| def OnFBPlayerOnDay(curPlayer, onDayType):      | 
|     for key, mapIDList in ChConfig.Def_FB_MapID.items():  | 
|         if not mapIDList:  | 
|             continue  | 
|         mapID = mapIDList[0]  | 
|         ipyData = FBCommon.GetFBIpyData(mapID)  | 
|         if ipyData and ipyData.GetDayResetType():  | 
|             if onDayType != ipyData.GetDayResetType():  | 
|                 continue  | 
|         elif onDayType != ShareDefine.Def_OnEventTypeEx:  | 
|             continue  | 
|         callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (key, "OnFBPlayerOnDay"))  | 
|         if callFunc:  | 
|             callFunc(curPlayer)  | 
|     return  | 
|   | 
| ## Íæ¼ÒµÇ¼, ²»¹ÜÍæ¼ÒÊÇ·ñÔڸø±±¾µØÍ¼Öж¼»á´¥·¢  | 
| def OnFBPlayerOnLogin(curPlayer):  | 
|     for key in ChConfig.Def_FB_MapID.keys():  | 
|         callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (key, "OnFBPlayerOnLogin"))  | 
|         if callFunc:  | 
|             callFunc(curPlayer)  | 
|     return  | 
|   | 
| ## ¸±±¾Ã¿Ê±Âß¼  | 
| #  @param time Ê±¼ä  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnHour(time, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnHour"))  | 
|       | 
|     if callFunc == None:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         return False  | 
|       | 
|     #Ö´Ðи±±¾Âß¼  | 
|     callFunc(time, tick)  | 
|     return  | 
|   | 
|   | 
| #¹ØÏµÓÐ3²ã£¬ÎÞ-ÓѺÃ-µÐÈË  | 
| ## ÅжÏÊÇ·ñÎÞ¹ØÏµ£¬¼´ÊÇ·ñ¿ÉÊÍ·Å(Ôö/¼õ)¼¼ÄÜ»òÆÕ¹¥  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param curTagPlayer Ä¿±êÍæ¼Ò  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def CheckPlayersRelationInFB_IsNone(curPlayer , curTagPlayer):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "CheckPlayersRelation_IsNone"))  | 
|       | 
|     if callFunc == None:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         return False  | 
|       | 
|     return callFunc(curPlayer , curTagPlayer)  | 
|   | 
| ## ÅжÏÊÇ·ñÓѺùØÏµ£¬¸Ã²ãÅж¨ÎªÓѺÃÂß¼ÖеÄ×îºóÅÐ¶Ï  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param curTagPlayer Ä¿±êÍæ¼Ò  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def CheckPlayersRelationInFB_IsFriend(curPlayer , curTagPlayer):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "CheckPlayersRelation_IsFriend"))  | 
|       | 
|     if callFunc == None:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         return False  | 
|       | 
|     return callFunc(curPlayer , curTagPlayer)  | 
|   | 
| ## ÅжÏÊÇ·ñ¿ÉÒÔ¹¥»÷¶ÓÓÑ  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param curTagPlayer Ä¿±êÍæ¼Ò  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoCanAttackTeamer(curPlayer , curTagPlayer):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoCanAttackTeamer"))  | 
|       | 
|     if callFunc == None:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         return False  | 
|       | 
|     #»ñµÃʱ¼ä  | 
|     return callFunc(curPlayer , curTagPlayer)  | 
|   | 
|   | 
| #---------------------------------------------------------------------  | 
| ## ÖØÖø´»îµã  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param bornList ÖØÉúµã  | 
| #  @return None or True  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnRebornPlace(curPlayer, bornList):  | 
|     mapID = GameWorld.GetMap().GetMapID()  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(mapID)  | 
|       | 
|     #ÏÈÉèÖÃĬÈϵĸ±±¾ÖØÉúµã  | 
|     #__SetDefaultBornPlace(curPlayer, bornList, mapID)  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnSetRebornPlace"))  | 
|       | 
|     if callFunc == None:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         return True  | 
|       | 
|     #»ñµÃʱ¼ä  | 
|     callFunc(curPlayer , bornList)  | 
|     return  | 
|   | 
| #===============================================================================  | 
| # ## ÖØÖø´»îµã  | 
| # #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| # #  @param bornList ÖØÉúµã  | 
| # #  @param mapID ÖØÉúµØÍ¼  | 
| # #  @return None  | 
| # #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| # def __SetDefaultBornPlace(curPlayer , bornList , mapID):  | 
| #    gameData = GameWorld.GetGameData()  | 
| #    for i in range(len(bornList)):  | 
| #        bornIndex = bornList[i]  | 
| #        bornRefreshPoint = gameData.GetBornRefreshByIndex(bornIndex)  | 
| #        if GameWorld.IsSameCountry(curPlayer, bornRefreshPoint):  | 
| #            GameWorld.Log("Íæ¼Ò%s,ÉèÖÃĬÈÏÖØÉúµã³É¹¦ mapID = %s-(%s,%s)"%(curPlayer.GetPlayerName(), mapID, bornRefreshPoint.GetPosX(), bornRefreshPoint.GetPosY()) , curPlayer.GetPlayerID())  | 
| #            curPlayer.SetFBRebornMapID(mapID)  | 
| #            curPlayer.SetFBRebornPosX(bornRefreshPoint.GetPosX())  | 
| #            curPlayer.SetFBRebornPosY(bornRefreshPoint.GetPosY())  | 
| #            return  | 
| #          | 
| #    return  | 
| #===============================================================================  | 
| #---------------------------------------------------------------------  | 
| def GetFBNPCStrengthenAttr(curNPC, isReborn):  | 
|     ## »ñÈ¡¸±±¾NPCÖ¸¶¨³É³¤ÊôÐÔ×Öµä  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "GetFBNPCStrengthenAttr"))  | 
|     if not callFunc:  | 
|         return {}  | 
|       | 
|     ret = callFunc(curNPC, isReborn)  | 
|     # ±ØÐë·µ»Ø×Öµä  | 
|     if not isinstance(ret, dict):  | 
|         return {}  | 
|     return ret  | 
|   | 
| ## »ñµÃ¸±±¾LoadIngʱ¼ä  | 
| #  @param Õ¼ÁìÈË  | 
| #  @param ±»Õ¼ÁìµÄNPC  | 
| #  @return Ê±¼ä È磺ChConfig.Def_DigMaxTime  | 
| #  @remarks #¸±±¾ÖÐ,Õ¼ÁìNPCµÄLoadingʱ¼ä  | 
| def GetFBPrepareTime(curPlayer, curNPC):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "GetFBPrepareTime"))  | 
|       | 
|     if not callFunc:  | 
|         return ChConfig.Def_DigMaxTime  | 
|       | 
|     return callFunc(curPlayer, curNPC)  | 
|   | 
| ## ÌØÊ⸱±¾¼ÓѪ  | 
| def OnFBAddHP(curPlayer, addHP):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnFBAddHP"))  | 
|       | 
|     if not callFunc:  | 
|         return  | 
|       | 
|     return callFunc(curPlayer, addHP)  | 
|   | 
| ## ÌØÊ⸱±¾µôѪ  | 
| def OnFBLostHP(curPlayer, lostHP):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnFBLostHP"))  | 
|       | 
|     if not callFunc:  | 
|         return  | 
|       | 
|     return callFunc(curPlayer, lostHP)  | 
|   | 
| ## »ñÈ¡ÌØÊ⸱±¾µ±Ç°ÑªÁ¿  | 
| def OnGetFBCurHP(curPlayer):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnGetFBCurHP"))  | 
|       | 
|     if not callFunc:  | 
|         return curPlayer.GetHP()  | 
|       | 
|     return callFunc(curPlayer)  | 
|   | 
| #---------------------------------------------------------------------  | 
| ## Íæ¼ÒÖ÷¶¯À뿪¸±±¾  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnExitEvent(curPlayer, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnExitEvent"))  | 
|       | 
|     if callFunc == None:  | 
|         #GameWorld.Log("¸±±¾Âß¼²»¿ÉʹÓà  GameLogic_%d"%(mapID))  | 
|         return False  | 
|       | 
|     callFunc(curPlayer, tick)  | 
|     return  | 
| #---------------------------------------------------------------------  | 
| ## Íæ¼Ò¸ÕµÇ½ʱ£¬ÒªÅжÏÍæ¼ÒÊÇ·ñ»¹ÊôÓÚÕâ¸ö¸±±¾  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None or True  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def PlayerLoginInFBCheck(curPlayer, tick):  | 
|     gameMap = GameWorld.GetMap()  | 
|     #Èç¹û´ËµØÍ¼ÊÇ×Ô¶¯ÊͷŵÄ, ÐèÒª¼ì²éÕâ¸öÍæ¼Ò  | 
|     if gameMap.GetMapFBType() == 0:  | 
|         return False  | 
|       | 
|     #Íæ¼Ò ÔÚ¸±±¾ÖУ¬²¢ÇÒ¸±±¾²»Ìß³öÍæ¼ÒÏÂÏß  | 
|     if GameWorld.GetGameFB().HaveFBPlayer(curPlayer.GetID()):  | 
|     #and gameMap.GetMapID() not in ChConfig.Def_DisconnectExit_FBID:  | 
|         return False  | 
|       | 
|     #¸±±¾Ã»ÓÐÕâ¸öÍæ¼Ò, ÈÃÕâ¸öÍæ¼ÒÀ뿪µØÍ¼  | 
|     PlayerControl.PlayerLeaveFB(curPlayer)  | 
|     return True  | 
| #---------------------------------------------------------------------  | 
| ## Íæ¼ÒÊÇ·ñ¿ÉÒÔÒÆ¶¯  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param destX Òƶ¯µ½µÄ×ø±êX  | 
| #  @param destY Òƶ¯µ½µÄ×ø±êY  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return False or True  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoFBCanMove(curPlayer , destX , destY , tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnCanMove"))  | 
|       | 
|     if callFunc == None:  | 
|         return True  | 
|       | 
|     return callFunc(curPlayer, destX , destY , tick)  | 
| #---------------------------------------------------------------------  | 
| ## ¸±±¾ID  | 
| #  @param mapID ¸±±¾ID   | 
| #  @return mapID  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def __GetFBLogic_MapID(mapID):  | 
|     #ManorWarMapIDList = ReadChConfig.GetEvalChConfig("ManorWarMapID")    | 
|     #if mapID in ManorWarMapIDList:  | 
|     #    return 'ManorWar'  | 
|     mapID = FBCommon.GetRecordMapID(mapID)  | 
|     for key, value in ChConfig.Def_FB_MapID.items():  | 
|         if mapID in value:  | 
|             return key  | 
|           | 
|     #for key , value in ReadChConfig.GetEvalChConfig("MapID_ProcessPy").items():  | 
|     #    if mapID in value:  | 
|     #        return key  | 
|           | 
|     return mapID  | 
|   | 
| #---------------------------------------------------------------------  | 
| #===============================================================================  | 
| ## Åжϸ±±¾ÄÚÊÇ·ñ¿ÉʹÓÃGMÃüÁî  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param inputStr ÃüÁî×Ö·û´®  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return True or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnGMCommand(curPlayer, inputStr, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnGMCommand"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     return callFunc(curPlayer, inputStr, tick)  | 
|           | 
| #===============================================================================  | 
| ## FBÈ«ÆÁÊÓÒ° ¿ÉÄܻᶯ̬µ÷ÓÃÍæ¼ÒÊÓÒ°  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return True or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnPlayerSight(curPlayer, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnPlayerSight"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     return callFunc(curPlayer, tick)  | 
|   | 
| #=================================================================================  | 
| ## FB¸´»î²»¼ÓÐéÈõBUFF´¦Àí  | 
| #  @param ÎÞ   | 
| #  @return True or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnPlayerReborn():  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnPlayerReborn"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     return callFunc()  | 
|   | 
| ## Íæ¼Ò¸´»îºó¸±±¾´¦Àí  | 
| def OnPlayerRebornOver(curPlayer, playerRebornType):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnPlayerRebornOver"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     return callFunc(curPlayer, playerRebornType)  | 
|       | 
| ## ¿Û³ýÍæ¼ÒFBÃâ·Ñ¸´»î´ÎÊý  | 
| #  @param None  | 
| #  @return ¿ÉÃâ·Ñ¸´»îµÄ´ÎÊý  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DecFreeRebornCount(curPlayer):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DecFreeRebornCount"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     return callFunc(curPlayer)  | 
|   | 
| ## Íæ¼Ò¸±±¾ÖØÉúÉèÖÃ×ø±ê  | 
| #  @param rebornPlace ¸´»îλÖà  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnResetFBRebornPlacePos(curPlayer, rebornPlace, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnResetFBRebornPlacePos"))  | 
|       | 
|     if callFunc == None:  | 
|         return  | 
|       | 
|     return callFunc(curPlayer, rebornPlace, tick)  | 
|   | 
| #---------------------------------------------------------------------  | 
| ## É±¹Ö½±ÀøÊÇ·ñ¸ø×îºóÒ»¸ö²¹µ¶µÄÍæ¼Ò  | 
| #  @param ÎÞ  | 
| #  @return True or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnGivePrizeByLastHurt(curNPC):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnGivePrizeByLastHurt"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     return callFunc(curNPC)  | 
| #---------------------------------------------------------------------  | 
| ## É±¹Ö¸øÓèÈ«²¿¾Ñé  | 
| #  @param ÎÞ  | 
| #  @return True or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnKillNPCGiveAllExp():  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnKillNPCGiveAllExp"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     return callFunc()  | 
|   | 
|   | 
| ## »ñµÃÌØÊ⸱±¾npcµôÂä½ðÇ®  | 
| #  @param curPlayer   | 
| #  @return None  | 
| def OnGetNPCExp(curPlayer, curNPC):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnGetNPCExp"))  | 
|       | 
|     if not callFunc:  | 
|         return 0  | 
|           | 
|       | 
|     return callFunc(curPlayer, curNPC)  | 
|   | 
| ## »ñµÃÍâ²ã¾Ñé±¶ÂÊ  | 
| def OnGetOuterExpRate(curPlayer):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnGetOuterExpRate"))  | 
|       | 
|     if callFunc == None:  | 
|         return 0  | 
|       | 
|     return callFunc(curPlayer)  | 
|   | 
| ## »ñµÃ¾Ñé  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param addExp »ñµÃµÄ¾Ñé  | 
| #  @param expViewType ¾ÑéÀàÐÍ  | 
| #  @return True or False  | 
| def OnGetExp(curPlayer, addExp, expViewType):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnGetExp"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     return callFunc(curPlayer, addExp, expViewType)  | 
|   | 
| ## »ñµÃ¶à±¶¸±±¾½±Àø  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param mapID   | 
| #  @param lineID   | 
| #  @param prizeExLV ¶îÍâ½±Àø°Ù·Ö±ÈµÈ¼¶  | 
| #  @return  | 
| def OnGetMultiFBPrize(curPlayer, mapID, lineID, prizeExLV):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(mapID)  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnGetMultiFBPrize"))  | 
|       | 
|     if callFunc == None:  | 
|         return  | 
|       | 
|     return callFunc(curPlayer, mapID, lineID, prizeExLV)  | 
|   | 
| ## ¸±±¾É¨µ´Ñ¯ÎÊ  | 
| def OnPlayerFBSweepAsk(curPlayer, mapID, lineID, cnt, isFinish, dataEx):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(mapID)  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnPlayerFBSweepAsk"))  | 
|       | 
|     # Ã»ÓжîÍâÌõ¼þÅжÏĬÈÏ·µ»ØTrue  | 
|     if callFunc == None:  | 
|         return True  | 
|   | 
|     return callFunc(curPlayer, mapID, lineID, cnt, isFinish, dataEx)  | 
|   | 
| ## ¸±±¾É¨µ´½á¹û  | 
| def OnPlayerFBSweepResult(curPlayer, mapID, lineID, cnt, isFinish, dataEx):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(mapID)  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnPlayerFBSweepResult"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|   | 
|     return callFunc(curPlayer, mapID, lineID, cnt, isFinish, dataEx)  | 
|   | 
| ## ¿ªÊ¼¹«¹²CD¸±±¾É¨µ´  | 
| def OnStartPubCDFBSweep(curPlayer, mapID, lineID, cnt, dataEx):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(mapID)  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnStartPubCDFBSweep"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     return callFunc(curPlayer, mapID, lineID, cnt, dataEx)  | 
|   | 
| ## ¸ø¹«¹²CD¸±±¾É¨µ´½±Àø  | 
| def OnGivePubCDFBSweepPrize(curPlayer, mapID, lineID, cnt, dataEx):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(mapID)  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnGivePubCDFBSweepPrize"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     return callFunc(curPlayer, mapID, lineID, cnt, dataEx)  | 
|   | 
| #---------------------------------------------------------------------  | 
|   | 
| ## Çл»µØÍ¼Ñ¯ÎÊ(ֻѯÎʵÚÒ»ÌõÏß) ÅжÏÊÇ·ñ¿ÉÒÔ½øÈ븱±¾  | 
| #  @param ask ÇëÇóÐÅÏ¢  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None or IPY_GameWorld.cmeAccept Ö®Àà  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnChangeMapAsk(ask , tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnChangeMapAsk"))  | 
|       | 
|     if callFunc == None:  | 
|         return None  | 
|       | 
|     return callFunc(ask , tick)  | 
|   | 
|   | 
| ## ¼ì²éÊÇ·ñ¿ÉÒÔ½øÈëFB ÊÇ·ñÄܹ»Í¨¹ý»î¶¯²éѯ½øÈë  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param mapID µØÍ¼ID  | 
| #  @param lineID Ïß·id  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return True or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnEnterFBEvent(curPlayer, mapID, lineID, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(mapID)  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnEnterFBEvent"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     return callFunc(curPlayer, mapID, lineID, tick)  | 
|   | 
| ## ÇëÇó½øÈ븱±¾µÄµã ¸±±¾Íæ¼Ò½øÈëµã£¨×ø±ê£©  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param mapID µØÍ¼ID  | 
| #  @param lineId ·ÖÏßID  | 
| #  @param ipyEnterPosInfo ¹¦ÄÜÏß·IPYÅäÖÃ×ø±êÐÅÏ¢  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None or (x£¬y)  | 
| def OnGetFBEnterPos(curPlayer, mapID, lineId, ipyEnterPosInfo, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(mapID)  | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnGetFBEnterPos"))  | 
|       | 
|     if callFunc == None:  | 
|         return  | 
|       | 
|     posInfo = callFunc(curPlayer, mapID, lineId, ipyEnterPosInfo, tick)  | 
|     if not posInfo:  | 
|         return  | 
|     enterX, enterY = posInfo[:2]  | 
|     dist = posInfo[2] if len(posInfo) > 2 else 0  | 
|     if dist <= 0:  | 
|         return enterX, enterY  | 
|     # ÓÉÓÚµ÷Óô˺¯ÊýµÄÒ»°ãÊÇÔÚÍæ¼Ò´«ËÍ֮ǰµÄµØÍ¼£¬ÎÞ·¨ÖªµÀÄ¿±êµØÍ¼µÄÕϰµã¼°µãÉϵÄʵÀýÃ÷ϸ  | 
|     # ¹ÊÖ»ÄÜ´¿·¶Î§Ëæ»ú£¬²ß»®ÅäÖÃÐèÈ·±£Ô²È¦ÄÚÎÞÕϰµã£»ÎÞÊÓËæ»úµ½Í¬Ò»×ø±êµ¼ÖµÄÇÐͼºóÈËÎïÖØµþÎÊÌâ  | 
|     #posPoint = GameMap.GetEmptyPlaceInArea(enterX, enterY, dist)  | 
|     #return posPoint.GetPosX(), posPoint.GetPosY()  | 
|     return random.randint(enterX - dist, enterX + dist), random.randint(enterY - dist, enterY + dist)  | 
|   | 
| #---------------------------------------------------------------------  | 
| ## ÊÇ·ñ½ûֹʹÓü¼ÄÜ  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return True or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnForbidUseSkill(curPlayer , tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnForbidUseSkill"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     return callFunc(curPlayer, tick)  | 
|   | 
| ## Ïû³ýÒþÉíÂß¼  | 
| #  @param curPlayer ¹¥»÷·½  | 
| #  @param target ·ÀÊØ·½  | 
| #  @param curSkill Ê¹Óü¼ÄÜ  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.Ⱥ¹¥Ê±targetÃ²ËÆÊÇ×Ô¼º±¾Éí  | 
| def DoFBAttackedOver(curPlayer, target, curSkill, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFBAttackedOver"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(curPlayer, target, curSkill, tick)  | 
|       | 
|     return  | 
|   | 
| ## ±»¹¥»÷½áÊø  | 
| #  @param curPlayer ¹¥»÷·½  | 
| #  @param target ·ÀÊØ·½  | 
| #  @param curSkill Ê¹Óü¼ÄÜ  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| def DoBeAttackOver(attacker, defender, curSkill, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoBeAttackOver"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(attacker, defender, curSkill, tick)  | 
|       | 
|     return  | 
|   | 
| ## ¸±±¾ÖÐʹÓÃÎïÆ·  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param curEffID ÎïÆ·µÄЧ¹û  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoUseItem(curPlayer, curEffID, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoUseItem"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(curPlayer, curEffID, tick)  | 
|       | 
|     return  | 
|   | 
| ## buffÏûʧ  | 
| #  @param obj  | 
| #  @param µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoBuffDisAppear(curObj, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoBuffDisAppear"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(curObj, tick)  | 
|       | 
|     return  | 
|   | 
| ## NPC¹¥»÷³É¹¦ºóFB´¦Àí(˵Ã÷£º½øÈëÕâ¸öº¯ÊýµÄʱºò£¬¹ÖÎïÒѾËÀÍö£¬µôÂä¾ÑéµÈ¶¼´¦Àí¹ýÁË)  | 
| #  @param curNPC ¹¥»÷·½  | 
| #  @param target ·ÀÊØ·½  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoOverNPCAttackSuccess(curNPC, target, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoOverNPCAttackSuccess"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(curNPC, target, tick)  | 
|       | 
|     return  | 
|   | 
| ## Íæ¼ÒËÀÍö  | 
| #  @param curPlayer:ËÀÍöµÄÍæ¼Ò   | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoPlayerDead(curPlayer):  | 
|       | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoPlayerDead"))  | 
|       | 
|     if callFunc == None:  | 
|         return  | 
|       | 
|     return callFunc(curPlayer)  | 
|   | 
| #---------------------------------------------------------------------  | 
| ## ¸±±¾»Ø³Ì¸´»îϵͳÌáʾ  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @return True or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoNotifyReBorn(curPlayer):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoNotifyReBorn"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     return callFunc(curPlayer)  | 
| #---------------------------------------------------------------------  | 
| ## ¼ì²é¸±±¾¹¥»÷ÊÇ·ñÓй¥»÷³Í·£  | 
| #  @param curPlayer ¹¥»÷·½  | 
| #  @param curTagPlayer ·ÀÊØ·½  | 
| #  @return ·µ»ØÖµÕæ, Óгͷ£  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoFBAttackHasPunish(curPlayer, curTagPlayer):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFBAttackHasPunish"))  | 
|       | 
|     if callFunc == None:  | 
|         return True  | 
|       | 
|     return callFunc(curPlayer, curTagPlayer)  | 
|   | 
| ## FBÎïÆ·Ê¹ÓÃÏÞÖÆ  | 
| #  @param curPlayer µ±Ç°µÄÍæ¼Ò  | 
| #  @param curItem ±»ÏÞÖÆµÄÎïÆ·  | 
| #  @return True or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoFBForbidUseItem(curPlayer, curItem):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFBForbidUseItem"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     return callFunc(curPlayer, curItem)  | 
|   | 
| ## FB½ûֹԵظ´»î  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param rebornTypwe ¸´»îÀàÐÍ  | 
| #  @return True or False  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoFBForbidReborn(curPlayer, rebornTypwe):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFBForbidReborn"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     return callFunc(curPlayer, rebornTypwe)  | 
|   | 
| #---------------------------------------------------------------------  | 
| ##»ñµÃÍæ¼Ò´«È븱±¾ÐèҪЯ´øµÄÐÅÏ¢  | 
| # @param curPlayer Íæ¼ÒʵÀý  | 
| # @param resetMapID Çл»µ½µÄµØÍ¼ID  | 
| # @param lineId ·ÖÏßID  | 
| # @return ×Ö·û´®  | 
| # @remarks »ñµÃÍæ¼Ò´«È븱±¾ÐèҪЯ´øµÄÐÅÏ¢  | 
| def GetPlayerResetWorldPosFBMsg(curPlayer, resetMapID, lineId):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(resetMapID)  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "GetPlayerResetWorldPosFBMsg"))  | 
|       | 
|     if callFunc == None:  | 
|         return ''  | 
|       | 
|     return callFunc(curPlayer, lineId)  | 
| #---------------------------------------------------------------------  | 
| ##¸±±¾Ê¹ÓÃÌØÊ⹦ÄÜ£¨¼¼ÄÜ£©  | 
| # @param curPlayer Íæ¼ÒʵÀý  | 
| # @param useType Ê¹ÓÃÀàÐÍ  | 
| # @param useState Ê¹ÓÃ״̬  | 
| # @return ÎÞÒâÒå  | 
| # @remarks ¸±±¾Ê¹ÓÃÌØÊâ¼¼ÄÜ  | 
| def UseFBSpecilSkill(curPlayer, useType, useState, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "UseFBSpecilSkill"))  | 
|       | 
|     if callFunc == None:  | 
|         return  | 
|       | 
|     return callFunc(curPlayer, useType, useState, tick)  | 
|   | 
|       | 
| ##¸±±¾ÓÐNPCÖØÉú  | 
| # @param curNPC:  | 
| # @param tick:tick  | 
| # @return None  | 
| def DoFBRebornNPC(curNPC, tick):  | 
|       | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFBRebornNPC"))  | 
|       | 
|     if callFunc == None:  | 
|         return  | 
|       | 
|     return callFunc(curNPC, tick)  | 
|   | 
|       | 
| ##¸±±¾ÓÐSummonNPCÕÙ³ö  | 
| # @param npcId:NpcID  | 
| # @param tick:tick  | 
| # @return None  | 
| def DoFBRebornSummonNPC(curNPC, tick):  | 
|       | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFBRebornSummonNPC"))  | 
|       | 
|     if callFunc == None:  | 
|         return  | 
|       | 
|     return callFunc(curNPC, tick)  | 
|   | 
| ##¼ì²éÊÇ·ñ¿É¹¥»÷£¬Ö÷ÒªÅж¨²»¿É¹¥»÷µÄÇé¿ö  | 
| # @param curNPC NPC  | 
| # @param curPlayer Íæ¼ÒʵÀý  | 
| # @return bool  | 
| def CheckCanAttackTagObjInFB(attacker, defender):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "CheckCanAttackTagObjInFB"))  | 
|       | 
|     if callFunc != None:  | 
|         return callFunc(attacker, defender)  | 
|       | 
|     return True  | 
|   | 
|   | 
| ## Íæ¼Ò»÷É±Íæ¼Ò½±Àø(ÍþÍû, ¼Ò×å»îÔ¾µÈ)  | 
| #  @param attacker: ¹¥»÷·½  | 
| #  @param defender: ·ÀÊØ·½  | 
| #  @param tick: Ê±¼ä´Á  | 
| #  @return: ÊÇ·ñ¸øÓè½±Àø(ĬÈϸøÓè)  | 
| def DoFBOnKill_Player_ValuePrize(attacker, defender, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFBOnKill_Player_ValuePrize"))  | 
|       | 
|     if callFunc != None:  | 
|         return callFunc(attacker, defender, tick)  | 
|       | 
|     return True  | 
|   | 
|   | 
| ## Ê°È¡ÎïÆ·  | 
| #  @param curPlayer ¹¥»÷·½  | 
| #  @param curItem ÎïÆ·  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| def OnFBPickUpItem(curPlayer, curItem, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnPickUpItem"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(curPlayer, curItem, tick)  | 
|       | 
|     return  | 
|   | 
| ## »ñµÃ½ðÇ®  | 
| #  @param curPlayer ¹¥»÷·½  | 
| #  @param curItem ÎïÆ·  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| def OnFBGetMoney(curPlayer, moneyType, moneyCount):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnFBGetMoney"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(curPlayer, moneyType, moneyCount)  | 
|       | 
|     return  | 
|   | 
| ## »ñµÃÌØÊ⸱±¾npcµôÂä½ðÇ®  | 
| #  @param curPlayer   | 
| #  @return None  | 
| def OnGetNPCDropMoney(curPlayer):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnGetNPCDropMoney"))  | 
|       | 
|     if not callFunc:  | 
|         return 0  | 
|           | 
|       | 
|     return callFunc(curPlayer)  | 
|   | 
| ## »ñµÃÍâ²ã½ð±Ò±¶ÂÊ  | 
| #  @param curPlayer  | 
| #  @return None  | 
| def OnGetOuterMoneyRate(curPlayer):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnGetOuterMoneyRate"))  | 
|       | 
|     if callFunc == None:  | 
|         return 0  | 
|       | 
|     return callFunc(curPlayer)  | 
|   | 
|   | 
| ## ¸±±¾ÐÐΪ  | 
| #  @param curPlayer ¹¥»÷·½  | 
| #  @param actionType ÐÐΪÀàÐÍ  | 
| #  @param actionInfo ÐÐΪÐÅÏ¢  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| def DoFBAction(curPlayer, actionType, actionInfo, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFBAction"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(curPlayer, actionType, actionInfo, tick)  | 
|       | 
|     return  | 
|   | 
|   | 
| ## »ñÈ¡Íæ¼ÒËùÊôÏß·id  | 
| #  @param curPlayer Íæ¼Ò  | 
| #  @param mapID Ä¿±êµØÍ¼id  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None-δÕÒµ½£¬Ïß·id - 0~N  | 
| def GetPlayerFBLineID(curPlayer, mapID, tick):  | 
|       | 
|     do_FBLogic_ID = __GetFBLogic_MapID(mapID)  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "GetPlayerFBLineID"))  | 
|       | 
|     if callFunc:  | 
|         return callFunc(curPlayer, tick)  | 
|       | 
|     return  | 
|   | 
|   | 
| ## »ñÈ¡¸±±¾Ïß·×î´óÍæ¼ÒÈËÊý  | 
| #  @param mapID Íæ¼Ò  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None-δÕÒµ½£¬Ïß·id - 0~N  | 
| def GetFBLineMaxPlayerCount(mapID):  | 
|       | 
|     do_FBLogic_ID = __GetFBLogic_MapID(mapID)  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "GetFBLineMaxPlayerCount"))  | 
|       | 
|     if callFunc:  | 
|         return callFunc()  | 
|       | 
|     return 0  | 
|   | 
|   | 
| ## ¸±±¾»î¶¯ÊÇ·ñÔÚ½øÐÐÖÐ  | 
| #  @param None  | 
| #  @return None  | 
| def IsFBActivityUnderway():  | 
|       | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "IsFBActivityUnderway"))  | 
|       | 
|     if callFunc:  | 
|         return callFunc()  | 
|       | 
|     return False  | 
|   | 
| ## »÷ɱÉ˺¦ÅÅÐÐ  | 
| #  @param None  | 
| #  @return None  | 
| def OnHurtValueOrder(curPlayer, npcID, hurtValue, order, giveItemList):  | 
|       | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnHurtValueOrder"))  | 
|       | 
|     if callFunc:  | 
|         return callFunc(curPlayer, npcID, hurtValue, order, giveItemList)  | 
|       | 
|     return False  | 
|   | 
| ## Íæ¼Ò¶ÔNPCÔì³ÉÉ˺¦  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param curNPC   | 
| #  @param hurtHP   | 
| #  @return None  | 
| def DoFB_Player_HurtNPC(curPlayer, curNPC, hurtHP):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFB_Player_HurtNPC"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(curPlayer, curNPC, hurtHP)  | 
|       | 
|     return  | 
|   | 
| ## NPC¶ÔNPCÔì³ÉÉ˺¦  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param curNPC   | 
| #  @param hurtHP   | 
| #  @return None  | 
| def DoFB_NPC_HurtNPC(curPlayer, curNPC, hurtHP):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "DoFB_NPC_HurtNPC"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(curPlayer, curNPC, hurtHP)  | 
|     return  | 
|   | 
|   | 
| ## »ñÈ¡NPCÎïÆ·µôÂä±£»¤ÕóÓª  | 
| #  @param curNPC  | 
| #  @return >0±íʾÓÐÕóÓª±£»¤  | 
| def GetNPCItemProtectFaction(curNPC):  | 
|       | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "GetNPCItemProtectFaction"))  | 
|       | 
|     if callFunc:  | 
|         return callFunc(curNPC)  | 
|       | 
|     return 0  | 
|   | 
| ## bossÉËѪÁбíͬ²½  | 
| #  @param objID µ±Ç°Íæ¼Ò  | 
| #  @param npcID   | 
| #  @param sortHurtList: µ¹ÐòÅÅÁеÄÉ˺¦ÁÐ±í   | 
| #  @return   | 
| #  ±¾º¯ÊýΪ·Ç»÷ɱµÄÉËѪͬ²½£¬ÔÚÇå³ýÉËѪÁбíǰͬ²½£» ×¢ÒâÓëOnBossKilledHurtListÇø±ð£»  | 
| #  Èç¹ûbossÊDZ»»÷ɱµÄ£¬Ôò´Ëº¯ÊýÖеÄÉËѪÁбíÒ»°ãΪ¿Õ£¬ÒòΪÉËѪÁбíÔÚ´¦ÀíOnBossKilledHurtListʱÒѱ»Çå³ý  | 
| def OnBossHurtListClear(objID, npcID, sortHurtList):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnBossHurtListClear"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(objID, npcID, sortHurtList)  | 
|       | 
|     return  | 
|   | 
| ## boss±»»÷ɱÉËѪÁбíͬ²½  | 
| #  @param objID µ±Ç°Íæ¼Ò  | 
| #  @param npcID   | 
| #  @param sortHurtList: µ¹ÐòÅÅÁеÄÉ˺¦ÁÐ±í   | 
| #  @return None  | 
| def OnBossKilledHurtList(objID, npcID, sortHurtList):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnBossKilledHurtList"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(objID, npcID, sortHurtList)  | 
|       | 
|     return  | 
|   | 
| ## PVPÉ˺¦Ïà¹Ø  | 
| def OnPVPDamage(curPlayer, damageValue, tagPlayer):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnPVPDamage"))  | 
|       | 
|     if callFunc:  | 
|         tick = GameWorld.GetGameWorld().GetTick()  | 
|         callFunc(curPlayer, damageValue, tagPlayer, tick)  | 
|           | 
|     return  | 
|   | 
| ## ±êʶµã¹Ø±ÕË¢¹Ö֪ͨ  | 
| #  @param refreshMark   | 
| #  @return None  | 
| def OnCloseNPCRefresh(refreshMark, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnCloseNPCRefresh"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(refreshMark, tick)  | 
|       | 
|     return  | 
|   | 
| ## TDË¢¹Ö±¾´ó²¨Ë¢¹Ö½áÊø  | 
| #  @param refreshMark   | 
| #  @return None  | 
| def OnTDCurWheelOver(refreshMark, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnTDCurWheelOver"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(refreshMark, tick)  | 
|       | 
|     return  | 
|   | 
| ## TDË¢¹ÖËùÓдó²¨Ë¢¹Ö½áÊø  | 
| #  @param refreshMark   | 
| #  @return None  | 
| def OnTDAllWheelOver(tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnTDAllWheelOver"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(tick)  | 
|       | 
|     return  | 
|   | 
| ## Ë¢¹Ö֪ͨ  | 
| #  @param refreshMark   | 
| #  @return None  | 
| def OnPointRefresh(step, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnPointRefresh"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(step, tick)  | 
|       | 
|     return  | 
|   | 
| def OnMoveTouchNPC(curPlayer, curNPC, tick):  | 
|     ## ´¥ÅöNPC´¦ÀíÂß¼  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnMoveTouchNPC"))  | 
|       | 
|     if callFunc:  | 
|         callFunc(curPlayer, curNPC, tick)  | 
|     return  | 
|   | 
| ## ¿Í»§¶Ë·¢ËͽáÊø¸±±¾  | 
| def OnClientEndFB(curPlayer, mapID, lineID, dataList):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(mapID)  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnClientEndFB"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     return callFunc(curPlayer, mapID, lineID, dataList)  | 
|   | 
| ## ¿Í»§¶Ë·¢ËÍ¿ªÊ¼¸±±¾  | 
| def OnClientStartFB(curPlayer, tick):  | 
|     do_FBLogic_ID = __GetFBLogic_MapID(GameWorld.GetMap().GetMapID())  | 
|       | 
|     callFunc = GameWorld.GetExecFunc(FBProcess, "GameLogic_%s.%s" % (do_FBLogic_ID, "OnClientStartFB"))  | 
|       | 
|     if callFunc == None:  | 
|         return False  | 
|       | 
|     return callFunc(curPlayer, tick)  | 
|   |