From df2aaca6d5b503cc993ec2bf782de6a3a6d900cb Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期六, 27 四月 2019 11:52:45 +0800
Subject: [PATCH] 6636 【后端】【2.0】仙宝寻主

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossRealmPK.py |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossRealmPK.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossRealmPK.py
index 98026a1..8590cf6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossRealmPK.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCrossRealmPK.py
@@ -446,8 +446,15 @@
     if not dayFreeMatchCountMax:
         GameWorld.DebugLog("每日匹配次数没有限制,不需要购买次数!", playerID)
         return
-    dayBuyCountMax = IpyGameDataPY.GetFuncCfg("CrossRealmPKMatchCount", 2)
+    todayPKCount  = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_TodayPKCount)
     todayBuyCount  = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_TodayBuyCount)
+    todayItemAddCount  = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_ItemAddCount)
+    canPKCount = dayFreeMatchCountMax + todayBuyCount + todayItemAddCount - todayPKCount
+    if canPKCount >= dayFreeMatchCountMax:
+        GameWorld.DebugLog("可PK次数不能大于每日免费次数!", playerID)
+        return
+    dayBuyCountMax = IpyGameDataPY.GetFuncCfg("CrossRealmPKMatchCount", 2)
+    #todayBuyCount  = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CrossPK_TodayBuyCount)
     if dayBuyCountMax and todayBuyCount >= dayBuyCountMax:
         GameWorld.DebugLog("今日购买次数已满,无法购买!todayBuyCount=%s" % (todayBuyCount), playerID)
         return
@@ -589,7 +596,7 @@
                        % (awardType, awardData, awardIndex, awardState, awardItemList), playerID)
     drDataDict.update({"awardIndex":awardIndex, "awardState":awardState, "awardItemList":awardItemList})
     for itemID, itemCnt, isBind in awardItemList:
-        ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, isBind, [IPY_GameWorld.rptItem])
+        ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem])
         
     if awardType == 3:
         PlayerControl.WorldNotify(0, "CrossMatching22", [curPlayer.GetPlayerName(), awardDanLV])
@@ -712,7 +719,7 @@
         PlayerControl.SendMailByKey(mailTypeKey, [playerID], awardItemList, mailParamList, detail=mailDetail)
     else:
         for itemID, itemCnt, isBind in awardItemList:
-            ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, isBind, [IPY_GameWorld.rptItem])
+            ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem])
             
     GameWorld.Log("领取成功! awardItemList=%s" % (awardItemList), playerID)
     drDataDict = {"awardItemList":awardItemList, "order":order, "danLV":danLV, "seasonAwardLV":seasonAwardLV, "isMail":isMail}

--
Gitblit v1.8.0