From 6c19b837d7dc70c458e73c31363f8f06121f8394 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 30 十一月 2020 18:31:03 +0800
Subject: [PATCH] 1111 SetMoney命令增加支持可显示对应货币值(相当于GetMoney);

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMoney.py |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMoney.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMoney.py
index 790f9ea..1746fd8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMoney.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMoney.py
@@ -30,12 +30,31 @@
 #  @return None
 #  @remarks 函数详细说明.
 def OnExec(curPlayer, List):
+    moneyNameDict = {
+                     1:"仙玉", 2:"绑玉", 3:"铜钱", 6:"战盟贡献度", 10:"战盟仓库积分", 13:"境界修行点", 14:"符印融合石", 15:"仙盟活跃令", 
+                     16:"助战积分", 18:"荣誉", 19:"Boss积分", 23:"符印精华", 24:"符印碎片", 25:"寻宝积分", 26:"集市额度", 27:"丹精", 28:"魂尘", 
+                     29:"聚魂碎片", 30:"核心环"
+                     }
+    
+    if len(List) == 1:
+        moneyType = List[0]
+        if moneyType == 0:
+            moneyList = moneyNameDict.keys()
+        else:
+            moneyList = [moneyType]
+        for moneyType in moneyList:
+            GameWorld.DebugAnswer(curPlayer, "(%s) %s: %s" % (moneyType, moneyNameDict.get(moneyType, moneyType), PlayerControl.GetMoney(curPlayer, moneyType)))
+        return
+    
     if len(List) != 2:
         #参数不正确
         GameWorld.DebugAnswer(curPlayer, Lang.GBText("参数不正确"))
-        GameWorld.DebugAnswer(curPlayer, "1-仙玉;2-绑玉;3-铜钱;6-战盟贡献度;10-战盟仓库积分;13-境界修行点;14-符印融合石;15-仙盟活跃令")
-        GameWorld.DebugAnswer(curPlayer, "16-助战积分;18-荣誉;23-符印精华;24-符印碎片;25-寻宝积分;26-集市额度;27-丹精;28-魂尘;")
-        GameWorld.DebugAnswer(curPlayer, "29-聚魂碎片;30-核心环")
+        GameWorld.DebugAnswer(curPlayer, "设置货币: SetMoney 货币类型 数值")
+        GameWorld.DebugAnswer(curPlayer, "显示货币: SetMoney 货币类型")
+        helpStr = ""
+        for moneyType, name in moneyNameDict.items():
+            helpStr += "%s-%s;" % (moneyType, name)
+        GameWorld.DebugAnswer(curPlayer, helpStr)
         return
     #钱币类型
     moneyType = List[0]
@@ -46,7 +65,7 @@
         GameWorld.DebugAnswer(curPlayer, Lang.GBText("参数不正确"))
         return
     #钱币类型范围
-    if moneyType not in [1,2,3,4] and moneyType not in ShareDefine.TYPE_Price_CurrencyDict:
+    if moneyType not in [1, 2, 3, 4] and moneyType not in ShareDefine.TYPE_Price_CurrencyDict:
         GameWorld.DebugAnswer(curPlayer, Lang.GBText("钱币类型不正确"))
         return
     #0文不处理

--
Gitblit v1.8.0