hxp
6 天以前 388823edfe6308cba6f76ca6dc4f20022c5cb2be
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/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