| | |
| | | import IPY_GameWorld
|
| | | import GameWorld
|
| | | import PlayerControl
|
| | | import ShareDefine
|
| | | import ChConfig
|
| | | #---------------------------------------------------------------------
|
| | | #全局变量
|
| | | #---------------------------------------------------------------------
|
| | |
| | | def ProcessBuff(defender, curBuff, curEffect, processBuffTick, tick):
|
| | | #---检查Buff可行性---
|
| | | curObjType = defender.GetGameObjType()
|
| | |
|
| | | # 给予经验,只支持玩家对象
|
| | | if curObjType != IPY_GameWorld.gotPlayer:
|
| | |
|
| | |
| | | return
|
| | |
|
| | | # 玩家最小等级限制
|
| | | if defender.GetLV() < curEffect.GetEffectValue(1):
|
| | | if defender.GetLV() < curEffect.GetEffectValue(2):
|
| | | return
|
| | |
|
| | | reExp = PlayerControl.GetPlayerReExp(defender)
|
| | | giveExp = int(curEffect.GetEffectValue(0)*reExp)
|
| | | giveExp = int(curEffect.GetEffectValue(0)*reExp+curEffect.GetEffectValue(1))
|
| | |
|
| | | if giveExp <= 0:
|
| | | return
|
| | |
|
| | | playerControl = PlayerControl.PlayerControl(defender)
|
| | | playerControl.AddExp(giveExp) |
| | | if curBuff.GetSkill().GetSkillTypeID() == ChConfig.Def_SkillID_RealmBuff:
|
| | | playerControl.AddExp(giveExp, ShareDefine.Def_ViewExpType_RealmBuff)
|
| | | else:
|
| | | playerControl.AddExp(giveExp)
|
| | | return
|