hxp
2019-04-19 e1a5919f949686314e159ceeee96c0d2c5899541
6459 【后端】【2.0】缥缈仙域开发单(修复采集物没有奖励报错)
1个文件已修改
7 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -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)
        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,6 +5739,8 @@
                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])