From dbcdbf7daf12e2a94ea4d3f1c37c10f998deb8c6 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 24 十二月 2019 16:16:23 +0800
Subject: [PATCH] 8359 【主干】活跃兑换(快速完成增加可指定次数) 8346 【恺英】【后端】协助系统(增加每日协助活跃令上限及社交加成记录)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
index 2d39151..e24b989 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActivity.py
@@ -673,28 +673,35 @@
 #struct    tagCMActivityPlaceQuickFinish
 #{
 #    tagHead        Head;
+#    BYTE        FinishCount;    //完成次数
 #};
 def OnActivityPlaceQuickFinish(index, clientData, tick):
     curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
-    
+    finishCount = clientData.FinishCount
     remainCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityPlaceRemainCount)
     if not remainCount:
         GameWorld.DebugLog("没有剩余活跃放置次数,无法快速完成!")
         return
+    finishCount = min(finishCount, remainCount)
+    if not finishCount:
+        return
     
     costItemID, costGoldParper = IpyGameDataPY.GetFuncEvalCfg("ActivityPlace", 5)
-    costItemCount = 1 # 默认扣一个
-    endCount = 1 # 只快速结算一次
+    costItemCount = finishCount # 每次扣一个
     
     costItemIndexList, bindCnt, unBindCnt = ItemCommon.GetPackItemBindStateIndexInfo(curPlayer, costItemID, costItemCount)
     lackCnt = costItemCount - bindCnt - unBindCnt
+    delItemCount = costItemCount
     if lackCnt > 0:
-        if not PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Paper, costGoldParper, ChConfig.Def_Cost_ActivityPlace):
+        costGoldParperTotal = costGoldParper * lackCnt
+        if not PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Paper, costGoldParperTotal, ChConfig.Def_Cost_ActivityPlace):
             return
-    else:
-        ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, costItemCount, ChConfig.ItemDel_ActivityPlace)
+        delItemCount -= lackCnt
         
-    __DoActivityPlaceRewardEnd(curPlayer, endCount)
+    if delItemCount > 0:
+        ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, delItemCount, ChConfig.ItemDel_ActivityPlace)
+        
+    __DoActivityPlaceRewardEnd(curPlayer, finishCount)
     return
 
 def ProcessActivityPlace(curPlayer):

--
Gitblit v1.8.0