From e4c7eb72844c7a3ee3b131a3a99fcea49a13f65e Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 13 十二月 2021 16:51:25 +0800
Subject: [PATCH] 9363 【BT5】【后端】新增魔化之地(增加特殊灵宠可配置不同升阶道具支持)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py
index e2e289a..c4534d3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py
@@ -627,7 +627,16 @@
curItemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
itemIndexList = []
- costItemIDList = IpyGameDataPY.GetFuncEvalCfg('PetUpItem')
+ costItemIDList = []
+ specCostItemInfo = IpyGameDataPY.GetFuncEvalCfg('PetUpItem', 4)
+ for strItemID, petNPCIDList in specCostItemInfo.items():
+ if petNPCID in petNPCIDList:
+ costItemIDList = [int(strItemID)]
+ break
+ if not costItemIDList:
+ costItemIDList = IpyGameDataPY.GetFuncEvalCfg('PetUpItem')
+ if not costItemIDList:
+ return
#扣材料
nowCnt = 0
@@ -647,7 +656,7 @@
itemCnt = curItem.GetCount()
nowCnt += itemCnt
if not hasEnough and not isAutoBuy:
- GameWorld.DebugLog("PetClassUp 升阶道具不足。。。")
+ GameWorld.DebugLog("PetClassUp 升阶道具不足! petNPCID=%s,costItemIDList=%s" % (petNPCID, costItemIDList))
return
autoBuyItemID = costItemIDList[0]
--
Gitblit v1.8.0