From a7ae36b7be4b5183626929a94a776b38b8913662 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 16 八月 2018 17:40:24 +0800
Subject: [PATCH] Fix: 2587 主干【后端】寻宝改为消耗寻宝令道具;
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py | 25 +++++++++++++++++--------
1 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
index cf603ef..e2e35ca 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
@@ -207,8 +207,8 @@
activeCnt += 1
return activeCnt
-def GetMWIDByPotentialsSkillID(skillID):
- #通过潜力技能ID获取对应的法宝ID
+def GetPotentialsNextSkillID(skillID):
+ #通过潜力技能ID获取对应的下一个技能ID
global g_potentialsSkillDict
if not g_potentialsSkillDict:
g_potentialsSkillDict = {}
@@ -217,8 +217,9 @@
ipyData = ipyDataMgr.GetTreasureByIndex(i)
mwID = ipyData.GetID()
skillIDList = ipyData.GetPotentials()
- for curSkillID in skillIDList:
- g_potentialsSkillDict[curSkillID] = mwID
+ for i, curSkillID in enumerate(skillIDList):
+ nextSkillID = skillIDList[i+1] if i+1 < len(skillIDList) else 0
+ g_potentialsSkillDict[curSkillID] = nextSkillID
return g_potentialsSkillDict.get(skillID, 0)
## 给技能
@@ -364,10 +365,11 @@
if newSkill:
skillManager.LVUPSkillByID(newSkillID)
GameWorld.DebugLog(' 法宝技能升级 skillTypeID=%s, upSkillLv=%s, 触发学习技能%s' % (skillTypeID, upSkillLv, newSkillID))
- curControl.RefreshSkillFightPowerEx(newSkillID, beforeFightPower)
+ curControl.RefreshSkillFightPowerEx(newSkillID, 0)
PassiveBuffEffMng.GetPassiveEffManager().RegistPassiveEff(curPlayer, newSkillID)
if SkillCommon.isPassiveAttr(newSkill):
newSkillIsPassive = True
+ PlayerControl.WorldNotify(0, 'SkillPotential2', [curPlayer.GetName(), skillTypeID, upSkillLv, newSkillID])
if SkillCommon.isPassiveAttr(upSkill) or newSkillIsPassive:
@@ -376,9 +378,16 @@
curControl.RefreshSkillFightPowerEx(upSkill.GetSkillID(), beforeFightPower)
PassiveBuffEffMng.GetPassiveEffManager().RegistPassiveEff(curPlayer, upSkill.GetSkillID())
- #通知技能已升级成功 GeRen_admin_31379
- #<n color="255,255,0" BKCOLOR="0,0,0">恭喜您将</n><n color="0,190,255" BKCOLOR="0,0,0"><Info Type="Skill" Name="Name" ID="{%S1%}"/></n><n color="255,255,0" BKCOLOR="0,0,0">升至</n><n color="0,190,255" BKCOLOR="0,0,0">{%S2%}</n><n color="255,255,0" BKCOLOR="0,0,0">级!</n>
- #PlayerControl.NotifyCode(curPlayer, "GeRen_admin_31379", [skillTypeID, upSkillLv])
+ #通知技能已升级成功
+ nextSkillID = GetPotentialsNextSkillID(skillTypeID)
+ if nextSkillID:
+ nextSkill = GameWorld.GetGameData().FindSkillByType(nextSkillID, 1)
+ if nextSkill and nextSkill.GetLearnSkillReq() == skillTypeID and upSkillLv == nextSkill.GetLearnSkillLV():
+ PlayerControl.WorldNotify(0, 'SkillPotential1', [curPlayer.GetName(), skillTypeID, upSkillLv, nextSkillID])
+
+ maxLV = upSkill.GetSkillMaxLV()
+ if upSkillLv == maxLV:
+ PlayerControl.WorldNotify(0, 'SkillPotential3', [curPlayer.GetName(), skillTypeID, maxLV])
#获得技能等级
#curSkillLV = curSkill.GetSkillLV()
--
Gitblit v1.8.0