From e38e26d19f19b69468a53b580733898371cabe1f Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 07 七月 2021 14:28:36 +0800
Subject: [PATCH] 9046 【主干】【BT2】【BT3】【后端】培养功能(不同灵器培养支持配置不同道具)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/LingQi.py | 2 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/LingQi.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/LingQi.py
index caa110a..759f33f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/LingQi.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/LingQi.py
@@ -37,7 +37,7 @@
if msgList[0] == 0:
for equipPlace in ChConfig.EquipPlace_LingQi:
- for trainType in xrange(1, ChEquip.GetLingQiTrainTypes() + 1):
+ for trainType in xrange(1, ChEquip.GetLingQiTrainTypes(equipPlace) + 1):
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LingQiTrainLV % (equipPlace, trainType), 1)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LingQiTrainItemCount % (equipPlace, trainType), 0)
ChEquip.Sync_LingQiTrainData(curPlayer, equipPlace)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
index 06d09e7..23c67c4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
@@ -633,7 +633,7 @@
if equipPlace not in ChConfig.EquipPlace_LingQi:
return
- if trainType <= 0 or trainType > GetLingQiTrainTypes():
+ if trainType <= 0 or trainType > GetLingQiTrainTypes(equipPlace):
return
if trainLV <= 0:
@@ -655,7 +655,7 @@
GameWorld.DebugLog(" 该培养已满级!")
return
- costItemIDList = IpyGameDataPY.GetFuncEvalCfg("LingQiTrain", 1)
+ costItemIDList = IpyGameDataPY.GetFuncEvalCfg("LingQiTrain", 1, {}).get(str(equipPlace), [])
costItemID = costItemIDList[trainType - 1]
if not costItemID or not costItemCount:
return
@@ -695,15 +695,15 @@
PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
return
-def GetLingQiTrainTypes():
- return len(IpyGameDataPY.GetFuncEvalCfg("LingQiTrain", 1))
+def GetLingQiTrainTypes(equipPlace):
+ return len(IpyGameDataPY.GetFuncEvalCfg("LingQiTrain", 1, {}).get(str(equipPlace), []))
def Sync_LingQiTrainData(curPlayer, equipPlace):
clientPack = ChPyNetSendPack.tagMCLingQiTrainInfo()
clientPack.EquipPlace = equipPlace
clientPack.TrainLVList = []
clientPack.TrainItemCountList = []
- for trainType in xrange(1, GetLingQiTrainTypes() + 1):
+ for trainType in xrange(1, GetLingQiTrainTypes(equipPlace) + 1):
trainLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LingQiTrainLV % (equipPlace, trainType))
if trainLV == 0:
trainLV = 1
--
Gitblit v1.8.0