#!/usr/bin/python # -*- coding: GBK -*- # # ##@package GMT_GetEventStar.py # # @todo:²éѯ»î¶¯¿ªÆôÇé¿ö # # @author jiang # @date 2012-12-12 # @version 1.0 # @note: # #--------------------------------------------------------------------- """Version = 2012-12-12 14:00""" #--------------------------------------------------------------------- #µ¼Èë import GameWorld import datetime import GMCommon #--------------------------------------------------------------------- #È«¾Ö±äÁ¿ #--------------------------------------------------------------------- #--------------------------------------------------------------------- ## Ö´ÐÐÂß¼­ # @param orderId gmÃüÁîid # @param gmCmdDict # @return None # @remarks º¯ÊýÏêϸ˵Ã÷. def OnExec(orderId, gmCmdDict): eventID = GameWorld.ToIntDef(gmCmdDict.get('eventID', '')) if eventID not in GMCommon.GetGameServer_GM_GameID(): GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_InvalidEvent) return eventManager = GameWorld.GetGameWorldEventManager() activeEvent = eventManager.FindActiveEvent(eventID) if not activeEvent: #ûÓиû GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_NoTag) return eventID = activeEvent.GetEventID() startTime = activeEvent.GetStartTime() endTime = activeEvent.GetEndTime() isProcessing = activeEvent.GetIsProcessing() infoDict = {"EventID":eventID, "StartTime":startTime, "EndTime":endTime, "IsProcessing":isProcessing} #Ö´Ðгɹ¦ GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_Success, infoDict) return