From fa10596d9f3abf523f8e900d7b920e4af8ea6bc5 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 07 三月 2019 14:45:41 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipPartPlusLV.py | 52 ++++++++++++++++++++++++++++++----------------------
1 files changed, 30 insertions(+), 22 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipPartPlusLV.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipPartPlusLV.py
index bde1d0f..f8f110c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipPartPlusLV.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipPartPlusLV.py
@@ -22,7 +22,7 @@
import ChEquip
import GameWorld
import ItemCommon
-
+import IpyGameDataPY
#---------------------------------------------------------------------
#逻辑实现
## GM命令执行入口
@@ -34,41 +34,49 @@
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
--
Gitblit v1.8.0