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 | 7 +------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 16 ++++++++++++++++
2 files changed, 17 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 7fbb889..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)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index b7fb12e..61490aa 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -53,6 +53,7 @@
import PlayerActivity
import ChNetSendPack
import PlayerState
+import PlayerBeauty
import PlayerOnline
import PlayerTask
import PlayerMail
@@ -2812,6 +2813,7 @@
for itemID, upperCnt in DailyBootyUpperList:
if upperCnt <= 0:
continue
+ upperCnt = GetBootyUpper(curPlayer, itemID, upperCnt)
if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BootyDropToday % itemID) >= upperCnt:
continue
unXiantaoCntBooty = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_UnXiantaoCntBooty % itemID)
@@ -2857,6 +2859,20 @@
DataRecordPack.DR_UseMoney(curPlayer, eventName, type_Price, price, infoDict) # 流向
return
+def GetBootyUpper(curPlayer, itemID, baseUpper):
+ ## 战利品掉落上限
+ dropUpper = baseUpper
+ addPer = 0
+ addPer += PlayerBeauty.GetBeautyEffInfo(curPlayer, PlayerBeauty.EffType_BootyPer)[0] # 战利品上限提高百分比
+
+ # 其他功能增加上限,可扩展
+
+ if addPer:
+ dropUpper = int(baseUpper * (100 + addPer) / 100.0)
+ GameWorld.DebugLogEx("提高战利品掉落上限: itemID=%s,baseUpper=%s,addPer=%s,dropUpper=%s", itemID, baseUpper, addPer, dropUpper)
+
+ return dropUpper
+
## 付款以后后续操作(金子)
# @param curPlayer 玩家实例
# @param price ,货币价格
--
Gitblit v1.8.0