From c2a7d0326f1e779bf6ee184e60d04dd7d43b576b Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 10 五月 2019 16:27:23 +0800
Subject: [PATCH] 3542 【BUG】【2.0】五行灵根重置点数后无法使用五行专精
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
index e06a6b6..9db66f8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -2124,7 +2124,7 @@
NotifyElementSkillInfo(curPlayer, mainSkillID, selectSkillID if updSelectSkillLV != activeSkillLV else 0)
return
-def RefreshElementSkill(curPlayer, skillTypeID):
+def RefreshElementSkill(curPlayer, skillTypeID, isChangeLV=True):
##更新专精技能生效的等级
__InitElementSkillInfo()
if skillTypeID not in PyGameData.g_elemntSkillDict:
@@ -2153,6 +2153,8 @@
curSkill = skillManager.FindSkillBySkillTypeID(skillTypeID)
curSkillLV = curSkill.GetSkillLV() if curSkill else 0
#GameWorld.DebugLog('更新专精技能生效的等级 skillTypeID=%s,curSkillLV=%s,activeSkillLV=%s,updSkillLV=%s'%(skillTypeID, curSkillLV, activeSkillLV, updSkillLV))
+ if not isChangeLV:
+ return
if updSkillLV == curSkillLV:
return
elif updSkillLV < curSkillLV:
@@ -2172,7 +2174,7 @@
#加点、丹药、境界、洗点 会影响灵根点
__InitElementSkillInfo()
- needRefreshSkillIDList = []
+ needRefreshSkillIDDict = {} #{skillid:是否变更技能等级}
skillManager = curPlayer.GetSkillManager()
for i in xrange(skillManager.GetSkillCount()):
hasSkill = skillManager.GetSkillByIndex(i)
@@ -2180,6 +2182,7 @@
ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('SkillElement', {'MainSkillID':hasSkillID}, True, False)
if not ipyDataList:
continue
+ curSelectSkillID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SkillElementID % hasSkillID)
for ipyData in ipyDataList:
curElementSkillID = ipyData.GetElementSkillID()
if curElementSkillID not in PyGameData.g_elemntSkillDict:
@@ -2187,11 +2190,12 @@
attrID = GetSkillUpNeedAttr(PyGameData.g_elemntSkillDict[curElementSkillID][0])[0]
if attrID not in attrIDList:
continue
- needRefreshSkillIDList.append(curElementSkillID)
+ needRefreshSkillIDDict[curElementSkillID] = curSelectSkillID == curElementSkillID
+
#GameWorld.DebugLog('属性点变更 刷新专精attrIDList=%s,needRefreshSkillIDList=%s'%(attrIDList,needRefreshSkillIDList))
isRefresh = False
- for skillID in needRefreshSkillIDList:
- if RefreshElementSkill(curPlayer, skillID):
+ for skillID, isChangeLV in needRefreshSkillIDDict.items():
+ if RefreshElementSkill(curPlayer, skillID, isChangeLV):
isRefresh = True
if isRefresh:
# 重刷被动技能
--
Gitblit v1.8.0