hch
2019-05-14 a772159cbbe5a267e623ec2c4a56b13cc96f3b09
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
@@ -25,6 +25,7 @@
import OperControlManager
import GameObj
import CrossPlayerData
import AttackCommon
#---------------------------------------------------------------------
#---------------------------------------------------------------------
@@ -51,6 +52,8 @@
    and SkillCommon.GetSkillBattleType(curSkill) == ChConfig.Def_BattleRelationType_CommNoBoss:
        # 释放后 对指定BOSS无效的技能
        return True
    buffOwner = AttackCommon.ElfChangeAttacker(buffOwner)  # Elf灵为替身攻击,要取玩家的属性
    
    result = AddBuffNoRefreshState(curObj, buffType, curSkill, tick, addBuffValueList, buffOwner, addForce)
    
@@ -378,7 +381,7 @@
        if triggerType == -1:
            continue
        passiveEff = PassiveBuffEffMng.GetPassiveEffManager().InitObjPassiveEff(curObj)
        passiveEff.AddBuffInfoByEffect(curEffect, skillID)
        passiveEff.AddBuffInfoByEffect(curEffect, skillID, onwerID, onwerType)
        
    #添加BUFF后的特殊处理
@@ -408,7 +411,11 @@
    #触发被动技能
    if buffOwner:
        PassiveBuffEffMng.OnPassiveSkillTrigger(buffOwner, curObj, curSkill, ChConfig.TriggerType_AddBuffOver, tick)
        # 此处不能传技能curSkill 屏蔽被动触发被动限制
        # 暂且特殊处理控制类buff才触发
        if SkillCommon.GetBuffType(curSkill) == IPY_GameWorld.bfActionBuff:
            PassiveBuffEffMng.OnPassiveBuffTrigger(curObj, buffOwner, None, ChConfig.TriggerType_AddBuffOver, tick)
    #是否是持续性技能
    isLstSkill = curSkill.GetSkillType() in ChConfig.Def_LstBuff_List
    
@@ -568,6 +575,8 @@
        return curBuff, i
    
    return None, 0
#---------------------------------------------------------------------
## 刷新BUFF的时间
#  @param curBuff 当前BUFF
@@ -633,6 +642,9 @@
    
    index = 0
    isPlayerTJG = (curObj.GetGameObjType() == IPY_GameWorld.gotPlayer and PlayerTJG.GetIsTJG(curObj))
    skillIDListInDelBuff = []   # buff消失中需要处理添加buff,外层处理避免错乱
    while index < buffState.GetBuffCount():
        curBuff = buffState.GetBuff( index )
        if not curBuff:
@@ -681,12 +693,34 @@
        buffState.DeleteBuffByIndex( index )
        SkillShell.ClearBuffEffectBySkillID(curObj, curSkill.GetSkillID(), ownerID, ownerType)
        
        addSkillID = curObj.GetDictByKey(ChConfig.Def_PlayerKey_SkillInDelBuff)
        if addSkillID:
            skillInfo = [addSkillID, ownerID, ownerType]
            if skillInfo not in skillIDListInDelBuff:
                skillIDListInDelBuff.append(skillInfo)
    OnSkillAfterBuffDisappear(curObj, skillIDListInDelBuff, tick)
    #执行DoBuffDisApper中,标记的玩家处理要求
    __DoBuffDisApperByKey( curObj , tick )
        
    return isRefresh, delResult
# DoBuffDisApper不能做Buff添加和删除逻辑!!!!!不然指针会错乱, 故在外层处理
def OnSkillAfterBuffDisappear(curObj, skillIDListInDelBuff, tick):
    posX, posY = curObj.GetPosX(), curObj.GetPosY()
    for skillInfo in skillIDListInDelBuff:
        attacker = GameWorld.GetObj(skillInfo[1], skillInfo[2])
        if not attacker:
            attacker = curObj
        skillData = GameWorld.GetGameData().GetSkillBySkillID(skillInfo[0])
        if not skillData:
            continue
        SkillShell.Trigger_UseSkill(attacker, curObj, skillData, tick, posX, posY)
    return
#---------------------------------------------------------------------
## 执行buff消失触发逻辑
#  @param curObj 当前OBj