| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #  | 
| #  | 
| ##@package GY_Query_RequestIsFamily.py  | 
| #  | 
| # @todo:ÊÇ·ñÔÚÉêÇëµÄ¼Ò×åÉóºËÖÐ  | 
| #  | 
| # @author jiang  | 
| # @date 2012-03-30  | 
| # @version 1.1  | 
| # @note:  | 
| #  | 
| # @change: "2013-06-06 19:30" Alee ½Ó¿Ú×ªÒÆ  | 
| #------------------------------------------------------------------------------   | 
| """Version = 2013-06-06 19:30"""  | 
| #------------------------------------------------------------------------------   | 
| import GameWorld  | 
| import ChConfig  | 
| import ChPlayer  | 
| import PlayerControl  | 
| import PlayerFamily  | 
| #---------------------------------------------------------------------  | 
|   | 
| #---------------------------------------------------------------------  | 
| ## ÇëÇóÂß¼  | 
| #  @param query_Type ÇëÇóÀàÐÍ  | 
| #  @param query_ID ÇëÇóµÄÍæ¼ÒID  | 
| #  @param packCMDList ·¢°üÃüÁî [ ]  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| def DoLogic(query_Type, query_ID, packCMDList, tick):  | 
|     if not packCMDList:  | 
|         return  | 
|       | 
|     curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(query_ID)  | 
|     if not curPlayer:  | 
|         return  | 
|       | 
|     for resultList in packCMDList:  | 
|         if not resultList[1]:  | 
|             #Çå³ýÉêÇëµÄ¼Ò×å¼Ç¼  | 
|             __ClearFamilyInfo(curPlayer, resultList[0])  | 
|       | 
|     #֪ͨµ±Ç°ÉêÇë¼ÓÈëµÄÄÄЩ¼Ò×å  | 
|     PlayerFamily.Sync_RequestAddFamilyInfo(curPlayer)  | 
|     return  | 
|   | 
|   | 
| #---------------------------------------------------------------------  | 
| ## Ö´Ðнá¹û  | 
| #  @param curPlayer ·¢³öÇëÇóµÄÍæ¼Ò  | 
| #  @param callFunName ¹¦ÄÜÃû³Æ  | 
| #  @param funResult ²éѯµÄ½á¹û  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| def DoResult(curPlayer, callFunName, funResult, tick):  | 
|     return  | 
|   | 
|   | 
| ## Çå³ýÉêÇëµÄ¼Ò×å¼Ç¼  | 
| #  @param curPlayer: Íæ¼ÒʵÀý  | 
| #  @param resultFamilyID: ¼Ò×å  | 
| #  @return:   | 
| def __ClearFamilyInfo(curPlayer, resultFamilyID):  | 
|     for index in range(0, ChConfig.Def_Player_RequestAddFamilyMaxCnt):  | 
|         familyID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_RequestAddFamilyID%index)  | 
|         if familyID == 0:  | 
|             continue  | 
|           | 
|         if familyID != resultFamilyID:  | 
|             continue  | 
|           | 
|         cnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_RequestAddFamilyCnt)  | 
|         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_RequestAddFamilyCnt, cnt - 1)  | 
|         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_RequestAddFamilyID%index, 0)  | 
|           | 
|     return  |