From 612f3073bac5ae286ddf5e5b9c76502bd54b0e57 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 08 一月 2026 20:55:13 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(主线装备掉落增加当前树等级最后一档品质必掉保底支持;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 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..7f7dead 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,15 @@
     dropAppointEquipDict = IpyGameDataPY.GetFuncEvalCfg("MainDropAppoint", 1, {})
     appointDropCntMax = max(dropAppointEquipDict) if dropAppointEquipDict else 0
     
+    lastSureOutNeed = ipyData.GetLastSureOutNeed() # 最后一档保底必出
+    
     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)
+        GameWorld.DebugLog("lastColorEquipLucky=%s/%s,bossType=%s,colorRateList=%s,totalRate=%s" % (lastColorEquipLucky, lastSureOutNeed, bossType, colorRateList, totalRate), playerID)
         
         setAttrDict = None
         appointDropEquipCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AppointDropEquipCnt) + 1
@@ -278,7 +280,14 @@
                 setAttrDict[ShareDefine.Def_CItemKey_AppointID] = appointID
             GameWorld.DebugLog("定制掉落第%s次: equipID=%s,setAttrDict=%s" % (appointDropEquipCnt, randEquipID, setAttrDict))
         else:
-            itemColor = GameWorld.GetResultByRandomList(colorRateList)
+            lastColor = colorRateList[-1][1]
+            if lastSureOutNeed and lastColorEquipLucky >= lastSureOutNeed:
+                itemColor = lastColor
+                GameWorld.DebugLog("保底必出最后一档品质: %s,lastColorEquipLucky=%s/%s" % (itemColor, lastColorEquipLucky, lastSureOutNeed))
+            else:
+                itemColor = GameWorld.GetResultByRandomList(colorRateList)
+            if itemColor == lastColor:
+                lastColorEquipLucky = 0
             if not itemColor:
                 continue
             equipIDList = NPCCommon.__GetEquipIDList(0, color=itemColor, placeList=ChConfig.Def_MainEquipPlaces, findType="MainEquipDrop")
@@ -294,6 +303,8 @@
         if not ItemControler.DoLogic_PutItemInPack(curPlayer, curItem, 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