From c19d3b869bfb294223a38880e15935fc0d73bc9e Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 15 十一月 2018 14:35:18 +0800
Subject: [PATCH] 2378 【1.3】【1.2】集市购买偶发出现扣仙玉没有给物品bug

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
index 3912890..0e8bca1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
@@ -534,8 +534,16 @@
             for attid, attnum in IpyGameDataPY.GetFuncEvalCfg('MWSignDayAttr', 1, {}).items():
                 addAttr[int(attid)] = attnum * totalSignNum
             GameWorld.AddDictValue(allAttrDict, addAttr)
-        
-        
+        fbpasslv = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWFBPassLevel % magicWeaponID)
+        if fbpasslv: #副本关卡属性
+            fbipyData = IpyGameDataPY.GetIpyGameData('MagicWeaponFB', magicWeaponID, fbpasslv)
+            if fbipyData:
+                attrDict = fbipyData.GetAttrDict()
+                for effID, value in attrDict.items():
+                    effID = int(effID)
+                    allAttrDict[effID] = allAttrDict.get(effID, 0) + value
+                
+                
         for effID, value in allAttrDict.items():
             if treasureType == 1:
                 PlayerControl.CalcAttrDict_Type(effID, value, allAttrList1)
@@ -899,13 +907,15 @@
         mwLv = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MagicWeaponLV % mwID)
         curUpExp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MagicWeaponUpExp % mwID)
         state = GetIsClickMagicWeapon(curPlayer, mwID)
-        if not mwLv and not curUpExp and not state:
+        FBPassLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MWFBPassLevel % mwID)
+        if not mwLv and not curUpExp and not state and not FBPassLV:
             continue
         pack = ChPyNetSendPack.tagMCMagicWeaponInfo()
         pack.MWID = mwID
         pack.LV = mwLv
         pack.Exp = curUpExp
         pack.State = state
+        pack.FBPassLV = FBPassLV
         sendPack.InfoList.append(pack)
     sendPack.Count = len(sendPack.InfoList)
     if sendPack.Count:
@@ -985,7 +995,8 @@
             canGetCnt = 1 #已达到次数上限,最后一次不管是否满足都让领(一般是因为配置错误或者变更导致)
         if canGetCnt <= 0:
             return
-        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MWSoulGotValue % privilege, min(maxValue, gotValue+canGetCnt*singleValue))
+        updGotCnt = min(maxValue, gotValue+canGetCnt*singleValue) if maxValue else gotValue+canGetCnt*singleValue
+        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MWSoulGotValue % privilege, updGotCnt)
         CalcMagicWeaponSoulAttr(curPlayer)
         PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
         
@@ -1121,4 +1132,12 @@
     for attrID, attrValue in allAttrDict.items():
         PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrList)
     PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_MagicWeaponSoul, allAttrList)
+    return
+
+def UptateMWFBPasslv(curPlayer, mwID, passLV):
+    GameWorld.Log('更新关卡 mwID=%s,level=%s'%(mwID, passLV))
+    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MWFBPassLevel % mwID, passLV)
+    CalcMagicWeaponAttr(curPlayer)
+    PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
+    Sycn_MagicWeaponLV(curPlayer, mwID)
     return
\ No newline at end of file

--
Gitblit v1.8.0