From 50086ccb3ade4bdc47b32af7e097ec9e2c2d3f88 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 25 八月 2025 18:35:04 +0800
Subject: [PATCH] 1111 删除不需要内容;
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_MainLevel.py | 22 ++++++++++++++++------
1 files changed, 16 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 6cb2c29..65f15e2 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
@@ -91,7 +91,8 @@
def __doMainDrop(curPlayer):
# 装备掉落
- __doDropEquip(curPlayer)
+ if __doDropEquip(curPlayer) == -1:
+ return
playerID = curPlayer.GetPlayerID()
DailyBootyUpperList = []
@@ -102,10 +103,16 @@
GameWorld.DebugLog("可掉落战利品上限: chapterID=%s, %s" % (chapterID, DailyBootyUpperList), playerID)
+ # 战利品掉落默认不堆叠,故最多只能掉落剩余空格子个数的物品
+ spaceCount = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptIdentify)
+
# 其他战利品掉落
bootyDropNeedDict = IpyGameDataPY.GetFuncEvalCfg("MainBootyDrop", 1, {})
bootyDropCntDict = IpyGameDataPY.GetFuncEvalCfg("MainBootyDrop", 2, {})
for itemID, dropUpper in DailyBootyUpperList:
+ if spaceCount <= 0:
+ GameWorld.DebugLog("掉落背包已满!", playerID)
+ break
if dropUpper <= 0:
continue
todyDropCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BootyDropToday % itemID)
@@ -137,7 +144,8 @@
if dropCntTotal <= 0:
continue
- GameWorld.DebugLog("掉落战利品! itemID=%s,unXiantaoCntBooty=%s,次数=%s,dropCntTotal=%s" % (itemID, unXiantaoCntBooty, dropBootyCnt, dropCntTotal), playerID)
+ GameWorld.DebugLog("掉落战利品! itemID=%s,unXiantaoCntBooty=%s,次数=%s,dropCntTotal=%s,spaceCount=%s"
+ % (itemID, unXiantaoCntBooty, dropBootyCnt, dropCntTotal, spaceCount), playerID)
curItem = ItemControler.GetOutPutItemObj(itemID, dropCntTotal, False, curPlayer=curPlayer)
if curItem == None:
continue
@@ -147,23 +155,24 @@
unXiantaoCntBooty = unXiantaoCntBooty % dropOneNeed
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_UnXiantaoCntBooty % itemID, unXiantaoCntBooty)
SetBootyDropToday(curPlayer, itemID, todyDropCnt + dropCntTotal)
+ spaceCount -= 1
return
def __doDropEquip(curPlayer):
## 主线掉落装备
+ playerID = curPlayer.GetPlayerID()
unXiantaoCntEquip = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_UnXiantaoCntEquip)
dropOneNeed = IpyGameDataPY.GetFuncCfg("MainEquipDrop", 1) # 每消耗X个战锤掉落一件装备
dropEquipCnt = unXiantaoCntEquip / dropOneNeed
if dropEquipCnt <= 0:
- GameWorld.DebugLog("主线暂不能掉落! unXiantaoCntEquip=%s,dropOneNeed=%s,dropEquipCnt=%s" % (unXiantaoCntEquip, dropOneNeed, dropEquipCnt))
+ GameWorld.DebugLog("主线暂不能掉落! unXiantaoCntEquip=%s,dropOneNeed=%s,dropEquipCnt=%s" % (unXiantaoCntEquip, dropOneNeed, dropEquipCnt), playerID)
return
dropEquipCnt = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptIdentify, dropEquipCnt)
if not dropEquipCnt:
- GameWorld.DebugLog("掉落鉴定背包没有空间!")
- return
+ GameWorld.DebugLog("掉落背包已满!", playerID)
+ return -1
- playerID = curPlayer.GetPlayerID()
treeLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreeLV)
ipyData = IpyGameDataPY.GetIpyGameData("TreeLV", treeLV)
if not ipyData:
@@ -251,6 +260,7 @@
else:
__doPickupMainItem(curPlayer, itemIndexList)
+ ItemCommon.SyncMakeItemAnswer(curPlayer, ShareDefine.Def_mitMainDropItemOP, ChConfig.Def_ComposeState_Sucess, opType)
return
def __doEquipMainEquip(curPlayer, itemIndexList, isAutoDecompose):
--
Gitblit v1.8.0