From 9bbff431b0f42a19ed6efe6b98164586b5984a20 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 20 一月 2026 15:55:00 +0800
Subject: [PATCH] 16 卡牌服务端(后台GM广播;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py
index 5cf0dc3..9cb53a9 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py
@@ -27,7 +27,6 @@
 import ItemControler
 import IPY_GameWorld
 import NetPackCommon
-import PlayerBeauty
 import PlayerArena
 import PlayerLLMJ
 import ItemCommon
@@ -257,12 +256,19 @@
     dropAppointEquipDict = IpyGameDataPY.GetFuncEvalCfg("MainDropAppoint", 1, {})
     appointDropCntMax = max(dropAppointEquipDict) if dropAppointEquipDict else 0
     
+    lastSureOutNeed = ipyData.GetLastSureOutNeed() # 最后一档保底必出
+    lastColorCnt = IpyGameDataPY.GetFuncCfg("ItemRecordEquip", 1) # 有产出的最后几个品质需要记录
+    
     for index in range(dropEquipCnt):
         bossType = bossTypeList[index % len(bossTypeList)]
         if bossType not in bossTypeDropRateDict:
             continue
         colorRateList = bossTypeDropRateDict.get(bossType, [])
-        GameWorld.DebugLog("bossType=%s,colorRateList=%s,totalRate=%s" % (bossType, colorRateList, totalRate), playerID)
+        lastColorEquipLucky = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LastColorEquipLucky)
+        lastColor = colorRateList[-1][1]
+        needRecordColorMin = lastColor - lastColorCnt + 1
+        GameWorld.DebugLog("lastColorEquipLucky=%s/%s,bossType=%s,lastColor=%s,colorRateList=%s,totalRate=%s" 
+                           % (lastColorEquipLucky, lastSureOutNeed, bossType, lastColor, colorRateList, totalRate), playerID)
         
         setAttrDict = None
         appointDropEquipCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AppointDropEquipCnt) + 1
@@ -278,7 +284,13 @@
                 setAttrDict[ShareDefine.Def_CItemKey_AppointID] = appointID
             GameWorld.DebugLog("定制掉落第%s次: equipID=%s,setAttrDict=%s" % (appointDropEquipCnt, randEquipID, setAttrDict))
         else:
-            itemColor = GameWorld.GetResultByRandomList(colorRateList)
+            if lastSureOutNeed and lastColorEquipLucky >= lastSureOutNeed:
+                itemColor = lastColor
+                GameWorld.DebugLog("保底必出最后一档品质: %s,lastColorEquipLucky=%s/%s" % (itemColor, lastColorEquipLucky, lastSureOutNeed))
+            else:
+                itemColor = GameWorld.GetResultByRandomList(colorRateList)
+            if itemColor == lastColor or not lastSureOutNeed:
+                lastColorEquipLucky = 0
             if not itemColor:
                 continue
             equipIDList = NPCCommon.__GetEquipIDList(0, color=itemColor, placeList=ChConfig.Def_MainEquipPlaces, findType="MainEquipDrop")
@@ -291,9 +303,12 @@
             continue
         curItem.SetIsBind(1) # 为1时代表是掉落
         #GameWorld.DebugLog("掉落装备: randEquipID=%s,%s" % (randEquipID, curItem.GetGUID()), playerID)
-        if not ItemControler.DoLogic_PutItemInPack(curPlayer, curItem, packIndexList=[IPY_GameWorld.rptIdentify]):
+        isForceDR = curItem.GetItemColor() >= needRecordColorMin # 记录流向
+        if not ItemControler.DoLogic_PutItemInPack(curPlayer, curItem, event=["MainDrop", isForceDR, {}], packIndexList=[IPY_GameWorld.rptIdentify]):
             continue
         
+        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LastColorEquipLucky, lastColorEquipLucky)
+        
         unXiantaoCntEquip -= dropOneNeed
         PlayerControl.SetUnXiantaoCntEquip(curPlayer, unXiantaoCntEquip)
         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_UnXiantaoCntEquip, unXiantaoCntEquip)

--
Gitblit v1.8.0