From 243014fab9b9a3c590454e1bfc6605b4c5dbb6e8 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 30 十二月 2025 15:19:32 +0800
Subject: [PATCH] 16 卡牌服务端(Hero命令增加支持清除未生效卡牌;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Hero.py |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Hero.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Hero.py
index a11242a..e1aefba 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Hero.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Hero.py
@@ -45,6 +45,7 @@
         GameWorld.DebugAnswer(curPlayer, "重置宿缘: Hero sy 0")
         GameWorld.DebugAnswer(curPlayer, "设置宿缘: Hero sy 宿缘ID 等级 [是否激活]")
         GameWorld.DebugAnswer(curPlayer, "清空武将: ClearPack 35")
+        GameWorld.DebugAnswer(curPlayer, "清未生效: Hero clear [是否包含生效卡]")
         GameWorld.DebugAnswer(curPlayer, "新增武将: MakeItemCount 英雄ID [个数]")
         GameWorld.DebugAnswer(curPlayer, "阵容上阵: Hero f 阵容ID [武将ID ...]")
         GameWorld.DebugAnswer(curPlayer, "阵容武将: Hero h 阵容ID 武将ID 等级 星级 突破等级 觉醒等级 皮肤")
@@ -128,6 +129,19 @@
         PlayerHero.ActiveHeroSkin(curPlayer, heroID, skinIndex, isActive)
         return
     
+    if value == "clear":
+        isAll = value2
+        backPack = curPlayer.GetItemManager().GetPack(ShareDefine.rptHero)
+        for i in range(backPack.GetCount()):
+            curItem = backPack.GetAt(i)
+            if not curItem or curItem.IsEmpty():
+                continue
+            if not isAll:
+                if curItem.GetUserAttr(ShareDefine.Def_IudetHeroCardEffective):
+                    continue
+            curItem.Clear()
+        return
+        
     # 宿缘
     if value == "sy":
         syncIDList = []

--
Gitblit v1.8.0