hxp
5 天以前 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
#!/usr/bin/python
# -*- coding: GBK -*-
#---------------------------------------------------------------------
#
#------------------------------------------------------------------------------ 
##@package Item_CleanGuilt
# @todo: Ï´ºìÃû
#
# @author: Alee
# @date 2014-01-06 19:20
# @version 1.0
#
# ÏêϸÃèÊö
#---------------------------------------------------------------------
#"""Version = 2014-01-06 19:20"""
#---------------------------------------------------------------------
#µ¼Èë
import BuffSkill
import ItemCommon
import PlayerSuccess
import PlayerControl
import ShareDefine
import ChConfig
 
#------------------------------------------------------------------------------ 
 
 
#------------------------------------------------------------------------------ 
##ʹÓÃÎïÆ·,´¥·¢ÎïÆ·¸½¼ÓЧ¹û ¸øÈËÎï½ðÇ®
# @param curPlayer: Íæ¼ÒʵÀý
# @param curRoleItem: ÎïÆ·ÊµÀý
# @param tick: Ê±¼ä´Á
# @return: ÊÇ·ñʹÓÃÎïÆ·³É¹¦
# @remarks: giveMoney = reMoney * curEff.GetEffectValue(1) + curEff.GetEffectValue(2)
# AֵΪ½ðÇ®¹«Ê½ÀïµÄÊýÁ¿(³Ë·¨Òò×Ó) BֵΪ½ðÇ®¹«Ê½Àï¶îÍâ¹Ì¶¨ÊýÁ¿(¼Ó·¨Òò×Ó) 
def UseItem(curPlayer, curRoleItem, tick):
    curPKValue = curPlayer.GetPKValue()
    if curPKValue == 0:
        #GeRen_chenxin_774045
        PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_774045")
        return False
    curEff = curRoleItem.GetEffectByIndex(0)
    clearPoint = int(curEff.GetEffectValue(0))  # ¼õÉٹ̶¨Öµ
    
    #BuffSkill.DelBuffBySkillID(curPlayer, ChConfig.Def_SkillID_Red, tick, False)
    #PlayerControl.ClearPKValue(curPlayer)
    PlayerControl.ChangePKValue(curPlayer, -clearPoint, tick)
    ItemCommon.DelItem(curPlayer, curRoleItem, 1, False, ChConfig.ItemDel_CleanGuilt)
    #GeRen_liubo_827276
    PlayerControl.NotifyCode(curPlayer, "GeRen_liubo_827276", [min(clearPoint, curPKValue)])
    return True