From 2ebf4a52405b0b628b61c82c106c2e63414b02ae Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 24 一月 2019 18:06:00 +0800
Subject: [PATCH] 5931 【后端】【1.5.100】诛仙装备开发(装备位解锁条件读诛仙塔表)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/EquipZhuXian.py | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/EquipZhuXian.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/EquipZhuXian.py
index df88ad9..ed698f5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/EquipZhuXian.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/EquipZhuXian.py
@@ -46,10 +46,22 @@
## 获取诛仙装备位是否解锁
# @param equipPlaceIndex: 注意传入的参数是装备位索引
equipPlace = GetZhuXianEquipPlaceByIndex(equipPlaceIndex)
- placeUnlockDict = IpyGameDataPY.GetFuncEvalCfg("EquipZhuXian", 1, {}) # 诛仙装备位对应解锁所需诛仙塔层数 {"装备位":诛仙塔层数, ...} 没配的默认解锁
- if str(equipPlace) not in placeUnlockDict:
+ placeUnlockDict = IpyGameDataPY.GetConfigEx("EquipZhuXianUnlock") # 诛仙装备位对应解锁所需诛仙塔层数 {"装备位":诛仙塔层数, ...} 没配的默认解锁
+ if not placeUnlockDict:
+ placeUnlockDict = {}
+ ipyDataMgr = IpyGameDataPY.IPY_Data()
+ for index in xrange(ipyDataMgr.GetZhuXianTowerCount()):
+ ipyData = ipyDataMgr.GetZhuXianTowerByIndex(index)
+ unlockEquipPlace = ipyData.GetUnLockEquipPlace()
+ if not unlockEquipPlace:
+ continue
+ towerID = ipyData.GetID()
+ placeUnlockDict[unlockEquipPlace] = towerID
+ IpyGameDataPY.SetConfigEx("EquipZhuXianUnlock", placeUnlockDict)
+ GameWorld.DebugLog("加载诛仙塔解锁装备位: placeUnlockDict=%s" % placeUnlockDict)
+ if equipPlace not in placeUnlockDict:
return True
- needTowerLV = placeUnlockDict[str(equipPlace)]
+ needTowerLV = placeUnlockDict[equipPlace]
curTowerLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ZhuXianTowerPassLV) # 已过关的诛仙塔层数
return curTowerLV >= needTowerLV
--
Gitblit v1.8.0