From 46dbf29a22bd25d8e9c6ea4c34fea35a4828d712 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 31 十二月 2025 12:13:01 +0800
Subject: [PATCH] 121 【武将】武将系统-服务端(武将重置突破支持消耗货币;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 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 ad97def..7fbb889 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
@@ -35,7 +35,6 @@
 import NPCCommon
 import BattleObj
 import ChEquip
-import ObjPool
 
 import random
 
@@ -229,6 +228,13 @@
         bossType = npcData.GetBossType()
         bossTypeList.append(bossType)
         
+    # 支持未击杀结算掉落,防止一次性掉太多导致玩家一直堆积未结算的掉落,前端在掉落背包满处理完后会补发一次请求处理未结算掉落
+    if not bossTypeList:
+        bossType = 0 # 默认小怪
+        bossTypeList = [bossType]
+        GameWorld.DebugLogEx("未击杀结算掉落默认按小怪掉落! bossTypeList=%s" % bossTypeList)
+        
+    for bossType in bossTypeList:
         if bossType in bossTypeDropRateDict:
             continue
         
@@ -369,7 +375,7 @@
 #    tagHead        Head;
 #    BYTE        Count;
 #    WORD        IndexList[Count];    // 掉落背包中的物品格子索引列表
-#    BYTE        OPType;        // 0 - 拾取非装备物品;1 - 分解;2 - 穿戴/替换;
+#    BYTE        OPType;        // 0 - 拾取非装备物品;1 - 分解;2 - 穿戴/替换;3-结算未掉落物品;
 #    BYTE        OPValue;        // 操作额外指令值,由操作类型决定,如穿戴时可发送穿戴后是否自动分解
 #};
 def OnMainDropItemOP(index, clientData, tick):
@@ -382,6 +388,8 @@
         __doEquipMainEquip(curPlayer, itemIndexList, opValue)
     elif opType == 1:
         __doDecomposeMainEquip(curPlayer, itemIndexList)
+    elif opType == 3: # 结算未掉落物品
+        __doMainDrop(curPlayer, [])
     else:
         __doPickupMainItem(curPlayer, itemIndexList)
         
@@ -484,7 +492,7 @@
     moneyTotal = int(round(moneyTotal)) # 四舍五入取整
     GameWorld.DebugLog("moneyTotal=%s,mjExTotal=%s" % (moneyTotal, mjExTotal), playerID)
     
-    PlayerControl.GiveMoney(curPlayer, moneyType, moneyTotal, "DecomposeMainEquip", isSysHint=False)
+    PlayerControl.GiveMoney(curPlayer, moneyType, moneyTotal, isSysHint=False)
     PlayerLLMJ.AddExpDecompose(curPlayer, mjExTotal)
     PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_EquipDecompose, decomposeCnt)
     PlayerActivity.AddDailyTaskValue(curPlayer, ChConfig.DailyTask_EquipDecompose, decomposeCnt)
@@ -526,11 +534,10 @@
         syncItemIDList = GetBootyItemIDList()
     else:
         syncItemIDList = [itemID]
-    poolMgr = ObjPool.GetPoolMgr()
-    clientPack = poolMgr.acquire(ChPyNetSendPack.tagSCDropBootyInfo)
+    clientPack = ChPyNetSendPack.tagSCDropBootyInfo()
     clientPack.DropBootyList = []
     for itemID in syncItemIDList:
-        dropBooty = poolMgr.acquire(ChPyNetSendPack.tagSCDropBooty)
+        dropBooty = ChPyNetSendPack.tagSCDropBooty()
         dropBooty.ItemID = itemID
         dropBooty.TodayDropCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BootyDropToday % itemID)
         clientPack.DropBootyList.append(dropBooty)

--
Gitblit v1.8.0