From 3861b284c63fd8ba519c71e386a8f49dcad26dab Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 24 十一月 2025 11:35:15 +0800
Subject: [PATCH] 332 【主界面】座骑系统-服务端(按阶解锁的改为手动解锁)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py | 48 ++++++++++++++++++++++++++----------------------
1 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
index c7316af..b4c3dcd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
@@ -308,21 +308,25 @@
ipyData = IpyGameDataPY.GetIpyGameData("HorseSkin", horseSkinID)
if not ipyData:
return
- if ipyData.GetUnlockWay() != 2:
- GameWorld.DebugLog("非道具激活的不用添加: horseSkinID=%s" % (horseSkinID), playerID)
- return
if not isFree:
- itemID = ipyData.GetUnlockValue()
- itemCount = ipyData.GetUnlockNeedCnt()
- if not itemID or not itemCount:
- return
- needItemList = [[itemID, itemCount]]
- itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
- lackItemDict, delInfoDict = ItemCommon.GetCostItemIndexList(needItemList, itemPack)
- if lackItemDict:
- GameWorld.DebugLog("激活所需物品不足! horseSkinID=%s,lackItemDict=%s" % (horseSkinID, lackItemDict), playerID)
- return
- ItemCommon.DelCostItem(curPlayer, itemPack, delInfoDict, "AddHorseSkin")
+ unlockWay = ipyData.GetUnlockWay()
+ if unlockWay == 1:
+ classLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorseClassLV)
+ if classLV < ipyData.GetUnlockValue():
+ GameWorld.DebugLog("坐骑阶级不足无法解锁! classLV=%s < %s" % (classLV, ipyData.GetUnlockValue()), playerID)
+ return
+ elif unlockWay == 2:
+ itemID = ipyData.GetUnlockValue()
+ itemCount = ipyData.GetUnlockNeedCnt()
+ if not itemID or not itemCount:
+ return
+ needItemList = [[itemID, itemCount]]
+ itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
+ lackItemDict, delInfoDict = ItemCommon.GetCostItemIndexList(needItemList, itemPack)
+ if lackItemDict:
+ GameWorld.DebugLog("激活所需物品不足! horseSkinID=%s,lackItemDict=%s" % (horseSkinID, lackItemDict), playerID)
+ return
+ ItemCommon.DelCostItem(curPlayer, itemPack, delInfoDict, "AddHorseSkin")
ipyExpireSeconds = ipyData.GetExpireMinutes() * 60
@@ -402,14 +406,14 @@
if state:
return True
- if not ipyData:
- ipyData = IpyGameDataPY.GetIpyGameData("HorseSkin", horseSkinID)
- if ipyData:
- unlockWay = ipyData.GetUnlockWay()
- if unlockWay == 1:
- classLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorseClassLV)
- if classLV >= ipyData.GetUnlockValue():
- return True
+# if not ipyData:
+# ipyData = IpyGameDataPY.GetIpyGameData("HorseSkin", horseSkinID)
+# if ipyData:
+# unlockWay = ipyData.GetUnlockWay()
+# if unlockWay == 1:
+# classLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorseClassLV)
+# if classLV >= ipyData.GetUnlockValue():
+# return True
return False
--
Gitblit v1.8.0