#!/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 import ShareDefine import ChConfig #--------------------------------------------------------------------- #È«¾Ö±äÁ¿ #--------------------------------------------------------------------- #--------------------------------------------------------------------- #Âß¼­ÊµÏÖ ## ³ÖÐøÐÔ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(2): return reExp = PlayerControl.GetPlayerReExp(defender) giveExp = int(curEffect.GetEffectValue(0)*reExp+curEffect.GetEffectValue(1)) if giveExp <= 0: return playerControl = PlayerControl.PlayerControl(defender) if curBuff.GetSkill().GetSkillTypeID() == ChConfig.Def_SkillID_RealmBuff: playerControl.AddExp(giveExp, ShareDefine.Def_ViewExpType_RealmBuff) else: playerControl.AddExp(giveExp) return