From c4aca599df505175262e8ebad288c60551aef8e8 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 10 二月 2025 11:18:36 +0800
Subject: [PATCH] 1111 【英文】【越南】【BT】【砍树】修复改名成功后扣除道具时物品可能已变更导致的bug;

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
index 718f9f7..cdc47a3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
@@ -176,6 +176,18 @@
         
     return None
 
+def FindPlayerItemByType(curPlayer, packindex, itemType):
+    curPack = curPlayer.GetItemManager().GetPack(packindex)
+    for i in range(0, curPack.GetCount()):
+        item = curPack.GetAt(i)
+        
+        if not ItemCommon.CheckItemCanUse(item):
+            continue
+        
+        if item.GetType() == itemType:
+            return item
+        
+    return None
 
 ## 检查是否可以换马匹
 #  @param curPlayer 当前玩家

--
Gitblit v1.8.0