From 21509f0ef53ab0ecfdb5b81066d1a577fd44e1e7 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 09 一月 2026 21:07:25 +0800
Subject: [PATCH] 225 【付费内容】功能基金-服务端(增加基金类型7 - 主线关卡基金plus;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py | 64 ++++++++++++++++++++++++--------
1 files changed, 48 insertions(+), 16 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 fc4121a..5487c94 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
@@ -20,13 +20,13 @@
import TurnAttack
import ShareDefine
import IpyGameDataPY
+import PlayerSuccess
import PlayerControl
import PlayerActivity
import ChPyNetSendPack
import ItemControler
import IPY_GameWorld
import NetPackCommon
-import PlayerBeauty
import PlayerArena
import PlayerLLMJ
import ItemCommon
@@ -34,7 +34,6 @@
import NPCCommon
import BattleObj
import ChEquip
-import ObjPool
import random
@@ -128,12 +127,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 +222,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
@@ -255,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
@@ -276,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 or not lastSureOutNeed:
+ lastColorEquipLucky = 0
if not itemColor:
continue
equipIDList = NPCCommon.__GetEquipIDList(0, color=itemColor, placeList=ChConfig.Def_MainEquipPlaces, findType="MainEquipDrop")
@@ -291,6 +302,8 @@
#GameWorld.DebugLog("掉落装备: randEquipID=%s,%s" % (randEquipID, curItem.GetGUID()), playerID)
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)
@@ -368,7 +381,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 +394,8 @@
__doEquipMainEquip(curPlayer, itemIndexList, opValue)
elif opType == 1:
__doDecomposeMainEquip(curPlayer, itemIndexList)
+ elif opType == 3: # 结算未掉落物品
+ __doMainDrop(curPlayer, [])
else:
__doPickupMainItem(curPlayer, itemIndexList)
@@ -433,6 +448,7 @@
ChEquip.RefreshRoleEquipAttr(curPlayer)
PlayerTask.UpdTaskValue(curPlayer, ChConfig.TaskType_EquipColor)
+ PlayerSuccess.UpdateEquipSuccess(curPlayer)
return
def __doDecomposeMainEquip(curPlayer, itemIndexList):
@@ -442,6 +458,21 @@
if not moneyType or not moneyBase:
return
+ # 砍树类主线装备独立流向规则:暂时只记录分解,按祝福树对应品质列表记录
+ treeLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreeLV)
+ ipyData = IpyGameDataPY.GetIpyGameData("TreeLV", treeLV)
+ needRecordColorMin = 0
+ if ipyData:
+ lastColorCnt = IpyGameDataPY.GetFuncCfg("ItemRecordEquip", 1) # 有产出的最后几个品质需要记录
+ equipColorRateList = ipyData.GetEquipColorRateList()
+ lastColor = len(equipColorRateList)
+ for colorRate in equipColorRateList[::-1]:
+ if colorRate:
+ break
+ lastColor -= 1
+ needRecordColorMin = lastColor - lastColorCnt + 1
+ #GameWorld.DebugLogEx("treeLV=%s,rateLen=%s,lastColor=%s,needRecordColorMin=%s", treeLV, len(equipColorRateList), lastColor, needRecordColorMin, playerID)
+
decomposeMoney = moneyBase
mjExPer, exRemain = PlayerLLMJ.GetAddDecomposePer(curPlayer)
mjEx = int(decomposeMoney * mjExPer / 100.0)
@@ -473,7 +504,8 @@
GameWorld.DebugLog(" itemIndex=%s,decomposeMoney=%s,mjEx=%s,exRemain=%s,总:%s"
% (itemIndex, decomposeMoney, mjEx, exRemain, moneyTotal), playerID)
- ItemCommon.DelItem(curPlayer, curEquip, curEquip.GetCount(), True, ChConfig.ItemDel_EquipDecompose)
+ isForceDR = curEquip.GetItemColor() >= needRecordColorMin # 记录分解流向
+ ItemCommon.DelItem(curPlayer, curEquip, curEquip.GetCount(), True, ChConfig.ItemDel_EquipDecompose, isForceDR=isForceDR)
decomposeCnt += 1
if not moneyTotal:
@@ -482,10 +514,11 @@
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)
+ PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_OSAEquipDecompose, decomposeCnt)
return
def __doPickupMainItem(curPlayer, itemIndexList):
@@ -523,11 +556,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