From 08c3a1db949107f104eb19be1ef3267bb62fa994 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 01 三月 2019 17:55:37 +0800
Subject: [PATCH] 6318 【后端】【2.0】召唤兽释放技能增加根据等级来
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py | 32 ++++++++++++++++++++++++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_16.py | 5 ++++-
2 files changed, 36 insertions(+), 1 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
index 22c8681..d4824e2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
+++ b/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 当前召唤兽
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_16.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_16.py
index 3c5acc9..e9a1dbe 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillModule_16.py
+++ b/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)
--
Gitblit v1.8.0