From 9b1eca8955321ce7ba8a8151f7c5c169da5fbff6 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 06 八月 2025 15:25:29 +0800
Subject: [PATCH] 80 【常规】背包-服务端(去除使用物品多余验证;同步使用物品封包;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py |  124 ++++++-----------------------------------
 1 files changed, 18 insertions(+), 106 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
index 398dd1f..667a42c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChItem.py
@@ -42,7 +42,6 @@
 import ReadChConfig
 import OperControlManager
 import ShareDefine
-import PlayerAttrFruit
 import DataRecordPack
 import ChPyNetSendPack
 import NetPackCommon
@@ -110,7 +109,7 @@
 #===============================================================================
 def __Func_InitItem(tick):
     #初始化物品掉落保护
-    MapItemProtectTime = IpyGameDataPY.GetFuncCfg("MapItemProtectTime")
+    MapItemProtectTime = 120000 #IpyGameDataPY.GetFuncCfg("MapItemProtectTime")
     GameWorld.GetMapItemManager().SetProtectTime(MapItemProtectTime)
     
     #===============================================================================================
@@ -462,12 +461,12 @@
 def __DoLogic_PlayerUseItemSelf(curPlayer, useItemIndex, tick, useCnt=1, exData=0):
     
     #使用物品行为状态, 判断客户端限制
-    if not OperControlManager.IsObjCanDoAction(
-                                        curPlayer, 
-                                        ChConfig.Def_Obj_ActState_ClientAct, 
-                                        IPY_GameWorld.oalUseItem
-                                        ):
-        return False
+    #if not OperControlManager.IsObjCanDoAction(
+    #                                    curPlayer, 
+    #                                    ChConfig.Def_Obj_ActState_ClientAct, 
+    #                                    IPY_GameWorld.oalUseItem
+    #                                    ):
+    #    return False
 
     #------------------封包参数 获得 玩家物品
     backPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
@@ -648,15 +647,6 @@
         #这个物品不是一般物品, 直接返回结果
         return useSpecialItemResult
     
-    #---特殊装备不验证装备属性, 普通物品要验证装备属性---
-    itemControler = ItemControler.PlayerItemControler(curPlayer)
-    
-    #装备无法使用
-    if itemControler.PlayerCanEquipItem(curItem, False):
-        #这个物品是装备
-        PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_774045")
-        return
-    
     #物品类型ID
     itemTypeID = curItem.GetItemTypeID()
     
@@ -683,10 +673,6 @@
 #  @return None or True
 #  @remarks 函数详细说明.
 def __DealWith_SpecialItem(curPlayer, curItem, tick, useCnt, exData):
-    #果实物品
-    useFruitResult = PlayerAttrFruit.DoPlayerEatFruitItem(curPlayer, curItem, useCnt)
-    if useFruitResult != -1:
-        return useFruitResult
     
     #------------------------获得物品相关属性
     itemTypeID = curItem.GetItemTypeID()  #物品类型id
@@ -896,25 +882,25 @@
 #  @return 布尔值
 #  @remarks 检查使用物品的玩家属性.
 def CheckUseItemSelf_Player(curPlayer):
-    if GameObj.GetHP(curPlayer) <= 0 :
-        return False
+    #if GameObj.GetHP(curPlayer) <= 0 :
+    #    return False
     
 #    #眩晕时, 不可使用物品
 #    if curPlayer.GetAbnormalState() == IPY_GameWorld.sctFaint:
 #        return False
     
     #使用物品行为状态, 判断服务端限制
-    if not OperControlManager.IsObjCanDoAction(
-                                        curPlayer, 
-                                        ChConfig.Def_Obj_ActState_ServerAct, 
-                                        IPY_GameWorld.oalUseItem
-                                        ):
-        return False
+    #if not OperControlManager.IsObjCanDoAction(
+    #                                    curPlayer, 
+    #                                    ChConfig.Def_Obj_ActState_ServerAct, 
+    #                                    IPY_GameWorld.oalUseItem
+    #                                    ):
+    #    return False
     
     #交易状态, 不可使用物品
-    if curPlayer.GetPlayerAction() == IPY_GameWorld.paTrade:
-        PlayerControl.NotifyCode(curPlayer, "GeRen_lhs_372238")
-        return False
+    #if curPlayer.GetPlayerAction() == IPY_GameWorld.paTrade:
+    #    PlayerControl.NotifyCode(curPlayer, "GeRen_lhs_372238")
+    #    return False
     
 #    #GM禁止使用
 #    if GameWorld.IsGM(curPlayer):
@@ -1743,80 +1729,6 @@
         infoDict[ShareDefine.Def_MapItemInfo_IsSuite] = 1
            
     return infoDict
-
-# 特别设定:卓越物品必带武器技能增强效果,使用者请特别注意
-## 装备动态属性,只用于未设置属性的singleItem,roleItem使用多次发背包刷新包
-#  @param curItem 玩家实例
-#  @param equipData
-#  @return 
-def EquipAddAdditionEx(curItem, equipData):
-    # 绑定
-    #if equipData.isBind:
-    #    ItemControler.SetItemIsBind(curItem, equipData.isBind)
-    
-    if not ItemCommon.CheckItemIsEquip(curItem):
-        return
-        
-    #===========================================================================
-    # # 强化等级
-    # if equipData.starLV:
-    #    curItem.SetItemStarLV(equipData.starLV)
-    # # 打孔
-    # if 0 < equipData.holeCnt <= curItem.GetMaxHoleCount():
-    #    curItem.SetCanPlaceStoneCount(equipData.holeCnt)
-    #    
-    # # 给镶嵌宝石
-    # for i, stoneID in enumerate(equipData.stoneData):
-    #    if i > equipData.holeCnt - 1:
-    #        break
-    #    
-    #    if stoneID <= 0:
-    #        continue
-    #    
-    #    curItem.SetStone(i, stoneID)
-    #===========================================================================
-           
-    # 套装
-    #if equipData.isSuite:
-    #    curItem.SetIsSuite(equipData.isSuite)
-    #if equipData.suiteLV:
-    #    curItem.SetUserAttr(ShareDefine.Def_IudetSuiteLV, equipData.suiteLV)
-    # 物品来源
-    if equipData.source:
-        curItem.SetUserAttr(ShareDefine.Def_IudetSource, equipData.source)
-    
-    # 传奇属性
-    if equipData.legendAttrIDList and equipData.legendAttrValueList:
-        curItem.ClearUserAttr(ShareDefine.Def_IudetLegendAttrID)
-        curItem.ClearUserAttr(ShareDefine.Def_IudetLegendAttrValue)
-        for i in xrange(len(equipData.legendAttrIDList)):
-            curItem.AddUserAttr(ShareDefine.Def_IudetLegendAttrID, equipData.legendAttrIDList[i])
-            curItem.AddUserAttr(ShareDefine.Def_IudetLegendAttrValue, equipData.legendAttrValueList[i])
-    # 传奇属性 - 神
-    if equipData.legendAttrIDListShen and equipData.legendAttrValueListShen:
-        curItem.ClearUserAttr(ShareDefine.Def_IudetLegendAttrIDShen)
-        curItem.ClearUserAttr(ShareDefine.Def_IudetLegendAttrValueShen)
-        for i in xrange(len(equipData.legendAttrIDListShen)):
-            curItem.AddUserAttr(ShareDefine.Def_IudetLegendAttrIDShen, equipData.legendAttrIDListShen[i])
-            curItem.AddUserAttr(ShareDefine.Def_IudetLegendAttrValueShen, equipData.legendAttrValueListShen[i])
-    # 传奇属性 - 仙
-    if equipData.legendAttrIDListXian and equipData.legendAttrValueListXian:
-        curItem.ClearUserAttr(ShareDefine.Def_IudetLegendAttrIDXian)
-        curItem.ClearUserAttr(ShareDefine.Def_IudetLegendAttrValueXian)
-        for i in xrange(len(equipData.legendAttrIDListXian)):
-            curItem.AddUserAttr(ShareDefine.Def_IudetLegendAttrIDXian, equipData.legendAttrIDListXian[i])
-            curItem.AddUserAttr(ShareDefine.Def_IudetLegendAttrValueXian, equipData.legendAttrValueListXian[i])
-    # 传奇属性 - 极
-    if equipData.legendAttrIDListJi and equipData.legendAttrValueListJi:
-        curItem.ClearUserAttr(ShareDefine.Def_IudetLegendAttrIDJi)
-        curItem.ClearUserAttr(ShareDefine.Def_IudetLegendAttrValueJi)
-        for i in xrange(len(equipData.legendAttrIDListJi)):
-            curItem.AddUserAttr(ShareDefine.Def_IudetLegendAttrIDJi, equipData.legendAttrIDListJi[i])
-            curItem.AddUserAttr(ShareDefine.Def_IudetLegendAttrValueJi, equipData.legendAttrValueListJi[i])
-            
-    ItemCommon.MakeEquipGS(curItem) 
-    return
-
 
 ## 判断装备是否是可加强装备
 #  @param curItem 物品实例

--
Gitblit v1.8.0