From 03fdb924f00ceb435105d23f1ef4be488cc03b0a Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 11 六月 2024 19:35:49 +0800 Subject: [PATCH] 8605 【主干】【港台】【越南】【砍树】【后端】集字活动boss掉字优化,支持单次掉落多种字; --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActCollectWords.py | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActCollectWords.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActCollectWords.py index 1dde262..7a78c10 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActCollectWords.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActCollectWords.py @@ -108,6 +108,18 @@ randList = __GetDropWordsItemRateList(curPlayer, curNPC, actInfo) if not randList: continue + + if isinstance(randList, dict): + for dropItemID, dropCountList in randList.items(): + itemCount = GameWorld.GetResultByRandomList(dropCountList) + if itemCount <= 0: + continue + GameWorld.DebugLog(" 集字活动掉落物品 dict! actNum=%s,npcID=%s,dropItemID=%s,itemCount=%s" % (actNum, curNPC.GetNPCID(), dropItemID, itemCount)) + + isAuctionItem = 0 # 非拍品 + ItemControler.GivePlayerItem(curPlayer, dropItemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem]) + continue + dropItemID = GameWorld.GetResultByRandomList(randList) if not dropItemID: continue @@ -174,6 +186,9 @@ if not dropRateList: continue + if not isinstance(dropRateList, list): + continue + preRate = 0 maxRate = dropRateList[-1][0] for rateInfo in dropRateList: -- Gitblit v1.8.0