From f05e181ee1f27a3a60c449477acfc6e83d83f5e9 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 15 十二月 2025 19:27:13 +0800
Subject: [PATCH] 121 【武将】武将系统-服务端(优化广播支持按产出格子配置不同的广播;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
index ebc0dea..05afc6a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
@@ -361,7 +361,7 @@
     GameWorld.DebugLog("beSureCountDict=%s" % beSureCountDict, playerID)
     GameWorld.DebugLog("ensureCount=%s, %s" % (ensureCount, ensureRateList), playerID)
     notifyGridNumList = setIpyData.GetNotifyGridNumList() # 额外需要广播的格子,幸运必出、次数必出可不配置
-    notifyKey = setIpyData.GetNotifyKey()
+    notifyKeyDict = setIpyData.GetNotifyKeyDict()
     gridNumMaxLimitInfo = setIpyData.GetGridNumMaxLimitInfo() # {"格子":最大可产出次数, ...}
     gridNumCountInfo = {} # 有限制产出次数的格子已经产出数
     for gridNumStr in gridNumMaxLimitInfo.keys():
@@ -647,17 +647,18 @@
         itemObj = ItemControler.GetOutPutItemObj(itemID, itemCount, isBind, curPlayer=curPlayer)
         mailItemDict = ItemCommon.GetMailItemDict(itemObj)
         
-        if int(gridNum) in notifyGridNumList and notifyKey:
+        if int(gridNum) in notifyGridNumList and notifyKeyDict:
+            notifyKey = notifyKeyDict.get(int(gridNum), notifyKeyDict.get(0, ""))
             if treasureType in TreasureType_HeroCallList:
                 if PlayerHero.GetHeroActivite(curPlayer, itemID):
                     notifyKey = ""
                     GameWorld.DebugLog("招募武将非首次获得的不广播了! itemID=%s" % itemID, playerID)
-                else:
+                elif notifyKey:
                     heroIpyData = IpyGameDataPY.GetIpyGameData("Hero", itemID)
                     if heroIpyData:
                         heroQuality = heroIpyData.GetQuality()
                         PlayerControl.WorldNotify(0, notifyKey, [curPlayer.GetPlayerName(), heroQuality, itemID])
-            else:
+            elif notifyKey:
                 PlayerControl.WorldNotify(0, notifyKey, [curPlayer.GetPlayerName(), itemID, itemObj.GetUserData(), itemCount])
             
         if mailItemList or not itemControl.PutInItem(packType, itemObj, event=[ChConfig.ItemGive_Treasure, False, {}]):

--
Gitblit v1.8.0