From 70bda4c2b79cd0972c63aaf5fac29dd6b6e7f5bb Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 29 三月 2019 15:23:48 +0800
Subject: [PATCH] 6410 【后端】【2.0】装备评分

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_ResetAttrPoint.py |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_ResetAttrPoint.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_ResetAttrPoint.py
index 89e4182..baf0bc9 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_ResetAttrPoint.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_ResetAttrPoint.py
@@ -30,11 +30,13 @@
 def BatchUseItem(curPlayer, curRoleItem, tick, useCnt, exData):
     curEff = curRoleItem.GetEffectByIndex(0)
     effectID = curEff.GetEffectID()
-    if effectID not in ChConfig.Def_Effect_ResetAttrPoint:
+    if effectID != ChConfig.Def_Effect_ResetAttrPoint:
         return
     resetID = curEff.GetEffectValue(0)
-    resetPoint = curEff.GetEffectValue(0) * useCnt
-    if not DoResetAttrPoint(curPlayer, resetID, resetPoint):
+    if not resetID and exData:
+        resetID = exData
+    resetPoint = curEff.GetEffectValue(1) * useCnt
+    if not DoResetAttrPoint(curPlayer, resetID, resetPoint, curRoleItem.GetItemTypeID()):
         return
     
     #扣除物品
@@ -66,6 +68,8 @@
             realResetPoint = curPoint
         else:
             realResetPoint = min(resetPoint, curPoint)
+        if not realResetPoint:
+            continue
         resetPointTotal += realResetPoint
         updPoint = max(curPoint - realResetPoint, 0)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AddPointValue % resetID, updPoint)

--
Gitblit v1.8.0