| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #-------------------------------------------------------------------------------  | 
| #  | 
| ##@package GM.Commands.GMT_Face  | 
| #  | 
| # @todo:Í·Ïñ¹ÜÀí  | 
| # @author hxp  | 
| # @date 2024-09-12  | 
| # @version 1.0  | 
| #  | 
| # ÏêϸÃèÊö: Í·Ïñ¹ÜÀí  | 
| #  | 
| #-------------------------------------------------------------------------------  | 
| #"""Version = 2024-09-12 12:00"""  | 
| #-------------------------------------------------------------------------------  | 
|   | 
| import GMCommon  | 
| import ChConfig  | 
| import GameWorld  | 
|   | 
| ## Ö´ÐÐÂß¼  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param gmCmdDict: ÃüÁî×Öµä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnExec(orderId, gmCmdDict):  | 
|     queryType = gmCmdDict.get(GMCommon.Def_GMKey_QueryType, '')  | 
|     playerFind = gmCmdDict.get(GMCommon.Def_GMKey_PlayerFind, '')  | 
|     opID = GameWorld.ToIntDef(gmCmdDict.get('opID', ''), 0)  | 
|     expireTime = GameWorld.ToIntDef(gmCmdDict.get('expireTime', ''), None)  | 
|     faceType = gmCmdDict.get('faceType', '')  | 
|     opType = gmCmdDict.get('opType', '')  | 
|       | 
|     if opID <= 0:  | 
|         GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_ParamErr)  | 
|         return  | 
|       | 
|     tagPlayer = None  | 
|     playerManager = GameWorld.GetPlayerManager()  | 
|       | 
|     if queryType == GMCommon.Def_GMKey_PlayerAccID:  | 
|         queryType = ChConfig.queryType_sqtPlayerByAccID  | 
|         tagPlayer = playerManager.FindPlayerByAccID(str(playerFind))  | 
|       | 
|     elif queryType == GMCommon.Def_GMKey_PlayerName:  | 
|         queryType = ChConfig.queryType_sqtPlayerByName  | 
|         tagPlayer = playerManager.FindPlayerByName(str(playerFind))  | 
|       | 
|     else:  | 
|         GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_ParamErr)  | 
|         return  | 
|       | 
|     if not tagPlayer:  | 
|         GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_PlayerOfLine)  | 
| #        # Íæ¼Ò²»ÔÚÏߣ¬ÏȼǼ£¬µÈÍæ¼ÒÉÏÏߺó´¦Àí  | 
| #        GMShell.AddOfflinePlayerGMTInfo(orderId, queryType, playerFind, gmCmdDict)  | 
|         return  | 
|       | 
|     isOnlineGMT = True # ÊÇ·ñÊÇÔÚÏß½ÓÊÕµÄGM¹¤¾ßÃüÁî  | 
|     GMCommon.GMTool_MapServer_Query(queryType, orderId, playerFind, gmCmdDict, "GMTFace", [orderId, isOnlineGMT, faceType, opID, expireTime, opType], False)  | 
|     return  | 
|   | 
| #def OnOfflineGMTInfo(curPlayer, tagMapID, gmCmdDict):  | 
| #    orderId = gmCmdDict.get('orderId', '')  | 
| #    titleID = GameWorld.ToIntDef(gmCmdDict.get('titleID', ''), 0)  | 
| #    expireTime = GameWorld.ToIntDef(gmCmdDict.get('expireTime', ''), 0)  | 
| #    isOnlineGMT = False # ÊÇ·ñÊÇÔÚÏß½ÓÊÕµÄGM¹¤¾ßÃüÁî  | 
| #    cmdStr = str([orderId, isOnlineGMT, titleID, expireTime])  | 
| #    GameWorld.GetPlayerManager().MapServer_QueryPlayer(0, 0, curPlayer.GetPlayerID(), tagMapID, 'GMTAddTitle',  | 
| #                                                       cmdStr, len(cmdStr), curPlayer.GetRouteServerIndex())  | 
| #    return  | 
|   | 
|   |