| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #  | 
| ##@package  | 
| #  | 
| # @todo: ÇþµÀ²âÊÔ·µÀû  | 
| #  | 
| # @author: Alee  | 
| # @date 2019-1-23 ÏÂÎç02:06:50  | 
| # @version 1.0  | 
| #  | 
| # @note:   | 
| #  | 
| #---------------------------------------------------------------------  | 
| #µ¼Èë  | 
| import GMCommon  | 
| import ChConfig  | 
| import GameWorld  | 
| import GMShell  | 
| import PyGameData  | 
| #---------------------------------------------------------------------  | 
|   | 
|   | 
|   | 
| ## Ö´ÐÐÂß¼  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param gmCmdDict: ÃüÁî×Öµä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnExec(orderId, gmCmdDict):  | 
|     return  | 
|     GameWorld.Log("%s"%gmCmdDict)  | 
|     accID = str(gmCmdDict.get('AccID', ''))  | 
|     if not accID:  | 
|         GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_ParamErr)  | 
|         return  | 
|       | 
|     gold = int(gmCmdDict.get('GoldState', 0))  | 
|     if not gold:  | 
|         GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_ParamErr)  | 
|         return  | 
|       | 
|     playerManager = GameWorld.GetPlayerManager()  | 
|       | 
|     queryType = ChConfig.queryType_sqtPlayerByAccID  | 
|     tagPlayer = playerManager.FindPlayerByAccID(accID)  | 
|       | 
|     if not tagPlayer or not tagPlayer.GetInitOK():  | 
|         # Íæ¼Ò²»ÔÚÏߣ¬ÏȼǼ£¬µÈÍæ¼ÒÉÏÏߺó´¦Àí  | 
|         GameWorld.Log("Íæ¼ÒÀëÏߣ¬ÔÝ´æÇþµÀ²âÊÔ·µÀû %s, ÏÉÓñ%s"%(accID, gold))  | 
|         GMShell.AddOfflinePlayerGMTInfo(orderId, queryType, accID, gmCmdDict)  | 
|         return  | 
|       | 
|     GameWorld.Log("·¢·ÅÇþµÀ²âÊÔ·µÀû %s, ÏÉÓñ%s"%(accID, gold))  | 
|       | 
|     GMCommon.GMTool_MapServer_Query(queryType, orderId, accID, gmCmdDict, 'QDFLDoubleBill', [gold], True)  | 
|     return  | 
|   | 
|   | 
|   | 
| #===============================================================================  | 
| # def OnOfflineCTGInfo(curPlayer, tagMapID, gmCmdDict):  | 
| #    gold = int(gmCmdDict.get('GoldState', 0))  | 
| #    cmdStr = str([gold])  | 
| #      | 
| #    GameWorld.GetPlayerManager().MapServer_QueryPlayer(0, 0, curPlayer.GetPlayerID(), tagMapID, 'QDFLDoubleBill',   | 
| #                                            cmdStr, len(cmdStr), curPlayer.GetRouteServerIndex())  | 
| #    return  | 
| #===============================================================================  | 
|   |