From cda5ffad727e202510e3cd11017040f2488d6d34 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 09 二月 2023 17:55:13 +0800
Subject: [PATCH] 9762 【BT8】【后端】藏宝阁(9767 【BT8】新增古宝特效效果)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py |    6 +-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py               |  132 ++++++++++++++++++++++++++++++++++++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py                |   10 +++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py                    |    6 ++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherSoul.py          |   10 +++
 PySysDB/PySysDBPY.h                                                                                     |    2 
 6 files changed, 163 insertions(+), 3 deletions(-)

diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index 56e744d..93c2387 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -465,6 +465,8 @@
 	DWORD		_GubaoEffID;	//古宝特殊效果ID
 	BYTE		GubaoEffType;	//效果类型
 	DWORD		EffCond;	//条件
+	DWORD		EffCond2;	//条件2
+	DWORD		EffCond3;	//条件3
 	BYTE		IsPer;	//是否百分比提升
 	list		EffFuncAttrIDList;	//提升指定功能属性ID列表
 	DWORD		EffAttrID;	//直接增加属性类型
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py
index 033278a..ef0aca7 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipWash.py
@@ -461,10 +461,10 @@
     washLV = min(washLV, maxWashLV)
     washType = GetEquipWashType(equipPlace)
     if washType is None:
-        return
+        return 0
     washData = GetEquipWashData(washType, washLV)
     if not washData:
-        return
+        return 0
     #GameWorld.DebugLog("装备位属性: equipPlace=%s,washLV=%s" % (equipPlace, washLV))
     for attrNum in range(1, Def_EquipWashMaxAttrCount + 1):
         attrID = getattr(washData, "GetAttrType%s" % attrNum)()
@@ -475,7 +475,7 @@
         if attrValue:
             PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrList)
             baseAttrDictWash[attrID] = baseAttrDictWash.get(attrID, 0) + attrValue
-    return
+    return washLV
 
 def EquipWashSuccess(curPlayer, classLV):
     ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'ClassLV':classLV}, True)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 60009ac..3b84d2a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -381,6 +381,8 @@
                         ("DWORD", "GubaoEffID", 1),
                         ("BYTE", "GubaoEffType", 0),
                         ("DWORD", "EffCond", 0),
+                        ("DWORD", "EffCond2", 0),
+                        ("DWORD", "EffCond3", 0),
                         ("BYTE", "IsPer", 0),
                         ("list", "EffFuncAttrIDList", 0),
                         ("DWORD", "EffAttrID", 0),
@@ -2824,6 +2826,8 @@
         self.GubaoEffID = 0
         self.GubaoEffType = 0
         self.EffCond = 0
+        self.EffCond2 = 0
+        self.EffCond3 = 0
         self.IsPer = 0
         self.EffFuncAttrIDList = []
         self.EffAttrID = 0
@@ -2833,6 +2837,8 @@
     def GetGubaoEffID(self): return self.GubaoEffID # 古宝特殊效果ID
     def GetGubaoEffType(self): return self.GubaoEffType # 效果类型
     def GetEffCond(self): return self.EffCond # 条件
+    def GetEffCond2(self): return self.EffCond2 # 条件2
+    def GetEffCond3(self): return self.EffCond3 # 条件3
     def GetIsPer(self): return self.IsPer # 是否百分比提升
     def GetEffFuncAttrIDList(self): return self.EffFuncAttrIDList # 提升指定功能属性ID列表
     def GetEffAttrID(self): return self.EffAttrID # 直接增加属性类型
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherSoul.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherSoul.py
index 45152c8..80618b9 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherSoul.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherSoul.py
@@ -556,6 +556,16 @@
     
     return
 
+def GetGatherSoulTotalLV(curPlayer):
+    ## 聚魂累计总等级
+    totalLV = 0
+    GatherSoulUnlockDict = IpyGameDataPY.GetFuncEvalCfg("GatherSoulHole", 1, {})
+    for holeNum in xrange(len(GatherSoulUnlockDict)):
+        GatherSoulData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GatherSoulHoleData % holeNum, 0)
+        if not GatherSoulData:
+            continue
+        totalLV += ItemControler.GetGatherSoulItemPlusLV(GatherSoulData) + 1
+    return totalLV
 
 def Sync_GatherSoulHoleInfo(curPlayer):
     ##通知聚魂孔信息
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py
index 160fea1..aff637e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGubao.py
@@ -16,10 +16,12 @@
 #-------------------------------------------------------------------------------
 
 import GameWorld
+import PlayerRune
 import ItemCommon
 import PlayerControl
 import IpyGameDataPY
 import ChPyNetSendPack
+import PlayerGatherSoul
 import NetPackCommon
 import IPY_GameWorld
 import PlayerHorse
@@ -221,6 +223,8 @@
         return
     effType = ipyData.GetGubaoEffType()
     effCond = ipyData.GetEffCond()
+    effCond2 = ipyData.GetEffCond2()
+    effCond3 = ipyData.GetEffCond3()
     attrID = ipyData.GetEffAttrID()
     effAttrValue = ipyData.GetEffAttrValue()
     if effAttrValue <= 0:
@@ -332,6 +336,134 @@
         if attrID > 0 and addAttrValue > 0:
             effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
             
+    #22    天星塔每通关x层+xx属性                    x层
+    elif effType == 22:
+        skyTowerFloor = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_SkyTowerFloor)
+        addAttrValue = int(skyTowerFloor / effCond * effAttrValue)
+        #GameWorld.DebugLog("    effID=%s,effType=%s,effCond=%s,skyTowerFloor=%s,attrID=%s,addAttrValue=%s" % (effID, effType, effCond, skyTowerFloor, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #23    符印塔每通关x层+xx属性                    x层
+    elif effType == 23:
+        trialTowerPassLV = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_TrialTower_PassLV)
+        addAttrValue = int(trialTowerPassLV / effCond * effAttrValue)
+        #GameWorld.DebugLog("    effID=%s,effType=%s,effCond=%s,trialTowerPassLV=%s,attrID=%s,addAttrValue=%s" % (effID, effType, effCond, trialTowerPassLV, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #24    符印等级每每x级+xx属性                   x级
+    elif effType == 24:
+        runeTotalLV = PlayerRune.GetRuneTotalLV(curPlayer)
+        addAttrValue = int(runeTotalLV / effCond * effAttrValue)
+        #GameWorld.DebugLog("    effID=%s,effType=%s,effCond=%s,runeTotalLV=%s,attrID=%s,addAttrValue=%s" % (effID, effType, effCond, runeTotalLV, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #25    聚魂等级每每x级+xx属性                   x级
+    elif effType == 25:
+        soulTotalLV = PlayerGatherSoul.GetGatherSoulTotalLV(curPlayer)
+        addAttrValue = int(soulTotalLV / effCond * effAttrValue)
+        #GameWorld.DebugLog("    effID=%s,effType=%s,effCond=%s,soulTotalLV=%s,attrID=%s,addAttrValue=%s" % (effID, effType, effCond, soulTotalLV, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #26    x阶装备强化每x级+xx属性                x阶        x级
+    elif effType == 26:
+        customAttrDictPlus = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Plus)[2]
+        classPlusLVDict = customAttrDictPlus.get("classPlusLVDict", {})
+        classLV = effCond
+        #GameWorld.DebugLog("    effID=%s,effType=%s,classLV=%s,classPlusLVDict=%s" % (effID, effType, classLV, classPlusLVDict))
+        if classLV not in classPlusLVDict:
+            return
+        totalPlusLV = classPlusLVDict[classLV]
+        addAttrValue = int(totalPlusLV / effCond2 * effAttrValue)
+        #GameWorld.DebugLog("        effCond=%s,effCond2=%s,totalPlusLV=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, totalPlusLV, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #27    x阶装备宝石每x级+xx属性                x阶        x级
+    elif effType == 27:
+        customAttrDictStone = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Stone)[2]
+        classStoneLVDict = customAttrDictStone.get("classStoneLVDict", {})
+        classLV = effCond
+        #GameWorld.DebugLog("    effID=%s,effType=%s,classLV=%s,classStoneLVDict=%s" % (effID, effType, classLV, classStoneLVDict))
+        if classLV not in classStoneLVDict:
+            return
+        totalStoneLV = classStoneLVDict[classLV]
+        addAttrValue = int(totalStoneLV / effCond2 * effAttrValue)
+        #GameWorld.DebugLog("        effCond=%s,effCond2=%s,totalStoneLV=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, totalStoneLV, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #28    x阶装备升星每x星+xx属性                x阶        x星
+    elif effType == 28:
+        customAttrDictStar = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Star)[2]
+        classStarLVDict = customAttrDictStar.get("classStarLVDict", {})
+        classLV = effCond
+        #GameWorld.DebugLog("    effID=%s,effType=%s,classLV=%s,classStarLVDict=%s" % (effID, effType, classLV, classStarLVDict))
+        if classLV not in classStarLVDict:
+            return
+        totalStarLV = classStarLVDict[classLV]
+        addAttrValue = int(totalStarLV / effCond2 * effAttrValue)
+        #GameWorld.DebugLog("        effCond=%s,effCond2=%s,totalStarLV=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, totalStarLV, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #29    x阶装备洗练每x级+xx属性                x阶        x级
+    elif effType == 29:
+        customAttrDictWash = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Wash)[2]
+        classWashLVDict = customAttrDictWash.get("classWashLVDict", {})
+        classLV = effCond
+        #GameWorld.DebugLog("    effID=%s,effType=%s,classLV=%s,classWashLVDict=%s" % (effID, effType, classLV, classWashLVDict))
+        if classLV not in classWashLVDict:
+            return
+        totalWashLV = classWashLVDict[classLV]
+        addAttrValue = int(totalWashLV / effCond2 * effAttrValue)
+        #GameWorld.DebugLog("        effCond=%s,effCond2=%s,totalWashLV=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, totalWashLV, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #30    x阶装备附魔每x级+xx属性                x阶        x级
+    elif effType == 30:
+        customAttrDictEnchant = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Enchant)[2]
+        classEnchantLVDict = customAttrDictEnchant.get("classEnchantLVDict", {})
+        classLV = effCond
+        #GameWorld.DebugLog("    effID=%s,effType=%s,classLV=%s,classEnchantLVDict=%s" % (effID, effType, classLV, classEnchantLVDict))
+        if classLV not in classEnchantLVDict:
+            return
+        totalEnchantLV = classEnchantLVDict[classLV]
+        addAttrValue = int(totalEnchantLV / effCond2 * effAttrValue)
+        #GameWorld.DebugLog("        effCond=%s,effCond2=%s,totalEnchantLV=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, totalEnchantLV, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #31    x阶装备x件x品质装备+xx属性            x阶        x件        x品质
+    elif effType == 31:
+        customAttrDictEquip = PlayerControl.GetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Equip)[2]
+        classEquipColorDict = customAttrDictEquip.get("classEquipColorDict", {})
+        classLV = effCond
+        #GameWorld.DebugLog("    effID=%s,effType=%s,classLV=%s,classEquipColorDict=%s" % (effID, effType, classLV, classEquipColorDict))
+        if classLV not in classEquipColorDict:
+            return
+        equipColorDict = classEquipColorDict[classLV]
+        equipColorCnt = 0
+        for itemColor in equipColorDict.values():
+            if itemColor >= effCond3:
+                equipColorCnt += 1
+        addAttrValue = int(equipColorCnt / effCond2 * effAttrValue)
+        #GameWorld.DebugLog("        effCond=%s,effCond2=%s,effCond3=%s,equipColorCnt=%s,attrID=%s,addAttrValue=%s" % (effCond, effCond2, effCond3, equipColorCnt, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
+    #32    获得x点灵根点+xx属性                        x点
+    elif effType == 32:
+        totalLingGenPoint = PlayerControl.GetTotalLingGenPoint(curPlayer)
+        addAttrValue = int(totalLingGenPoint / effCond * effAttrValue)
+        #GameWorld.DebugLog("    effID=%s,effType=%s,effCond=%s,totalLingGenPoint=%s,attrID=%s,addAttrValue=%s" % (effID, effType, effCond, totalLingGenPoint, attrID, addAttrValue))
+        if attrID > 0 and addAttrValue > 0:
+            effAttrInfo[attrID] = effAttrInfo.get(attrID, 0) + addAttrValue
+            
     return
 
 def __addStarEffFuncAttr(ipyData, effAttrInfo, funcAttrInfo, effAttrValue):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py
index ce3dc08..284eb5e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRune.py
@@ -612,6 +612,16 @@
     PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Rune, allAttrList)
     return
 
+def GetRuneTotalLV(curPlayer):
+    ## 符印累计总等级
+    totalLV = 0
+    runeHoleCnt = IpyGameDataPY.GetFuncCfg("RuneUnlock", 4)
+    for holeNum in xrange(1, runeHoleCnt + 1):
+        runeData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Rune_Data % holeNum, 0)
+        if not runeData:
+            continue
+        totalLV += ItemControler.GetRuneItemPlusLV(runeData) + 1
+    return totalLV
 
 
 ## 同步客户端

--
Gitblit v1.8.0