| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #---------------------------------------------------------------------  | 
| #  | 
| #---------------------------------------------------------------------  | 
| ##@package Item_FamilyImpeach.py  | 
| # @todo: °ïÖ÷µ¯ÛÀ·û  | 
| #  | 
| # @author: wdb  | 
| # @date 2012-08-07  | 
| # @version 1.0  | 
| #  | 
| # @note  | 
| #---------------------------------------------------------------------  | 
| """Version = 2012-08-07 14:00"""  | 
| #---------------------------------------------------------------------  | 
| import ChConfig  | 
| import GameWorld  | 
| import ShareDefine  | 
| import PlayerControl  | 
| #---------------------------------------------------------------------  | 
|   | 
| ## °ïÖ÷µ¯ÛÀ·û  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param curRoleItem µ±Ç°Ö÷½ÇʹÓõÄÎïÆ·  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| def UseItem(curPlayer, curRoleItem, tick):  | 
|       | 
|     # ¿Í·þʹÓðïÖ÷µ¯ÛÀ·û  | 
|     if not CanUseFamilyImpeach(curPlayer):  | 
|          | 
|         PlayerControl.NotifyCode(curPlayer, "jiazu_xyj_161795")  | 
|         return  | 
|       | 
|     # Ê¹Óüä¸ô£¬·ÀÖ¹°ïÖ÷ÔÚÏߣ¬Íæ¼ÒһֱʹÓà  | 
|     if tick - curPlayer.GetTickByType(ChConfig.TYPE_Player_Tick_FamilyImpeach) \  | 
|             <= ChConfig.TYPE_Player_Tick_Time[ChConfig.TYPE_Player_Tick_FamilyImpeach]:  | 
|         return  | 
|       | 
|     curPlayer.SetTickByType(ChConfig.TYPE_Player_Tick_FamilyImpeach, tick)  | 
|       | 
|     #֪ͨGameServerʹÓõ¯ÛÀ·û  | 
|     curPlayer.GameServer_QueryPlayerByID(ChConfig.queryType_FamilyImpeach, 0, '', '', 0)  | 
|     return  | 
|           | 
|           | 
|   | 
| ## ¿Í·þʹÓðïÖ÷µ¯ÛÀ·û  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @return None   | 
| def CanUseFamilyImpeach(curPlayer):  | 
|       | 
|     familyId = curPlayer.GetFamilyID()  #¼Ò×åId  | 
|     if not familyId:  | 
|         return False  | 
|       | 
| #    # µÈ¼¶²»¹»      | 
| #    if curPlayer.GetLV() < ShareDefine.Def_CreateFamily_MinLV:  | 
| #        return False  | 
|   | 
|     return True  | 
|           | 
|           | 
|           | 
|           | 
|          |