hch
2019-03-01 08c3a1db949107f104eb19be1ef3267bb62fa994
6318 【后端】【2.0】召唤兽释放技能增加根据等级来
2个文件已修改
37 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_16.py 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
@@ -482,6 +482,8 @@
    
    return int(value)
   
## 玩家召唤NPC(当前玩家,召唤技能,召唤兽ID,召唤兽属性列表, 召唤兽离自己的距离, 当前时间)
#  @param curPlayer 当前玩家
#  @param curSkill 召唤技能
@@ -524,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中解除无敌
@@ -532,6 +536,34 @@
    
    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
        # 找到可学习的技能
        learnSkillID = useSkill.GetSkillTypeID() + skillLV
        findSkill = GameWorld.GetGameData().GetSkillBySkillID(learnSkillID)
        if not findSkill:
            continue
        learnSkillIDList.append(learnSkillID)
    for skillID in learnSkillIDList:
        skillManager.LearnSkillByID(skillID, False)
    return
## 设置召唤兽属性
#  @param curPlayer 当前玩家
#  @param summonNPC 当前召唤兽
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_16.py
@@ -71,7 +71,7 @@
    summonNPC = curPlayer.SummonNewNPC()
    
    #设置召唤兽基础信息
    summonNPC.SetNPCTypeID(summonID)
    summonNPC.SetNPCTypeID(summonID)    # 即设置了基础属性,技能等
    lvSummonNPC = curPlayer.GetLV()
    summonNPC.SetLV(lvSummonNPC)
    summonNPC.SetCountry(curPlayer.GetCountry())
@@ -115,6 +115,9 @@
    summonNPC.SetBaseMissRate(curPlayer.GetMiss())
    summonNPC.SetBaseSuperHiteRate(curPlayer.GetSuperHitRate())
    
    # 继承技能等级
    SkillCommon.SetSummonNPCSkillLV(summonNPC, curSkill)
    summonNPC.SetVisible(True)
    summonNPC.SetCanAttack(False)