From 5ea28aead9761406845a3bff4d663f53e800fdb6 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 19 三月 2019 19:14:53 +0800
Subject: [PATCH] 6332 【后端】【2.0】主要是拍品相关规则调整及背包优化(去除旧版设置绑定逻辑)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipPartStar.py | 46 ++++++++++++++++++++++++++++++++++++++++------
1 files changed, 40 insertions(+), 6 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipPartStar.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipPartStar.py
index 3a69ff9..80f1486 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipPartStar.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipPartStar.py
@@ -20,6 +20,8 @@
import ChEquip
import GameWorld
import IpyGameDataPY
+import ChConfig
+import IPY_GameWorld
#---------------------------------------------------------------------
#逻辑实现
## GM命令执行入口
@@ -31,26 +33,58 @@
if not cmdList:
__GMHelpAnswer(curPlayer)
return
-
+ if len(cmdList) == 1:
+ starLV = cmdList[0]
+ equipMaxClasslv = IpyGameDataPY.GetFuncCfg('EquipMaxClasslv')
+ for equipPlace in ChConfig.Pack_EquipPart_CanPlusStar.get(IPY_GameWorld.rptEquip, []):
+ for classlv in xrange(1, equipMaxClasslv+1):
+ ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classlv, equipPlace)
+ if not ipyData:
+ continue
+ equipPackIndex = ipyData.GetGridIndex()
+ ChEquip.SetEquipPartStar(curPlayer, equipPackIndex, starLV)
+ ChEquip.NotifyEquipPartStar(curPlayer)
+ ChEquip.RefreshPlayerEquipAttribute(curPlayer)
+ playControl = PlayerControl.PlayerControl(curPlayer)
+ playControl.RefreshPlayerAttrState()
+ GameWorld.DebugAnswer(curPlayer, "设置所有部位星数为: %s" % (starLV))
+ elif len(cmdList) == 2:
+ classLV, starLV = cmdList
+ for equipPlace in ChConfig.Pack_EquipPart_CanPlusStar.get(IPY_GameWorld.rptEquip, []):
+
+ ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
+ if not ipyData:
+ continue
+ equipPackIndex = ipyData.GetGridIndex()
+ ChEquip.SetEquipPartStar(curPlayer, equipPackIndex, starLV)
+ ChEquip.NotifyEquipPartStar(curPlayer)
+ ChEquip.RefreshPlayerEquipAttribute(curPlayer, classLV)
+ playControl = PlayerControl.PlayerControl(curPlayer)
+ playControl.RefreshPlayerAttrState()
+ GameWorld.DebugAnswer(curPlayer, "设置%s阶所有部位星数为: %s" % (classLV, starLV))
+
if len(cmdList) != 3:
return
- classlv, equipPlace, starLV = cmdList
- ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classlv, equipPlace)
+ classLV, equipPlace, starLV = cmdList
+ ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
if not ipyData:
__GMHelpAnswer(curPlayer)
return
equipPackIndex = ipyData.GetGridIndex()
ChEquip.SetEquipPartStar(curPlayer, equipPackIndex, starLV)
ChEquip.NotifyEquipPartStar(curPlayer, equipPackIndex)
- ChEquip.RefreshPlayerEquipAttribute(curPlayer, classlv)
+ ChEquip.RefreshPlayerEquipAttribute(curPlayer, classLV)
playControl = PlayerControl.PlayerControl(curPlayer)
playControl.RefreshPlayerAttrState()
+ GameWorld.DebugAnswer(curPlayer, "设置%s阶%s部位星数为: %s" % (classLV, equipPlace, starLV))
return
-def __GMHelpAnswer(curPlayer, errorMsg="参数列表 [classlv, equipPlace, starLV]"):
+def __GMHelpAnswer(curPlayer, errorMsg=""):
if errorMsg:
GameWorld.DebugAnswer(curPlayer, "%s" % errorMsg)
-
+ GameWorld.DebugAnswer(curPlayer, "SetEquipPartStar 星数")
+ GameWorld.DebugAnswer(curPlayer, "SetEquipPartStar 阶级 星数")
+ GameWorld.DebugAnswer(curPlayer, "SetEquipPartStar 阶级 部位 星数")
return
--
Gitblit v1.8.0