xdh
2018-11-19 76aaa2bc9a47e1896638740312affe1ec61f2334
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/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