| | |
| | | import ChEquip
|
| | | import GameWorld
|
| | | import ItemCommon
|
| | |
|
| | | import IpyGameDataPY
|
| | | #---------------------------------------------------------------------
|
| | | #逻辑实现
|
| | | ## GM命令执行入口
|
| | |
| | | if not cmdList:
|
| | | __GMHelpAnswer(curPlayer)
|
| | | return
|
| | | |
| | | if len(cmdList) == 1:
|
| | | setStarLV = cmdList[0]
|
| | | for pType, indexList in ChConfig.Pack_EquipPart_CanPlusStar.items():
|
| | | for i in indexList:
|
| | | curPack = curPlayer.GetItemManager().GetPack(pType)
|
| | | curEquip = curPack.GetAt(i)
|
| | | ChEquip.SetEquipPartPlusLV(curPlayer, pType, i, curEquip, setStarLV)
|
| | | ChEquip.SetEquipPartProficiency(curPlayer, pType, i, 0)
|
| | | Operate_EquipPlus.DoLogic_OnEquipPartStarLVChange(curPlayer, pType)
|
| | | packType = IPY_GameWorld.rptEquip
|
| | | curPack = curPlayer.GetItemManager().GetPack(packType)
|
| | | if len(cmdList) == 2:
|
| | | setStarLV = cmdList[1]
|
| | | classLV = cmdList[0]
|
| | | for equipPlace in ChConfig.Pack_EquipPart_CanPlusStar.get(packType, []):
|
| | | ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
|
| | | if not ipyData:
|
| | | continue
|
| | | gridIndex = ipyData.GetGridIndex()
|
| | | curEquip = curPack.GetAt(gridIndex)
|
| | | ChEquip.SetEquipPartPlusLV(curPlayer, packType, gridIndex, curEquip, setStarLV)
|
| | | ChEquip.SetEquipPartProficiency(curPlayer, packType, gridIndex, 0)
|
| | | ChEquip.SetEquipPartPlusEvolveLV(curPlayer, packType, gridIndex, 0)
|
| | | Operate_EquipPlus.DoLogic_OnEquipPartStarLVChange(curPlayer, packType, classLV)
|
| | | ChEquip.NotifyEquipPartPlusLV(curPlayer)
|
| | | GameWorld.DebugAnswer(curPlayer, "设置所有部位强化等级为: %s" % setStarLV)
|
| | | GameWorld.DebugAnswer(curPlayer, "设置%s阶所有部位强化等级为: %s" % (classLV, setStarLV))
|
| | | return
|
| | |
|
| | | if len(cmdList) != 3:
|
| | | __GMHelpAnswer(curPlayer, "参数错误!")
|
| | | return
|
| | |
|
| | | packType, index, starLV = cmdList
|
| | | classLV, equipPlace, starLV = cmdList
|
| | | if packType not in ChConfig.Pack_EquipPart_CanPlusStar:
|
| | | __GMHelpAnswer(curPlayer, "packType不存在!")
|
| | | return
|
| | |
|
| | | if index not in ChConfig.Pack_EquipPart_CanPlusStar[packType]:
|
| | | if equipPlace not in ChConfig.Pack_EquipPart_CanPlusStar[packType]:
|
| | | __GMHelpAnswer(curPlayer, "index索引不存在!")
|
| | | return
|
| | | |
| | | curPack = curPlayer.GetItemManager().GetPack(packType)
|
| | | curEquip = curPack.GetAt(index)
|
| | |
|
| | | maxStarLV = ItemCommon.GetItemMaxPlusLV(curEquip)
|
| | | ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
|
| | | if not ipyData:
|
| | | return
|
| | | gridIndex = ipyData.GetGridIndex()
|
| | | curEquip = curPack.GetAt(gridIndex)
|
| | | if not ItemCommon.CheckItemCanUse(curEquip):
|
| | | return
|
| | | maxStarLV = ItemCommon.GetItemMaxPlusLV(curPlayer, gridIndex, curEquip)
|
| | | starLV = min(starLV, maxStarLV)
|
| | | ChEquip.SetEquipPartPlusLV(curPlayer, packType, index, curEquip, starLV)
|
| | | ChEquip.SetEquipPartProficiency(curPlayer, packType, index, 0)
|
| | | Operate_EquipPlus.DoLogic_OnEquipPartStarLVChange(curPlayer, packType)
|
| | | ChEquip.SetEquipPartPlusLV(curPlayer, packType, gridIndex, curEquip, starLV)
|
| | | ChEquip.SetEquipPartProficiency(curPlayer, packType, gridIndex, 0)
|
| | | Operate_EquipPlus.DoLogic_OnEquipPartStarLVChange(curPlayer, packType, classLV)
|
| | | return
|
| | |
|
| | |
|