From 7a9b3e80b46932c9610b1143da43aff39753eabc Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 31 十二月 2025 13:54:21 +0800
Subject: [PATCH] 358 【内政】红颜系统-服务端(修复红颜增加战利品掉落上限无效bug;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 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 9330e8d..69775c1 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
@@ -128,12 +128,7 @@
break
if baseUpper <= 0:
continue
- dropUpper = baseUpper
- addPer = 0
- addPer += PlayerBeauty.GetBeautyEffInfo(curPlayer, PlayerBeauty.EffType_BootyPer)[0] # 战利品上限提高百分比
- if addPer:
- dropUpper = int(baseUpper * (100 + addPer) / 100.0)
- GameWorld.DebugLog("红颜提高战利品掉落上限: itemID=%s,baseUpper=%s,addPer=%s,dropUpper=%s" % (itemID, baseUpper, addPer, dropUpper))
+ dropUpper = PlayerControl.GetBootyUpper(curPlayer, itemID, baseUpper)
todyDropCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BootyDropToday % itemID)
if todyDropCnt >= dropUpper:
GameWorld.DebugLog("战利品已达今日掉落上限! itemID=%s,todyDropCnt=%s >= %s" % (itemID, todyDropCnt, dropUpper), playerID)
@@ -228,6 +223,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
@@ -368,7 +370,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):
@@ -381,6 +383,8 @@
__doEquipMainEquip(curPlayer, itemIndexList, opValue)
elif opType == 1:
__doDecomposeMainEquip(curPlayer, itemIndexList)
+ elif opType == 3: # 结算未掉落物品
+ __doMainDrop(curPlayer, [])
else:
__doPickupMainItem(curPlayer, itemIndexList)
--
Gitblit v1.8.0