hxp
1 天以前 9401e794476477bd09034861f8643173f10875bb
1111 【后台】执行命令支持(删除pyc,保留py);
1个文件已删除
1个文件已添加
47 ■■■■■ 已修改文件
ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/GMTExec/Test.py 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/GMTExec/Test.pyc 补丁 | 查看 | 原始文档 | blame | 历史
ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/GMTExec/Test.py
New file
@@ -0,0 +1,47 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package Script.PyMongoDB.GMToolLogicProcess.GMTExec.Test
#
# @todo:测试命令文件运行
# @author hxp
# @date 2026-02-13
# @version 1.0
#
# 详细描述: 测试命令文件运行
#
#-------------------------------------------------------------------------------
#"""Version = 2026-02-13 14:30"""
#-------------------------------------------------------------------------------
def runMyTest(exec_locals):
    ''' 运行命令函数
    @param exec_locals: GY_Query_GMTExecfile 模块中的 DoLogic 函数 locals()
    import 其他模块需要写在此函数里,不然无法引用到
    '''
    import GameWorld
    cmdInfo = exec_locals["cmdInfo"]
    curPlayer = exec_locals.get("curPlayer", None)
    resultDict = exec_locals["resultDict"] # 建议都进行更新结果字典记录详细处理信息,GY_Query_GMTExecfile 模块会统一写入流向
    playerID = 0
    # 以下为详细处理逻辑
    # 指定玩家的逻辑
    if curPlayer:
        playerID = curPlayer.GetPlayerID()
        resultDict.update({"LV":curPlayer.GetLV(), "PlayerID":curPlayer.GetPlayerID()})
    # 无玩家的逻辑
    else:
        resultDict.update({"OK":1})
    GameWorld.Log("GMT_Execfile run %s" % cmdInfo, playerID)
    return
exec_locals = locals()
if exec_locals.get("cmdInfo"):
    runMyTest(exec_locals)
ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/GMTExec/Test.pyc
Binary files differ