#!/usr/bin/python # -*- coding: GBK -*- #------------------------------------------------------------------------------- # ##@package GameWorldLogic.FBProcess.GameLogic_Guard # # @todo:ÊØ»¤¸±±¾ # @author xdh # @date 2017-12-22 # @version 1.0 # # ÏêϸÃèÊö: ÊØ»¤¸±±¾ # #------------------------------------------------------------------------------- #"""Version = 2017-12-22 14:00""" #------------------------------------------------------------------------------- import ChConfig import FBCommon import GameWorld import IPY_GameWorld import ItemControler import PlayerControl import EventShell ## ÊÇ·ñÄܹ»Í¨¹ý»î¶¯²éѯ½øÈë # @param curPlayer Íæ¼ÒʵÀý # @param mapID µØÍ¼ID # @param lineID Ïß·id # @param tick ʱ¼ä´Á # @return ²¼¶ûÖµ def OnEnterFBEvent(curPlayer, mapID, lineID, tick): hasEnter = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False, [mapID]) if hasEnter: GameWorld.DebugLog(" ÒѽøÈë¹ý¸±±¾%s" % lineID) return False return True def OnClientEndFB(curPlayer, mapID, lineID, dataList): #¿Í»§¶Ë¸±±¾·¢ËͽáÊø if PlayerControl.GetCustomMapID(curPlayer) != mapID: return hasEnter = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False, [mapID]) if hasEnter: return GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, 1, False, [mapID]) itemID, giveExp = FBCommon.GetFBLineReward(mapID, 0) overDict = {} ItemControler.GivePlayerItemOrMail(curPlayer, [[itemID, 1, 0]]) if giveExp: PlayerControl.PlayerControl(curPlayer).AddExp(giveExp) overDict[FBCommon.Over_exp] = giveExp if itemID: overDict[FBCommon.Over_itemInfo] = FBCommon.GetJsonItemList([itemID]) FBCommon.NotifyFBOver(curPlayer,mapID,lineID,1,overDict) EventShell.EventRespons_FBEvent(curPlayer, "guardfbpass") PlayerControl.SetCustomMap(curPlayer, 0, 0) return