ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
@@ -99,6 +99,13 @@
    coolDownTime = curSkill.GetCoolDownTime()
    remainTime = coolDownTime
    if isPassiveSkill(curSkill):
        if curSkill.GetFuncType() == ChConfig.Def_SkillFuncType_GiftSkill:
            # 天赋有减CD效果
            reduceSkillCDPer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, None, curSkill, ChConfig.TriggerType_GiftReduceCD)
            # 减CD比率
            if reduceSkillCDPer > 0:
                remainTime = int(remainTime * max(0, ShareDefine.Def_MaxRateValue - reduceSkillCDPer) / ShareDefine.Def_MaxRateValue)
        # 被动技能的处理和主动技能区分
        curSkill.SetRemainTime(remainTime)
        return
@@ -213,11 +220,12 @@
def PlayerLoginMergeServerSkillLogic(curPlayer, tick):
    playerID = curPlayer.GetPlayerID()
    if not GameWorld.IsMergeServer():
    if not GameWorld.IsCrossServer():
        GameWorld.DebugLog("非跨服服务器上线不清除buff...", playerID)
        return
    
    ClearBuffSkillTypeIDList = ReadChConfig.GetEvalChConfig("ClearBuffSkillTypeID")
    #ClearBuffSkillTypeIDList = ReadChConfig.GetEvalChConfig("ClearBuffSkillTypeID")
    ClearBuffSkillTypeIDList = []
    # 跨服服务器上线清除增益/减益buff
    GameWorld.Log("跨服服务器上线清除buff...", playerID)
    clearBuffList = [] # 先汇总再清除,不然索引会变更
@@ -272,6 +280,15 @@
            curSkill.SetRemainTime(0)
            GameWorld.DebugLog("        SetRemainTime 0 skillName=%s,skillTypeID=%s" 
                               % (curSkill.GetSkillName(), curSkill.GetSkillTypeID()), playerID)
    return
def ResetAllSkillCD(curPlayer):
    skillManager = curPlayer.GetSkillManager()
    for i in xrange(skillManager.GetSkillCount()):
        skill = skillManager.GetSkillByIndex(i)
        if skill.GetRemainTime() != 0:
            skill.SetRemainTime(0)
            skill.Sync_Skill()
    return
## 刷新玩家所有技能的剩余时间(上线)
@@ -465,6 +482,8 @@
    
    return int(value)
   
## 玩家召唤NPC(当前玩家,召唤技能,召唤兽ID,召唤兽属性列表, 召唤兽离自己的距离, 当前时间)
#  @param curPlayer 当前玩家
#  @param curSkill 召唤技能
@@ -507,6 +526,8 @@
        summonPos = GameMap.GetEmptyPlaceInArea(curPlayer.GetPosX(), curPlayer.GetPosY(), summonDist)
        summonNPC.Reborn(summonPos.GetPosX(), summonPos.GetPosY())
    summonNPC.SetBornTime(tick)
    # 继承技能等级
    SetSummonNPCSkillLV(summonNPC, curSkill)
    if curSkill:
        summonNPC.SetLastTime(curSkill.GetLastTime())
    #----设置为无敌,在AI中解除无敌
@@ -514,6 +535,38 @@
    summonNPC.SetCanAttack(False)
    
    return 
# 召唤兽技能继承,玩家释放技能的等级
def SetSummonNPCSkillLV(summonNPC, curSkill):
    if curSkill.GetEffect(0).GetEffectValue(1) == 0:
        return
    skillLV = curSkill.GetSkillLV() - 1
    if skillLV == 0:
        return
    skillManager = summonNPC.GetSkillManager()
    learnSkillIDList =[]
    for index in range(0, skillManager.GetSkillCount()):
        useSkill = skillManager.GetSkillByIndex(index)
        #已经到尾部了
        if not useSkill or useSkill.GetSkillTypeID() == 0:
            break
        useSkillTypeID = useSkill.GetSkillTypeID()
        # 找到可学习的技能
        learnSkillID = useSkillTypeID + skillLV
        findSkill = GameWorld.GetGameData().GetSkillBySkillID(learnSkillID)
        if not findSkill:
            continue
        if findSkill.GetSkillTypeID() != useSkillTypeID:
            # 不是同一个技能
            continue
        learnSkillIDList.append(learnSkillID)
    for skillID in learnSkillIDList:
        skillManager.LearnSkillByID(skillID, False)
    return
## 设置召唤兽属性
#  @param curPlayer 当前玩家
@@ -624,10 +677,10 @@
# @param curNPC NPC实例
# @param summonID 召唤兽的NPCID
# @return 召唤兽数量
def GetSummonCountByNPCID(curNPC, summonID):
def GetSummonCountByNPCID(gameObj, summonID):
    count = 0
    for i in range(0, curNPC.GetSummonCount()):
        summonNPC = curNPC.GetSummonNPCAt(i)
    for i in range(0, gameObj.GetSummonCount()):
        summonNPC = gameObj.GetSummonNPCAt(i)
        
        if not summonNPC:
            continue
@@ -1127,6 +1180,10 @@
    if curHP <= 0:
        return
    
    if PassiveBuffEffMng.GetValueByPassiveBuffTriggerType(curObj, None, None, ChConfig.TriggerType_ForbidenCure):
        # 禁止治疗
        return
    # 治疗加成
    curePer = PlayerControl.GetCurePer(curObj) if curObjType == IPY_GameWorld.gotPlayer else ChConfig.Def_MaxRateValue 
    addValue = int(addValue*curePer*1.0/ChConfig.Def_MaxRateValue)
@@ -1195,6 +1252,11 @@
        GameWorld.Log('###技能伤害血量异常,数值错误 = %s,技能类型ID = %s' % (lostValue, skillTypeID))
        return
    
    if not curObj.GetCanAttack():
        # 无敌不掉血
        ## 后续有其他情况也应考虑进来,如镖车是否某状态不掉血
        return
    #lostValue = GetGoblinLostHP(curObj, lostValue)
    curObjType = curObj.GetGameObjType()
    curSkill = GameWorld.GetGameData().FindSkillByType(skillTypeID, 1)
@@ -1206,10 +1268,13 @@
    
    notifyLostValue = lostValue
    curObjHP_BeforeAttack = GameObj.GetHP(curObj)
    if curObjHP_BeforeAttack == 0:
        # 没有血量不能再触发
        return
    
    if reduceHP :
        lostValue = AttackCommon.CalcAtkProDef(buffOwner, curObj, lostValue, curSkill, tick)
        # 血盾 
        lostValue = AttackCommon.CalcBloodShield(buffOwner, curObj, lostValue)
        
        #剩余血量
@@ -1230,6 +1295,8 @@
            # 已广播的不重复
            GameObj.SetHP(curObj, remainHP, not view)
    
    AttackCommon.WriteHurtLog(buffOwner, curObj, curSkill, lostValue, hurtType, "持续掉血")
    if view:
        #广播伤血类型
        AttackCommon.ChangeHPView(curObj, buffOwner, skillTypeID, notifyLostValue, hurtType)
@@ -1237,13 +1304,14 @@
    # 濒死状态触发技能
    if GameObj.GetHP(curObj) == 0:
        PassiveBuffEffMng.OnPassiveSkillTrigger(curObj, None, curSkill, ChConfig.TriggerType_WillDead, tick)
        PassiveBuffEffMng.OnPassiveBuffTrigger(curObj, None, curSkill, ChConfig.TriggerType_WillDead, tick)
    
    #无法找到Buff拥有者
    if not buffOwner:
        AttackCommon.DoLogic_ObjDead(curObj)
        AttackCommon.DoLogic_ObjDead(None, curObj, curSkill, tick)
        return
        
    #NPC需要手动添加伤血和仇恨, 因为无调用DoAttack
    if curObjType == IPY_GameWorld.gotNPC: