From f5cd3e2c7831b5f7e8865475804580ec713702ad Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 26 十一月 2021 11:24:41 +0800
Subject: [PATCH] 9341 【BT5】【主干】【后端】情缘系统(吃喜糖改为随机获得一种物品)

---
 ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerLove.py |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerLove.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerLove.py
index e0b6f71..7eeaebd 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerLove.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerLove.py
@@ -928,7 +928,9 @@
     ipyData = IpyGameDataPY.GetIpyGameData("Marry", bridePriceID)
     if not ipyData:
         return
-    candyItemInfo = ipyData.GetCandyItemInfo()
+    candyItemInfo = []
+    candyItemWeightInfo = ipyData.GetCandyItemWeightInfo()
+    candyNotifyItemInfo = ipyData.GetCandyNotifyItemInfo()
     
     playerFreeEatCount = candyObj.playerFreeEatCountDict.get(playerID, 0)
     playerFireworksCount = candyObj.fireworksCountDict.get(playerID, 0)
@@ -951,7 +953,15 @@
         
         updProsperity = candyObj.prosperity
         updPlayerFreeEatCount = candyObj.playerFreeEatCountDict.get(playerID, 0)
-        GameWorld.Log("更新喜糖宴会: updProsperity=%s,updPlayerFreeEatCount=%s" % (updProsperity, updPlayerFreeEatCount), playerID)
+        
+        getCandyItemInfo = GameWorld.GetResultByWeightList(candyItemWeightInfo, [])
+        if getCandyItemInfo:
+            candyItemInfo.append(getCandyItemInfo)
+            itemID, itemCount = getCandyItemInfo[:2]
+            if itemID in candyNotifyItemInfo:
+                PlayerControl.WorldNotify(0, "EatCandyItemNotify", [curPlayer.GetName(), itemID, itemCount])
+        GameWorld.Log("更新喜糖宴会: updProsperity=%s,updPlayerFreeEatCount=%s,getCandyItemInfo=%s" 
+                      % (updProsperity, updPlayerFreeEatCount, getCandyItemInfo), playerID)
         
     return canBuy, isFree, costMoneyType, costMoneyValue, candyItemInfo
 

--
Gitblit v1.8.0