| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #  | 
| #  | 
| ##@package QueryDBLogicResult.py  | 
| #  | 
| # @todo:GameServerÏòDBÇëÇóµÄ»Ø¸´ÐÅÏ¢  | 
|   | 
| import PlayerPackData  | 
| import IPY_GameServer  | 
| import ChConfig  | 
|   | 
| #-------------------------------------------------------------------------  | 
|   | 
| # //04 08 GameServerÏòDBÇëÇóµÄ»Ø¸´ÐÅÏ¢ tagDGQueryDBLogicResult  | 
|   | 
| # struct tagDGQueryDBLogicResult  | 
| # {  | 
| #     tagHead    Head;  | 
| #     BYTE    Result;            //½á¹û£º1³É¹¦£»0ʧ°Ü  | 
| #     DWORD    ID;            //²éѯµÄID  | 
| #     BYTE    QueryType;        //²éѯµÄÀàÐÍ  | 
| #     DWORD    DataLen;  | 
| #     char    Data[DataLen];        //ÔÑù·µ»ØµÄ¸½¼ÓÊý¾Ý  | 
| #     DWORD    ResultSetLen;  | 
| #     char    ResultSet[ResultSetLen];    //½á¹û¼¯  | 
| # };  | 
|   | 
| ## DB·µ»Øµ½GameServerÐÅÏ¢  | 
| #  @param None None  | 
| #  @return None  | 
| def RecvDGDBLogicResult(index, tick):  | 
|     dbResultPack = IPY_GameServer.IPY_DGQueryDBLogicResult()  | 
|     result = dbResultPack.GetResult()  #½á¹û£º1³É¹¦£¬0ʧ°Ü  | 
|     if result == 0:  | 
|         return  | 
|     queryType = dbResultPack.GetQueryType()  | 
|       | 
|     if queryType == ChConfig.gstDBLogic_PlayerPackData:  | 
|         mirrorID = dbResultPack.GetID()  | 
|         playerData = dbResultPack.GetResultSet()  | 
|         msgInfo = eval(dbResultPack.GetData())  | 
|         PlayerPackData.OnDBPlayerPackData(mirrorID, playerData, msgInfo)  | 
|           | 
|     return  | 
|   |