From 6ccc82cff0bc5ecd2734253d4c5ef1ae2bb748da Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 17 九月 2020 12:24:13 +0800
Subject: [PATCH] 8483 【后端】【主干】【changwei】【bt】协助方和被协助方任何模式不会互相造成伤害(优化协助同一玩家的情况)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWing.py |   50 ++++++++------------------------------------------
 1 files changed, 8 insertions(+), 42 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWing.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWing.py
index cc27958..e28e859 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWing.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerWing.py
@@ -84,7 +84,7 @@
         GameWorld.DebugLog("没有精炼值")
         return
     WingProgressUP(curWing, totalPoint, materialItemDict, curPlayer)
-    CalcWingAttr(curPlayer)
+    ChEquip.RefreshPlayerLingQiEquipAttr(curPlayer)
     PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
     PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_WingRefine, 1)
     return
@@ -108,7 +108,7 @@
     wingClassLV = ItemCommon.GetItemClassLV(curWing)
     for index in materialMessageList:
         curItem = itemPack.GetAt(index)
-        if not ItemCommon.CheckItemCanUse(curItem) or ItemControler.GetIsAuctionItem(curItem):
+        if not ItemCommon.CheckItemCanUse(curItem):
             GameWorld.DebugLog("这个格子没有合法材料,index=%s" % index)
             continue
         curItemID = curItem.GetItemTypeID()
@@ -238,18 +238,18 @@
     # 更新翅膀精炼颜色
     wingColorDict = wingAttrIpyData.GetItemColorInfo()
     curColor = curWing.GetUserAttr(ShareDefine.Def_IudetItemColor)
-    isColorChange = False
+    #isColorChange = False
     for color in wingColorDict:
         if updWingProgress >= wingColorDict[color] and color > curColor:
             curColor = color
             curWing.SetUserAttr(ShareDefine.Def_IudetItemColor, curColor)
             GameWorld.DebugLog("    更新翅膀颜色: updWingProgress=%s,curColor=%s" % (updWingProgress, curColor))
-            isColorChange = True
+            #isColorChange = True
     maxRefineExp = wingAttrIpyData.GetMaxRefineExp()
     if curPlayer and wingProgress < maxRefineExp <= updWingProgress:
         PlayerControl.WorldNotify(0, "WingsRefinePerfect", [curPlayer.GetPlayerName(), curItemID, curWing.GetUserData()])
-    if curPlayer and isColorChange:
-        PlayerSuccess.DoEquipSuccessLogic(curPlayer)
+    #if curPlayer and isColorChange:
+    #    PlayerSuccess.DoEquipSuccessLogic(curPlayer)
     return
 
 def GetWingRefineAttrData(itemID):
@@ -257,7 +257,7 @@
     if not wingData:
         return
     wingClassLV = ItemCommon.GetItemClassLV(wingData)
-    return IpyGameDataPY.GetIpyGameData("WingRefineAttr", wingClassLV)
+    return IpyGameDataPY.GetIpyGameDataNotLog("WingRefineAttr", wingClassLV)
 
 def GetWingProgressPerValueByID(itemID, per):
     ## 获取翅膀精炼百分比对应的精炼值
@@ -278,36 +278,7 @@
 #  @param curPlayer 玩家
 #  @param allAttrList 属性列表
 #  @return None
-def CalcWingAttr(curPlayer):
-    
-    classLV = 0
-    equipPlace = ShareDefine.retWing
-    allAttrList = [{} for _ in range(4)]
-        
-    curWing = None
-    equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
-    ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
-    if ipyData:
-        curWing = equipPack.GetAt(ipyData.GetGridIndex())
-        
-    if not ItemCommon.CheckItemCanUse(curWing):
-        #GameWorld.DebugLog("没有穿戴翅膀!")
-        PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Wing, allAttrList)
-        return
-    
-    if not ItemCommon.CheckItemCanUseByExpireTime(curWing):
-        # 过期
-        PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Wing, allAttrList)
-        return False
-    
-    # 物品表固定效果属性
-    for effIndex in xrange(curWing.GetEffectCount()):
-        curEff = curWing.GetEffectByIndex(effIndex)
-        effID = curEff.GetEffectID()
-        if effID == 0:
-            continue
-        PlayerControl.CalcAttrDict_Type(effID, curEff.GetEffectValue(0), allAttrList)
-    #GameWorld.DebugLog("翅膀固定属性: %s" % allAttrList)
+def CalcWingAttrEx(curPlayer, curWing, allAttrList):
     
     # 精炼属性
     wingAttrIpyData = GetWingRefineAttrData(curWing.GetItemTypeID())
@@ -321,11 +292,6 @@
         for effID, value in fujiaValueDict.items():
             PlayerControl.CalcAttrDict_Type(effID, int(value * rate), allAttrList)
     #GameWorld.DebugLog("    精炼属性: %s" % allAttrList)
-            
-    # 传奇属性
-    ChEquip.CalcAttr_LegendAttr(curPlayer, curWing, allAttrList)
-    #GameWorld.DebugLog("    传奇属性: %s" % allAttrList)
-    PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Wing, allAttrList)
     return
 
  

--
Gitblit v1.8.0