From 82a94e55b5710d50643b3d0bf8581afbb3f58cf2 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 18 六月 2019 16:15:05 +0800
Subject: [PATCH] 7339 子 【开发】【2.0】称号,灵宠,技能附带效果 / 【后端】【2.0】新增效果

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherSoul.py |   28 ++++++++++++++++++----------
 1 files changed, 18 insertions(+), 10 deletions(-)

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 e9eca08..45152c8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherSoul.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherSoul.py
@@ -68,9 +68,9 @@
             exp = eval(IpyGameDataPY.GetFuncCompileCfg('GatherSoulLevelUp'))
             g_GatherSoulLVExpDict[lv] = exp
             
-        qualityPerDict = IpyGameDataPY.GetFuncEvalCfg('GatherSoulLevelUp', 2, {})
-        if itemColor in qualityPerDict:
-            exp *= float(qualityPerDict[itemColor])
+        qualityPerDict = IpyGameDataPY.GetFuncEvalCfg('GatherSoulLevelUp', 2, {}).get(str(itemData.GetType()), {})
+        if str(itemColor) in qualityPerDict:
+            exp *= float(qualityPerDict[str(itemColor)])
             
         attrTypeCnt = len(ipyData.GetAttrType())
         specialPer = IpyGameDataPY.GetFuncEvalCfg('GatherSoulLevelUp', 3, {}).get(attrTypeCnt, 1)
@@ -78,7 +78,7 @@
         
     soulGrade = ipyData.GetSoulGrade()
     exp *= float(IpyGameDataPY.GetFuncEvalCfg('GatherSoulLevelUp', 5, {}).get(soulGrade, 1))
-    return exp
+    return int(exp)
 
 
 ## 获取聚魂属性数值
@@ -345,6 +345,8 @@
         totalSoulDust += soulDust
         delPlaceDict[place] = [GatherSoulData, soulidList, int(soulDust), soulSplinters, soulCore]
         
+    if not delPlaceDict:
+        return
     if delPlaceDict:
         ItemCommon.DelVPackItem(curPlayer, packIndex, delPlaceDict.keys(), ChConfig.ItemDel_GatherSoul)
     addDataDict = {"delPlaceDict":delPlaceDict, "isAuto":isAuto}
@@ -371,11 +373,14 @@
             for itemID, itemCnt in giveMaterialDict.items():
                 ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [ShareDefine.rptGatherSoul])
     GameWorld.DebugLog("聚魂分解: isAuto=%s,PlaceIndexList=%s, delPlaceDict=%s, giveMaterialDict=%s" % (isAuto, placeList, delPlaceDict, giveMaterialDict))
+    if not isAuto:
+        curPlayer.Sync_MakeItemAnswer(ShareDefine.Def_mitGatherSoulDecompose, 1)
     return
 
 
-def __GetGatherSoulSplitMaterial(gathersoulID, soulidList=[], soulSplinters=0, soulCore=0):
+def __GetGatherSoulSplitMaterial(gathersoulID):
     ##拆解多属性聚魂 返回单属性聚魂ID,材料
+    soulidList, soulSplinters, soulCore= [], 0, 0
     compoundIpyData = IpyGameDataPY.GetIpyGameDataNotLog('GatherSoulCompound', gathersoulID)
     if compoundIpyData:
         materialList = compoundIpyData.GetNeedItem()
@@ -415,16 +420,18 @@
     
     materialsIDList = []
     materialsLVDict = {}
-    indexList1 = []  #背包的聚魂索引
-    indexList2 = []  #孔索引
+    indexList1, dataList1 = [], []  #背包的聚魂索引
+    indexList2, dataList2 = [], []  #孔索引
     for i, placeType in enumerate(packList):
         index = indexList[i]
         if placeType == 0:
             GatherSoulData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_VPackItem % (ShareDefine.rptGatherSoul, index))  # 聚魂背包中的值
             indexList1.append(index)
+            dataList1.append(GatherSoulData)
         else:
             GatherSoulData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GatherSoulHoleData % (index), 0)
             indexList2.append(index)
+            dataList2.append(GatherSoulData)
         if not GatherSoulData:
             continue
         GatherSoulItemID = ItemControler.GetGatherSoulItemID(GatherSoulData)
@@ -488,13 +495,14 @@
         RefreshGatherSoulAttr(curPlayer)
         PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
     #返还多余魂尘
+    totalPoint = int(totalPoint)
     if totalPoint > 0:
         PlayerControl.GiveMoney(curPlayer, ShareDefine.TYPE_Price_SoulDust, totalPoint)
     #给新物品
     curItem = ItemControler.GetOutPutItemObj(tagItemID)
     curItem.SetUserAttr(ShareDefine.Def_IudetGatherSoulLV, tagItemLV)
     PlayerItemControler = ItemControler.PlayerItemControler(curPlayer)
-    PlayerItemControler.PutInItem(ShareDefine.rptGatherSoul, curItem, event=[ChConfig.ItemGive_ItemCompound, False, {'indexList1':indexList1, 'indexList2':indexList2, 'soulDust':totalPoint}])
+    PlayerItemControler.PutInItem(ShareDefine.rptGatherSoul, curItem, event=[ChConfig.ItemGive_ItemCompound, False, {'indexList1':dataList1, 'indexList2':dataList2, 'soulDust':totalPoint}])
     GameWorld.DebugLog('    聚魂合成 成功')
     curPlayer.Sync_MakeItemAnswer(ShareDefine.Def_mitGatherSoulCompound, 1)
     return
@@ -515,8 +523,8 @@
         itemData = GameWorld.GetGameData().GetItemByTypeID(GatherSoulItemID)
         if not itemData:
             continue
-        if itemData.GetType() == ChConfig.Def_ItemType_GatherSoulCore:
-            continue
+#        if itemData.GetType() == ChConfig.Def_ItemType_GatherSoulCore:
+#            continue
         itemColor = itemData.GetItemColor()
         GatherSoulItemPlusLV = ItemControler.GetGatherSoulItemPlusLV(GatherSoulData) + 1 #客户端1开始
         totalLV += GatherSoulItemPlusLV

--
Gitblit v1.8.0