From d6641e24bb33be9a0aad206dc12701f1ff5fcbb5 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 16 十月 2019 15:19:01 +0800
Subject: [PATCH] 8262 【主干】【后端】仙盟宴会及传功优化(答题改为立即给每题奖励,只要在宴会地图即可获得奖励) 去除boss首杀记录查询CD

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetEquipPartStar.py |   49 +++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 41 insertions(+), 8 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 b44de0e..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
@@ -14,13 +14,14 @@
 # 详细描述: 设置装备部位公共星数
 #
 #---------------------------------------------------------------------
-import IpyGameDataPY
 """Version = 2019-3-2 17:00"""
 #---------------------------------------------------------------------
 import PlayerControl
 import ChEquip
 import GameWorld
-
+import IpyGameDataPY
+import ChConfig
+import IPY_GameWorld
 #---------------------------------------------------------------------
 #逻辑实现
 ## GM命令执行入口
@@ -32,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