From f88ead93b8cc2d26ce548d5f9138b5f37737175e Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 24 十二月 2018 17:16:39 +0800
Subject: [PATCH] 5372 【后端】【1.4】聚魂副本开发(玩家召唤兽不能对怪上buff)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherSoul.py | 41 ++++++++++++++++++++++++++++++++++++-----
1 files changed, 36 insertions(+), 5 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 bb09766..750dbcf 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherSoul.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherSoul.py
@@ -27,6 +27,7 @@
import IpyGameDataPY
import FormulaControl
import DataRecordPack
+import PlayerSuccess
g_GatherSoulLVExpDict = {} #经验缓存
g_gatherSoulLVAttrDict = {} #属性缓存
@@ -67,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)
@@ -221,6 +222,7 @@
RefreshGatherSoulAttr(curPlayer)
PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
Sync_GatherSoulHoleInfo(curPlayer)
+ DoGatherSoulSuccessLogic(curPlayer)
return True
@@ -280,7 +282,7 @@
RefreshGatherSoulAttr(curPlayer)
PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
Sync_GatherSoulHoleInfo(curPlayer)
-
+ DoGatherSoulSuccessLogic(curPlayer)
GameWorld.DebugLog("聚魂升级!placeType=%s,placeIndex=%s,GatherSoulData=%s,updGatherSoulData=%s"
% (placeType, placeIndex, GatherSoulData, updGatherSoulData), playerID)
return
@@ -343,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}
@@ -369,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()
@@ -498,6 +505,30 @@
return
+def DoGatherSoulSuccessLogic(curPlayer):
+ #聚魂成就处理
+ #清掉#镶嵌X枚X品质聚魂的成就信息
+ PlayerSuccess.ResetSuccessByType(curPlayer, ShareDefine.SuccType_InlayGatherSoul)
+ totalLV = 0
+ GatherSoulUnlockDict = IpyGameDataPY.GetFuncEvalCfg("GatherSoulHole", 1, {})
+ maxGatherSoulHole = len(GatherSoulUnlockDict)
+ for holeNum in xrange(maxGatherSoulHole):
+ GatherSoulData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GatherSoulHoleData % holeNum, 0)
+ if not GatherSoulData:
+ continue
+ GatherSoulItemID = ItemControler.GetGatherSoulItemID(GatherSoulData)
+ itemData = GameWorld.GetGameData().GetItemByTypeID(GatherSoulItemID)
+ if not itemData:
+ continue
+ if itemData.GetType() == ChConfig.Def_ItemType_GatherSoulCore:
+ continue
+ itemColor = itemData.GetItemColor()
+ GatherSoulItemPlusLV = ItemControler.GetGatherSoulItemPlusLV(GatherSoulData) + 1 #客户端1开始
+ totalLV += GatherSoulItemPlusLV
+ PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_InlayGatherSoul, 1, [itemColor])
+ PlayerSuccess.UptateSuccessProgress(curPlayer, ShareDefine.SuccType_GatherSoulLvUp, totalLV)
+ return
+
def RefreshGatherSoulAttr(curPlayer):
allAttrList = [{} for _ in range(4)]
GatherSoulUnlockDict = IpyGameDataPY.GetFuncEvalCfg("GatherSoulHole", 1, {})
--
Gitblit v1.8.0