| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #---------------------------------------------------------------------  | 
| #  | 
| #---------------------------------------------------------------------  | 
| ##@package GY_Query_LoginData  | 
| # @todo: ²éѯƽ̨µÇ½ÐÅÏ¢  | 
| #  | 
| # @author: Alee  | 
| # @date 2014-03-05 16:00  | 
| # @version 1.6  | 
| #  | 
| # @note: ²éѯƽ̨µÇ½ÐÅÏ¢  | 
| # @change: "2014-03-13 18:40" Alee Ñ¸À׵ǽ·½Ê½ºÍ¼Ç¼ÐÞ¸Ä  | 
| # @change: "2014-08-14 11:00" hxp µÇ¼ÐÅÏ¢´¦Àí  | 
| # @change: "2015-06-08 20:30" hxp Ôö¼ÓchannelCode  | 
| # @change: "2015-07-13 14:00" hxp Ôö¼Ó»Æ/À¶×êÖ§³Ö  | 
| # @change: "2016-07-18 19:00" hxp Ôö¼Óaccount_type  | 
| # @change: "2016-09-23 21:00" hxp tencentƽ̨ÉèÖÃÀ´Ô´pfʶ±ð  | 
| #---------------------------------------------------------------------  | 
| #"""Version = 2016-09-23 21:00"""   | 
| #---------------------------------------------------------------------  | 
| import GameWorld  | 
| import DataRecordPack  | 
| import PlayerControl  | 
| import ChConfig  | 
| #---------------------------------------------------------------------  | 
|   | 
| ## XX  | 
| #  @param query_Type ÇëÇóÀàÐÍ  | 
| #  @param query_ID ÇëÇóµÄÍæ¼ÒID  | 
| #  @param packCMDList ·¢°üÃüÁî  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return "True" or "False" or ""  | 
| def DoLogic(query_Type, query_ID, packCMDList, tick):  | 
|     return ''  | 
|   | 
|   | 
| ## µÇ½ÐÅÏ¢  | 
| #  @param curPlayer ·¢³öÇëÇóµÄÍæ¼Ò  | 
| #  @param callFunName ¹¦ÄÜÃû³Æ  | 
| #  @param funResult ²éѯµÄ½á¹û  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| def DoResult(curPlayer, callFunName, funResult, tick):  | 
|     playerID = curPlayer.GetPlayerID()  | 
|     GameWorld.Log("GY_Query_LoginData funResult=%s" % funResult, playerID)  | 
|     result = eval(funResult)  | 
|     if result == []:  | 
|         return  | 
|   | 
|     if result[0] == 'xunlei':  | 
|         #[xunlei£¬Ñ¸À×VIP£¬VIPµÈ¼¶£¬½ð¿¨VIP£¬½ð¿¨µÈ¼¶£¬ µÇ¼¿Í»§¶ËÀàÐÍ]  | 
| #        PlayerThunder.SetIsThunderPlayer(curPlayer, 1)  | 
| #        PlayerThunder.SetIsThunderVIP(curPlayer, result[1])  | 
| #        PlayerThunder.SetThunderVIPLV(curPlayer, result[2])  | 
| #        PlayerThunder.SetIsThunderGoldVIP(curPlayer, result[3])  | 
| #        PlayerThunder.SetThunderGoldVIPLV(curPlayer, result[4])  | 
| #        PlayerThunder.Sync_ThunderPlayerInfo(curPlayer)  | 
| #          | 
| #        PlayerThunder.DoThunderPlayerLogin(curPlayer)  | 
| #        PlayerThunder.DoThunderPlayerOnDay(curPlayer)  | 
| #          | 
| #        if curPlayer.GetDictByKey("ThunderLogin") == 1:  | 
| #            DataRecordPack.DR_ThunderFirstLogin(curPlayer, result[5])  | 
| #          | 
| #        DataRecordPack.DR_ThunderPlayerLogin(curPlayer, result[5])  | 
|         return  | 
|       | 
|     # ÉèÖÿͻ§¶ËµÇ¼ÀàÐÍ  | 
|     clientType = int(result[0])  | 
|     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LoginClientType, clientType)  | 
|       | 
|     channelCode = result[1]  | 
|     GameWorld.SetPlayerChannelCode(curPlayer, channelCode)  | 
|       | 
|     pid = result[2]  | 
|     platform = result[3]  | 
|     account_type = result[4]  | 
|           | 
|     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_PlayerFromPID, pid)  | 
|     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_Account_Type, account_type)  | 
|       | 
|     if len(result) <= 5:  | 
|         __ResetOperateInfo(curPlayer)  | 
|         return  | 
|       | 
|     extendInfo = result[5:]  | 
|     # µ± pf Îª qzone¡¢pengyou¡¢qplus Ê±£¬·¢ËÍ»Æ×êÐÅÏ¢  | 
|     if platform in ["qzone", "pengyou", "qplus"]:  | 
|         isYellowVIP, isYellowYearVIP, isYellowHighVIP, yellowVIPLV = extendInfo  | 
|         operateInfo = int("%02d%s%s%s" % (yellowVIPLV, isYellowHighVIP, isYellowYearVIP, isYellowVIP))  | 
|         curPlayer.SetOperateInfo(operateInfo)  | 
|         GameWorld.Log("    platform=%s, SetPlatVIPData=%s" % (platform, operateInfo), playerID)  | 
|       | 
|     # µ± pf Îª qqgame¡¢3366 Ê±£¬·¢ËÍÀ¶×êÐÅÏ¢  | 
|     elif platform in ["qqgame", "3366"]:  | 
|         isBlueVIP, isBlueYearVIP, isBlueHighVIP, blueVIPLV = extendInfo  | 
|         platVIPData = int("%02d%s%s%s" % (blueVIPLV, isBlueHighVIP, isBlueYearVIP, isBlueVIP))  | 
|         curPlayer.SetOperateInfo(platVIPData)  | 
|         GameWorld.Log("    platform=%s, SetPlatVIPData=%s" % (platform, platVIPData), playerID)  | 
|           | 
|     else:  | 
|         __ResetOperateInfo(curPlayer)  | 
|         GameWorld.Log("    platform=%s, SetPlatVIPData=0" % platform, playerID)  | 
|           | 
|       | 
|     return  | 
|   | 
| ## ÖØÖÃÍæ¼ÒÔËӪƽ̨ÐÅÏ¢  | 
| #  @param curPlayer   | 
| #  @return None  | 
| def __ResetOperateInfo(curPlayer):  | 
|     if curPlayer.GetOperateInfo() != 0:  | 
|         curPlayer.SetOperateInfo(0)  | 
|         GameWorld.Log("    __ResetOperateInfo=0", curPlayer.GetPlayerID())  | 
|     return  | 
|   |