6970 【2.0】【后端】缥缈仙域仙草园(修复2星灵草园采完后不结算的bug)
1个文件已修改
37 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossGrassland.py
@@ -243,21 +243,28 @@
        return
    
    # 采集次数是否已用完
    collNPCIpyDataList = IpyGameDataPY.GetIpyGameDataListNotLog("MapRefreshNPC", mapID)
    if not collNPCIpyDataList:
        return
    for collIpyData in collNPCIpyDataList:
        npcIDList = collIpyData.GetNPCIDList()
        for npcID in npcIDList:
            collectNPCIpyData = IpyGameDataPY.GetIpyGameData("CollectNPC", npcID)
            if not collectNPCIpyData:
                return
            limitMaxTime = collectNPCIpyData.GetMaxCollectCount()
            totalCollTime = NPCCommon.GetTodayCollectCount(curPlayer, npcID)
            if totalCollTime < limitMaxTime:
                GameWorld.DebugLog("草园NPC采集次数未用完! npcID=%s,totalCollTime=%s < limitMaxTime=%s" % (npcID, totalCollTime, limitMaxTime))
                return
    if mapID == PlayerControl.GetCustomMapID(curPlayer):
        refreshMapNPCDict = IpyGameDataPY.GetFuncEvalCfg("CrossGrasslandCfg", 2)
        npcCountDict = refreshMapNPCDict.get((mapID, lineID), {})
        npcIDList = npcCountDict.keys()
    else:
        collNPCIpyDataList = IpyGameDataPY.GetIpyGameDataListNotLog("MapRefreshNPC", mapID)
        if not collNPCIpyDataList:
            return
        npcIDList = []
        for collIpyData in collNPCIpyDataList:
            npcIDList += collIpyData.GetNPCIDList()
    for npcID in npcIDList:
        collectNPCIpyData = IpyGameDataPY.GetIpyGameData("CollectNPC", npcID)
        if not collectNPCIpyData:
            return
        limitMaxTime = collectNPCIpyData.GetMaxCollectCount()
        totalCollTime = NPCCommon.GetTodayCollectCount(curPlayer, npcID)
        if totalCollTime < limitMaxTime:
            GameWorld.DebugLog("草园NPC采集次数未用完! npcID=%s,totalCollTime=%s < limitMaxTime=%s" % (npcID, totalCollTime, limitMaxTime))
            return
            
    # 宝箱怪攻击次数是否已用完
    boxNPCID = IpyGameDataPY.GetFuncCfg("CrossGrasslandCfg", 1)