hxp
2023-02-08 cb1d20b4aff8ca422a12a18f024a65b201687ec0
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
#!/usr/bin/python
# -*- coding: GBK -*-
 
##@package Help
# °ïÖúÃüÁî
#
# @author eggxp
# @date 2010-4-22
# @version 1.0
#
# ÐÞ¸Äʱ¼ä ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ
# VER = "2010-05-12 18:30" zhengyang Ìí¼Ó×¢ÊÍ
#
# Ä£¿éÏêϸ˵Ã÷
import GameWorld
import Lang
import os
import ChConfig
 
#°ïÖúÃüÁî
## GMÃüÁîÖ´ÐÐÈë¿Ú
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param playerList ²ÎÊýÁбí []
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def OnExec(curPlayer,playerList):
    #µ¼ÈëËùÓÐûÓÐÈÎÎñµÄXMLÊý¾Ý
    path = ChConfig.GetAppPath() + "Script\GM\Commands"
    gmList = list()
    for root, dirs, files in os.walk(path):
        for file in files:
            fileName = os.path.join(root, file)
            fileName = fileName.replace(path, "")
            if fileName.find("__init__") >= 0:
                continue
            
            curFileList = fileName.split(".")
            
            ext = curFileList[1]
            if ext not in ChConfig.TYPE_Load_Module_Ext:
                continue
            gmList.append(curFileList[0])
            
    gmList.sort()
    for gm in gmList:
        GameWorld.DebugAnswer(curPlayer, gm)
    curPlayer.GameServer_GMCmd("Help")