#!/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  
 | 
  
 | 
  
 | 
      
 |