From fab6b218ebda60b9d364d0188be91e4b104f03e8 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 21 一月 2019 17:41:13 +0800
Subject: [PATCH] 5959 子 【开发】【1.5.100】增加诛仙神技 / 【后端】【1.5.100】诛仙神技

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
index 619d28c..8d9824c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
@@ -571,13 +571,20 @@
     maxCnt = ItemCommon.GetCanUseCountDaily(curItem)
     if maxCnt <= 0:
         return -1
+    curItemID = curItem.GetItemTypeID()
+    useCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ItemUseCntToday % curItemID)
+    for itemIDList in IpyGameDataPY.GetFuncEvalCfg('ShareUseCntItem'):
+        if curItemID not in itemIDList:
+            continue
+        for itemID in itemIDList:
+            if itemID == curItemID:
+                continue
+            useCnt += curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ItemUseCntToday % itemID)
     
-    itemID = curItem.GetItemTypeID()
-    useCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ItemUseCntToday % itemID)
     canUseCnt = max(0, maxCnt - useCnt)
     
     if canUseCnt <= 0:
-        GameWorld.DebugLog("已达到今日使用次数上限!itemID=%s,useCnt=%s,maxCnt=%s" % (itemID, useCnt, maxCnt))
+        GameWorld.DebugLog("已达到今日使用次数上限!itemID=%s,useCnt=%s,maxCnt=%s" % (curItemID, useCnt, maxCnt))
         #PlayerControl.NotifyCode(curPlayer, notifyMark, [itemID])
         
     #GameWorld.DebugLog("物品ID(%s)今日已使用次数(%s), maxCnt=%s" % (itemID, useCnt, maxCnt))
@@ -698,7 +705,8 @@
                            ChConfig.Def_ItemType_GiveMoney:"Item_GiveMoney",         # 给人物金钱
                            ChConfig.Def_ItemType_AddLimitBuff:"Item_Add_LimitingBuff",         # 给限时buff物品
                            ChConfig.Def_ItemType_AddExpBuff:"Item_Add_LimitingBuff",         # 给限时buff物品
-                           ChConfig.Def_ItemType_ResetAttrPoint:"Item_ResetAttrPoint"    #单个属性点重置
+                           ChConfig.Def_ItemType_ResetAttrPoint:"Item_ResetAttrPoint",    #单个属性点重置
+                           ChConfig.Def_ItemType_AddCrossRealmPKCnt:"Item_AddCrossRealmPKCnt"    #增加跨服PK次数
                            } 
     
     #根据物品效果使用{物品效果ID:call的py名}

--
Gitblit v1.8.0