From a4a3ebb0073a8b866eb3df553f4c05cb0aa0e753 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 11 十二月 2025 14:43:26 +0800
Subject: [PATCH] 297 【常规】坊市系统-服务端(修复坊市购买配置多物品报错bug;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py | 26 ++++++++++++++++++++------
1 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
index f4d4cca..eb6b490 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
@@ -58,6 +58,7 @@
PyGameData.EquipItemSkillIDList = []
PyGameData.DailyUseCountLimitItemIDList = []
PyGameData.AutoTransformCountItemIDList = []
+ PyGameData.MoneyItemIDDict = {}
gameData = GameWorld.GetGameData()
for i in range(0, gameData.GetItemCount()):
@@ -74,6 +75,11 @@
PyGameData.g_stoneLevelIDDict[(stoneEffType, stoneLevel)] = itemID
elif curEffID == ChConfig.Def_Effect_ItemCount:
PyGameData.AutoTransformCountItemIDList.append(itemID)
+ elif curEffID == ChConfig.Def_Effect_ItemGiveMoney:
+ moneyValue = itemEff.GetEffectValue(0)
+ moneyType = itemEff.GetEffectValue(1)
+ if moneyValue == 1 and moneyType:
+ PyGameData.MoneyItemIDDict[moneyType] = itemID
if GetIsEquip(findItemData):
for skillIndex in xrange(findItemData.GetAddSkillCount()):
@@ -91,9 +97,17 @@
if PyGameData.AutoTransformCountItemIDList:
GameWorld.Log("自动转化为物品个数的物品ID列表: %s" % PyGameData.AutoTransformCountItemIDList)
-
+ GameWorld.Log("货币类型1个数量对应物品ID: %s" % PyGameData.MoneyItemIDDict)
+
PyGameData.InitPyItem = True
return
+
+def GetMoneyItemID(moneyType):
+ ## 获取货币类型对应的物品ID
+ if moneyType not in PyGameData.MoneyItemIDDict:
+ GameWorld.ErrLog("没有该货币类型对应的物品ID! moneyType=%s" % moneyType)
+ return 0
+ return PyGameData.MoneyItemIDDict[moneyType]
## 物品触发技能增加buff
# @param curPlayer 当前玩家
@@ -347,11 +361,11 @@
return
curSingleItem.SetRemainHour(outTimeServerDay)
- if isAuctionItem:
- if IpyGameDataPY.GetIpyGameDataNotLog("AuctionItem", itemID):
- ItemControler.SetIsAuctionItem(curSingleItem, isAuctionItem)
- else:
- GameWorld.DebugLog("拍卖物品表不存在该ID!创建拍品失败,默认转为非拍品!itemID=%s" % itemID)
+ #if isAuctionItem:
+ # if IpyGameDataPY.GetIpyGameDataNotLog("AuctionItem", itemID):
+ # ItemControler.SetIsAuctionItem(curSingleItem, isAuctionItem)
+ # else:
+ # GameWorld.DebugLog("拍卖物品表不存在该ID!创建拍品失败,默认转为非拍品!itemID=%s" % itemID)
ItemControler.SetItemCount(curSingleItem, itemCount)
--
Gitblit v1.8.0