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
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/python
# -*- coding: GBK -*-
 
##@package GetProMovement
# Êý¾Ý¿âGMÃüÁîÖ´ÐÐ->»î¶¯²éѯ
#
# @author mark
# @date 2010-3-31
# @version 1.0
#
# ÐÞ¸Äʱ¼ä ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ
# @change: "2011-09-15 10:50" jiang É¾³ýÌØÊâ»î¶¯µÄÅж¨
#
# Ä£¿éÏêϸ˵
#Êý¾Ý¿âGMÃüÁîÖ´ÐÐ->»î¶¯²éѯ
#---------------------------------------------------------------------
"""Version = 2011-09-15 10:50"""
#---------------------------------------------------------------------
#µ¼Èë
import IPY_GameServer
import GMCommon
import ChConfig
import GameWorld
#---------------------------------------------------------------------
#È«¾Ö±äÁ¿
#---------------------------------------------------------------------
 
#---------------------------------------------------------------------
#Âß¼­ÊµÏÖ(ÕâÀïcurPlayer = None)
## Ö´ÐÐÂß¼­
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param gmList [cmdIndex gmAccID]
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def OnExec(curPlayer, gmList):
    cmdIndex = gmList[0]
    gmAccID = gmList[1]
    
    eventManager = GameWorld.GetGameWorldEventManager()
    activeEventDisc = {}
    #ÒѾ­¼¤»îµÄ»î¶¯Áбí
    isActiveIDList = []
    
    for index in range( eventManager.GetActiveEventCount()):
        event = eventManager.GetActiveEventByIndex(index)
        eventID = event.GetEventID()
        
        if eventID in [ChConfig.Def_GY_GM_Game_DoubleExp , ChConfig.Def_GY_GM_Game_Broadcast]:
            #ÌØÊâ»î¶¯,²»Í¨Öª
            continue
         
        isActiveIDList.append(eventID)
        activeEventDisc.update( 
                                { 
                                 eventID : [1 , event.GetStartTime() , event.GetEndTime() , event.GetAccID()]
                                 }
                              )
    
    #È«²¿µÄ»î¶¯
    for evID in GMCommon.GetGameServer_GM_GameID():
        #ÆäËûδ¼¤»îµÄ»î¶¯Õý³£´¦Àí
        if evID not in isActiveIDList:
            activeEventDisc.update(
                                   {
                                    evID : [0]
                                    }
                                   )
    
    GMCommon.Send_DataServer_GMCommandResult(cmdIndex, ChConfig.Def_GMTool_Succeed , '%s'%activeEventDisc)
    return