| | |
| | | return
|
| | | GameWorld.DebugLog(" colorRateList=%s,totalRate=%s" % (colorRateList, totalRate), playerID)
|
| | |
|
| | | cutCountAppointEquipDict = IpyGameDataPY.GetFuncEvalCfg("CutTree", 4)
|
| | | appointCutTreeCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AppointCutTreeCount)
|
| | | GameWorld.DebugLog(" appointCutTreeCount=%s" % (appointCutTreeCount), playerID)
|
| | | classLV, isSuit = 1, None # 默认1阶,不限制是否套装
|
| | | placeList = ChConfig.EquipPlace_Base + ChConfig.EquipPlace_Special
|
| | | jobList = [curPlayer.GetJob()]
|
| | |
| | | equipIDList = NPCCommon.__GetEquipIDList(0, classLV, itemColor, isSuit, placeList, jobList, findType="CutTree")
|
| | | if not equipIDList:
|
| | | continue
|
| | | randEquipID = random.choice(equipIDList)
|
| | | GameWorld.DebugLog(" 随机装备ID: %s, itemColor=%s,%s" % (randEquipID, itemColor, equipIDList), playerID)
|
| | | randEquipIDList.append(randEquipID)
|
| | | appointCutTreeCount += 1
|
| | | if appointCutTreeCount in cutCountAppointEquipDict:
|
| | | randEquipID, appointID = cutCountAppointEquipDict[appointCutTreeCount]
|
| | | GameWorld.DebugLog(" 定制装备ID: %s, appointID=%s,appointCutTreeCount=%s" % (randEquipID, appointID, appointCutTreeCount), playerID)
|
| | | else:
|
| | | appointID = 0
|
| | | randEquipID = random.choice(equipIDList)
|
| | | GameWorld.DebugLog(" 随机装备ID: %s, itemColor=%s,%s" % (randEquipID, itemColor, equipIDList), playerID)
|
| | | randEquipIDList.append([randEquipID, appointID])
|
| | |
|
| | | GameWorld.DebugLog(" 预产出装备: randEquipIDList=%s" % randEquipIDList, playerID)
|
| | |
|
| | | giveItemListEx = []
|
| | | giveEquipIDList = []
|
| | | for equipItemID in randEquipIDList:
|
| | | curItem = ItemControler.GetOutPutItemObj(equipItemID, 1, False, curPlayer=curPlayer)
|
| | | for equipItemID, appointID in randEquipIDList:
|
| | | setAttrDict = {}
|
| | | if appointID:
|
| | | setAttrDict[ShareDefine.Def_CItemKey_AppointID] = appointID
|
| | | curItem = ItemControler.GetOutPutItemObj(equipItemID, 1, False, curPlayer=curPlayer, setAttrDict=setAttrDict)
|
| | | if curItem == None:
|
| | | continue
|
| | | if not ItemControler.DoLogic_PutItemInPack(curPlayer, curItem, packIndexList=[IPY_GameWorld.rptIdentify]):
|
| | |
| | | PlayerControl.PlayerControl(curPlayer).AddExp(addExp)
|
| | |
|
| | | #GameWorld.DebugLog("OnAddCutTreeCnt: addCount=%s,addExp=%s" % (addCount, addExp), curPlayer.GetPlayerID())
|
| | | |
| | | cutCountAppointEquipDict = IpyGameDataPY.GetFuncEvalCfg("CutTree", 4)
|
| | | appointCountMax = max(cutCountAppointEquipDict) if cutCountAppointEquipDict else 0
|
| | | appointCutTreeCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AppointCutTreeCount)
|
| | | updAppointCutTreeCount = min(appointCutTreeCount + addCount, appointCountMax)
|
| | | if updAppointCutTreeCount != appointCutTreeCount:
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AppointCutTreeCount, updAppointCutTreeCount)
|
| | | GameWorld.DebugLog("更新定制砍树次数: updAppointCutTreeCount=%s" % (updAppointCutTreeCount), curPlayer.GetPlayerID())
|
| | | |
| | | PlayerPrestigeSys.AddRealmLVUpCutTreeCnt(curPlayer, addCount)
|
| | | PlayerTask.AddTaskValue(curPlayer, ChConfig.TaskType_CutTree, addCount)
|
| | | return
|