From 1c39d19d2b49465cf8bd8bdea831f9adb012411c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 25 十一月 2024 14:55:01 +0800
Subject: [PATCH] 1111 【越南】【砍树】【英文】【tqxbqy】【btgotq】背包相关初始格子数改为读配置

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 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 8ec8d15..4518299 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
@@ -1011,6 +1011,24 @@
             
     return -1
 
+def GetPackInitCount(packType):
+    ## 获取背包类型对应初始格子数
+    if packType == IPY_GameWorld.rptItem:
+        initCount = IpyGameDataPY.GetFuncCfg("InitBagCellCount", 1)
+    elif packType == IPY_GameWorld.rptWarehouse:
+        initCount = IpyGameDataPY.GetFuncCfg("InitDepotCellCount", 1)
+    elif packType == ShareDefine.rptTreasure:
+        initCount = IpyGameDataPY.GetFuncCfg("TreasureSet", 3)
+    elif packType == ShareDefine.rptDogzItem:
+        initCount = IpyGameDataPY.GetFuncCfg("DogzPack", 1)
+    elif packType == ShareDefine.rptDogzEquip:
+        initCount = IpyGameDataPY.GetFuncCfg("DogzPack", 2)
+    else:
+        bagInitCntDict = IpyGameDataPY.GetFuncEvalCfg("InitBagCellCount", 2, {})
+        initCount = bagInitCntDict.get(str(packType), 0)
+    GameWorld.DebugLog("背包类型初始格子数: packType=%s,initCount=%s" % (packType, initCount))
+    return initCount
+
 ## 获得虚拟背包格子数
 #  @param packindex 背包索引
 #  @return 背包格子数

--
Gitblit v1.8.0