From d70324d5963b2c4832f3696e08825999b3848822 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期三, 07 十一月 2018 16:05:45 +0800
Subject: [PATCH] 2306 【1.2】【BUG】老号的封魔之魂次数满了无法领取

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

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py
index a046f96..f92a2e0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py
@@ -263,7 +263,9 @@
     if hasUseCnt <= 0:
         return DefaultReturn
     PlayerControl.NomalDictSetProperty(curPlayer, eatCntKey, eatCnt)
-    
+    if funcIndex == ShareDefine.Def_AttrFruitFunc_Stove:
+        PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_UseStoveBylv, hasUseCnt, [item.GetLV()])
+        
     ItemCommon.DelItem(curPlayer, item, hasUseCnt, True, ChConfig.ItemDel_AttrFruit)
     return addValue, hasUseCnt
 
@@ -466,3 +468,18 @@
         
     return eatCntDict
 
+def IsFruitEatFull(curPlayer, itemID):
+    #使用次数是否已满
+    ipyData = GetAttrFruitIpyData(itemID)
+    if not ipyData:
+        return
+    
+    maxEatCnt = ipyData.GetMaxUseCnt()
+    eatCntKey = ChConfig.Def_PDict_AttrFruitEatCnt % itemID
+    limitType = Def_LimitType_Cnt
+    if limitType == Def_LimitType_Attr:
+        eatCntKey = ChConfig.Def_PDict_AttrFruitAddValue % itemID
+    eatCnt = curPlayer.NomalDictGetProperty(eatCntKey) # 已吃次数/属性值
+    if eatCnt >= maxEatCnt:
+        return True
+    return
\ No newline at end of file

--
Gitblit v1.8.0