From c060aabfb4621e897f7b69d6e537fc3ccf59d860 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 28 一月 2019 20:44:25 +0800
Subject: [PATCH] 2969 【BUG】【1.5.200】限时抢购,重新开服全服抢购次数会重置​

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/EquipZhuXian.py |   46 ++++++++++++++++++++++++----------------------
 1 files changed, 24 insertions(+), 22 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 92d5fd1..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
 
@@ -239,26 +251,16 @@
         if attrID not in attrIDSkillPlusDict:
             continue
         skillTypeIDList = attrIDSkillPlusDict[attrID]
-        effSkillTypeID = 0
         for skillTypeID in skillTypeIDList:
-            skillData = curPlayer.GetSkillManager().FindSkillBySkillTypeID(skillTypeID)
-            if not skillData:
-                continue
-            if SkillCommon.CheckSkillJob(curPlayer, skillData):
-                effSkillTypeID = skillTypeID
-                break
-        if not effSkillTypeID:
-            continue
-        
-        if attrID in addAttrIDList:
-            skillAddPerDict = PyGameData.g_zhuXianSkillAddPerDict.get(playerID, {})
-            skillAddPerDict[effSkillTypeID] = plusValue
-            PyGameData.g_zhuXianSkillAddPerDict[playerID] = skillAddPerDict
-        elif attrID in reduceAttrIDList:
-            skillReducePerDict = PyGameData.g_zhuXianSkillReducePerDict.get(playerID, {})
-            skillReducePerDict[effSkillTypeID] = plusValue
-            PyGameData.g_zhuXianSkillReducePerDict[playerID] = skillReducePerDict
-            
+            if attrID in addAttrIDList:
+                skillAddPerDict = PyGameData.g_zhuXianSkillAddPerDict.get(playerID, {})
+                skillAddPerDict[skillTypeID] = plusValue
+                PyGameData.g_zhuXianSkillAddPerDict[playerID] = skillAddPerDict
+            elif attrID in reduceAttrIDList:
+                skillReducePerDict = PyGameData.g_zhuXianSkillReducePerDict.get(playerID, {})
+                skillReducePerDict[skillTypeID] = plusValue
+                PyGameData.g_zhuXianSkillReducePerDict[playerID] = skillReducePerDict
+                
 #    GameWorld.DebugLog("    PyGameData.g_zhuXianSkillAddPerDict=%s" % PyGameData.g_zhuXianSkillAddPerDict)
 #    GameWorld.DebugLog("    PyGameData.g_zhuXianSkillReducePerDict=%s" % PyGameData.g_zhuXianSkillReducePerDict)
     

--
Gitblit v1.8.0