From e1a5919f949686314e159ceeee96c0d2c5899541 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 19 四月 2019 19:50:40 +0800
Subject: [PATCH] 6459 【后端】【2.0】缥缈仙域开发单(修复采集物没有奖励报错)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index 8296afa..486179a 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -5690,7 +5690,7 @@
updCollTime = curCollTime + collectCnt
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CollNpcIDCollTime % npcID, updCollTime)
SyncCollNPCTime(curPlayer, [npcID])
- GameWorld.DebugLog(" 增加采集次数: npcID=%s,todayCollTime=%s,curCollTime=%s,updCollTime=%s" % (npcID, todayCollTime, curCollTime, updCollTime))
+ GameWorld.DebugLog(" 增加采集次数: npcID=%s,todayCollTime=%s,curCollTime=%s,updCollTime=%s" % (npcID, todayCollTime, curCollTime, updCollTime))
isMaxTime = todayCollTime + collectCnt >= limitMaxTime
awardItemList = []
@@ -5701,7 +5701,7 @@
if collTotalTime in collectAppointAwardCfg:
awardItemList.append(collectAppointAwardCfg[collTotalTime])
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CollNpcIDCollTimeTotal % npcID, collTotalTime)
- #GameWorld.DebugLog("采集次数定制奖励: collTotalTime=%s,awardItemList=%s" % (collTotalTime, awardItemList))
+ GameWorld.DebugLog(" 采集次数定制奖励: collTotalTime=%s,awardItemList=%s" % (collTotalTime, awardItemList))
if not awardItemList:
alchemyDiffLV = collectNPCIpyData.GetAlchemyDiffLV()
@@ -5719,9 +5719,12 @@
else:
giveItemWeightList = collectAwardCfg
+ GameWorld.DebugLog(" 常规采集物品权重列表: alchemyDiffLV=%s,collectAwardCfg=%s,giveItemWeightList=%s" % (alchemyDiffLV, collectAwardCfg, giveItemWeightList))
giveItemInfo = GameWorld.GetResultByWeightList(giveItemWeightList)
- awardItemList.append(giveItemInfo)
-
+ if giveItemInfo:
+ awardItemList.append(giveItemInfo)
+
+ GameWorld.DebugLog(" 最终采集奖励: awardItemList=%s" % awardItemList)
if awardItemList:
for itemID, itemCount, isAuctionItem in awardItemList:
ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem])
@@ -5736,7 +5739,9 @@
awardPack.AwardItemList.append(awardItem)
awardPack.Count = len(awardPack.AwardItemList)
NetPackCommon.SendFakePack(curPlayer, awardPack)
-
+ else:
+ GameWorld.ErrLog("采集物品没有奖励!npcID=%s" % (npcID))
+
#采集成就
PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_Collect, collectCnt, [npcID])
#SyncCollectionItemInfo(curPlayer, addExp, addMoney, addZhenQi, giveItemInfoList, npcID)
--
Gitblit v1.8.0