From ffa8a645ed6a92a3c723bbf5c7f1eb4d5425c826 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 17 十一月 2021 15:15:34 +0800
Subject: [PATCH] 9341 【BT5】【主干】【后端】情缘系统(优化情缘系统)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
index 8221f83..ddcfb1c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
@@ -531,7 +531,7 @@
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_DelPackIndex, int(itemIndexs))
     return
 
-def PayAutoBuyItem(curPlayer, lackItemDict, priceType, costType=ChConfig.Def_Cost_Unknown, infoDict={}):
+def PayAutoBuyItem(curPlayer, lackItemDict, priceType, costType=ChConfig.Def_Cost_Unknown, infoDict={}, isCheck=False):
     ''' 支付自动购买物品消耗,从商城中购买,直接扣钱,不产生物品
             一般用于基础商店自动购买物品,不考虑复杂的限购逻辑
     '''
@@ -570,6 +570,9 @@
     if totalMoney <= 0:
         return
     
+    if isCheck:
+        return PlayerControl.HaveMoney(curPlayer, priceType, totalMoney)
+    
     GameWorld.DebugLog("扣除自动购买消耗: lackItemDict=%s,priceType=%s,totalMoney=%s,costType=%s,addLimitCountInfo=%s" 
                        % (lackItemDict, priceType, totalMoney, costType, addLimitCountInfo), curPlayer.GetPlayerID())
     

--
Gitblit v1.8.0