#!/usr/bin/python  
 | 
# -*- coding: GBK -*-  
 | 
#---------------------------------------------------------------------  
 | 
#  
 | 
#---------------------------------------------------------------------  
 | 
##@package BuffProcess_904  
 | 
# @todo: ³¡¾° buff¶¨Ê±¸øÓèÍæ¼Ò¾Ñé  
 | 
#  
 | 
# @author: wdb  
 | 
# @date 2013-02-28  
 | 
# @version 1.0  
 | 
# @note:  
 | 
# Ä£¿éÏêϸ˵Ã÷  
 | 
#---------------------------------------------------------------------  
 | 
"""Version = 2013-02-28 17:00"""  
 | 
#µ¼Èë  
 | 
import IPY_GameWorld  
 | 
import GameWorld  
 | 
import PlayerControl  
 | 
#---------------------------------------------------------------------  
 | 
#È«¾Ö±äÁ¿  
 | 
#---------------------------------------------------------------------  
 | 
  
 | 
#---------------------------------------------------------------------  
 | 
#Â߼ʵÏÖ  
 | 
## ³ÖÐøÐÔBuff´¦Àí   
 | 
#  @param defender ³ÐÊÜÕß  
 | 
#  @param curBuff µ±Ç°Buff  
 | 
#  @param curEffect BuffЧ¹û  
 | 
#  @param tick µ±Ç°Ê±¼ä  
 | 
#  @return None  
 | 
#  @remarks ³ÖÐøÐÔBuff´¦Àí, ºÈÒ©Ë®µÄ»Ö¸´Â߼ʱ¼äTICKÀýÍâ   
 | 
def ProcessBuff(defender, curBuff, curEffect, processBuffTick, tick):  
 | 
    #---¼ì²éBuff¿ÉÐÐÐÔ---  
 | 
    curObjType = defender.GetGameObjType()  
 | 
  
 | 
    # ¸øÓè¾Ñ飬ֻ֧³ÖÍæ¼Ò¶ÔÏó  
 | 
    if curObjType != IPY_GameWorld.gotPlayer:  
 | 
          
 | 
        GameWorld.ErrLog("BuffProcess_904, objType error, expect(%s) \  
 | 
        insted (%s)"%(IPY_GameWorld.gotPlayer, curObjType))  
 | 
        return  
 | 
      
 | 
    # Íæ¼Ò×îСµÈ¼¶ÏÞÖÆ  
 | 
    if defender.GetLV() < curEffect.GetEffectValue(1):  
 | 
        return  
 | 
      
 | 
    reExp = PlayerControl.GetPlayerReExp(defender)  
 | 
    giveExp = int(curEffect.GetEffectValue(0)*reExp)  
 | 
      
 | 
    if giveExp <= 0:  
 | 
        return  
 | 
      
 | 
    playerControl = PlayerControl.PlayerControl(defender)  
 | 
    playerControl.AddExp(giveExp)   
 | 
    return  
 |