1111 【越南】【砍树】【英文】【tqxbqy】【btgotq】背包相关初始格子数改为读配置
6个文件已修改
92 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerExpandPackCfgMgr.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -910,50 +910,18 @@
#流向记录变更最小金币值(小于该值的暂不记录, 仅限金币)
Def_DRRecord_Min_Silver = 500000
Def_LargeTrade_Silver = 1000 * 1000
#初始化装备背包格子数
Def_PackCnt_Equip = 203
#主角交易栏最大格数
Def_PlayerTradeMaxItemCount = 20
#主角刚登陆游戏开启背包格子数
Def_PlayerFirstLoginOpenBackCnt = 60
#新手登陆开启的仓库格子数
Def_FirstLogin_OpenWareHouseCnt = 60
#登陆初始储物柜格子数
Def_PackCnt_Fashion = 1
#登陆初始武器时装格子数
Def_PackCnt_WeaponCoat = 8
#初始化寻宝背包格子数
Def_PackCnt_SeekTreasure = 0
#初始化阶级马匹背包格子数
Def_PackCnt_ClassHorses = 0
#初始化马匹装备格子数
Def_PackCnt_HorseEquip = 3
#初始化阶级马匹技能背包格子数
Def_PackCnt_HorseSkill = 0
#初始化官爵技能背包格子数
Def_PackCnt_OfficerSkill = 0
#寻宝背包格子数
Def_PackCnt_Treasure = 200
#初始化神兽背包格子数
Def_PackCnt_DogzItem = 100
#初始化神兽装备格子数
Def_PackCnt_DogzEquip = 150
#初始化垃圾分类格子数
Def_PackCnt_Garbage = 30
#初始化装备栏2
Def_PackCnt_Equip2 = 0
#初始化回收站
Def_PackCnt_Recycle = 6
#初始化临时交换背包格子数
Def_PackCnt_TempSwap = 1
#初始化临时存放背包格子数
Def_PackCnt_TempItem = 10
#初始化宠物背包格子数
Def_PackCnt_Pet = 70
#初始化通用宠物装备背包格子数
Def_PackCnt_PetEquip = 4
#主角刚登陆游戏开启精魄槽格子数/符文
Def_PlayerFirstLoginOpenFineSoulSlot = 0
#玩家脱离战斗状态时间(6秒)
Def_PlayerLeaveBattleTick = 3000
#玩家PK多杀间隔
@@ -4572,11 +4540,10 @@
#-------------------------------------------------------------------------------
#可以从07 41封包购买的背包类型,和对应字典{背包类型:[字典key, 默认格子数]}
#字典值列表枚举
#字典值列表枚举,废弃默认格子数枚举,改为读配置
[
Def_PlayerPackDict_Index_Key,      # 字典可以
Def_PlayerPackDict_Index_InitCnt,  # 默认格子数
] = range(0, 2)
] = range(0, 1)
Def_Type_CanBuyPack_PlayerDict = {
                                  #IPY_GameWorld.rptPetCabinetPet:[
@@ -4597,11 +4564,11 @@
                                      
                                  IPY_GameWorld.rptItem:[
                                       Def_Player_Dict_PackCount_Item, 
                                       Def_PlayerFirstLoginOpenBackCnt],
                                       0],
                                      
                                  IPY_GameWorld.rptWarehouse:[
                                       Def_Player_Dict_PackCount_Warehouse, 
                                       Def_FirstLogin_OpenWareHouseCnt],
                                       0],
                                      
                                  #IPY_GameWorld.rptFineSoulSlot:[
                                  #     Def_PDict_PackCount_FineSoul, 
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
@@ -861,11 +861,6 @@
    #按平台给首个称号
    #PlayerDienstgrad.GiveFirstLoginDienstgrad(curPlayer)
# 2012-04-12 玩家初始化时已给予格子
#    #---新手给仓库---
#    if ChConfig.Def_FirstLogin_OpenWareHouseCnt > 0:
#        ResetWarehouse(curPlayer, ChConfig.Def_FirstLogin_OpenWareHouseCnt, False)
    #玩家默认恶名值
    curPlayer.SetInfamyValue(ChConfig.Def_FirstLogin_InfamyValue)
    
@@ -3475,7 +3470,7 @@
    keyName = ChConfig.Def_Type_CanBuyPack_PlayerDict.get(packType)[ChConfig.Def_PlayerPackDict_Index_Key]
    
    #已经开启的背包格子数
    packCount = ChConfig.Def_PlayerFirstLoginOpenBackCnt + curPlayer.NomalDictGetProperty(keyName)
    packCount = ItemCommon.GetPackInitCount(packType) + curPlayer.NomalDictGetProperty(keyName)
    resetPackCnt = packCount + addPackCnt
    curPack = curPlayer.GetItemManager().GetPack(packType)
@@ -3507,8 +3502,7 @@
        return
    
    keyName = ChConfig.Def_Type_CanBuyPack_PlayerDict.get(packType)[ChConfig.Def_PlayerPackDict_Index_Key]
    count = ChConfig.Def_Type_CanBuyPack_PlayerDict.get(packType)[ChConfig.Def_PlayerPackDict_Index_InitCnt] + \
        curPlayer.NomalDictGetProperty(keyName) + addWarehouseCnt
    count = ItemCommon.GetPackInitCount(packType) + curPlayer.NomalDictGetProperty(keyName) + addWarehouseCnt
    curPack = curPlayer.GetItemManager().GetPack(packType)
        
@@ -4519,7 +4513,7 @@
    curGridCnt = curPlayer.NomalDictGetProperty(keyName)  
    
    #默认格子数
    initCnt = ChConfig.Def_Type_CanBuyPack_PlayerDict[packType][ChConfig.Def_PlayerPackDict_Index_InitCnt]
    initCnt = ItemCommon.GetPackInitCount(packType)
    
    curPack = curPlayer.GetItemManager().GetPack(packType)
    curPackMaxCnt = curPack.GetMaxCount()
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
@@ -774,6 +774,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 背包格子数
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -1576,15 +1576,15 @@
    
    #初始化神兽物品背包
    curPack = curPlayer.GetItemManager().GetPack(ShareDefine.rptDogzItem)
    curPack.SetCount(ChConfig.Def_PackCnt_DogzItem)
    curPack.SetCount(ItemCommon.GetPackInitCount(ShareDefine.rptDogzItem))
    curPack.Sync_PackCanUseCount()
    #初始化神兽装备背包
    curPack = curPlayer.GetItemManager().GetPack(ShareDefine.rptDogzEquip)
    curPack.SetCount(ChConfig.Def_PackCnt_DogzEquip)
    curPack.SetCount(ItemCommon.GetPackInitCount(ShareDefine.rptDogzEquip))
    curPack.Sync_PackCanUseCount()
    #初始化垃圾分类背包
    curPack = itemManager.GetPack(ShareDefine.rptGarbage)
    curPack.SetCount(ChConfig.Def_PackCnt_Garbage)
    curPack.SetCount(ItemCommon.GetPackInitCount(ShareDefine.rptGarbage))
    curPack.Sync_PackCanUseCount()
    
    #初始化临时交换背包
@@ -1597,7 +1597,7 @@
    #设置装备实际个数
    curPack = itemManager.GetPack(IPY_GameWorld.rptEquip)
    curPack.SetCount(ChConfig.Def_PackCnt_Equip)
    curPack.SetCount(ItemCommon.GetPackInitCount(IPY_GameWorld.rptEquip))
    
    #初始化垃圾桶
    #curPack = itemManager.GetPack(IPY_GameWorld.rptRecycle)
@@ -1609,7 +1609,7 @@
    #初始化宠物背包
    curPack = itemManager.GetPack(ShareDefine.rptPet)
    curPack.SetCount(ChConfig.Def_PackCnt_Pet)
    curPack.SetCount(ItemCommon.GetPackInitCount(ShareDefine.rptPet))
    #curPack.Sync_PackCanUseCount()
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -6147,7 +6147,7 @@
    
    #默认14格子 + 开启的
    keyName = ChConfig.Def_Type_CanBuyPack_PlayerDict.get(packType)[ChConfig.Def_PlayerPackDict_Index_Key]
    count = ChConfig.Def_PlayerFirstLoginOpenBackCnt + curPlayer.NomalDictGetProperty(keyName)
    count = ItemCommon.GetPackInitCount(packType) + curPlayer.NomalDictGetProperty(keyName)
    curPack.SetCount(count)
        
    #通知客户端背包格子数目
@@ -6173,7 +6173,7 @@
    
    #默认42格子 + 开启的
    keyName = ChConfig.Def_Type_CanBuyPack_PlayerDict.get(packType)[ChConfig.Def_PlayerPackDict_Index_Key]
    count = ChConfig.Def_FirstLogin_OpenWareHouseCnt + curPlayer.NomalDictGetProperty(keyName)
    count = ItemCommon.GetPackInitCount(packType) + curPlayer.NomalDictGetProperty(keyName)
    
    curPack.SetCount(count)
    
@@ -6189,7 +6189,7 @@
# @return None
def Init_TreasurePack(curPlayer):
    curPack = curPlayer.GetItemManager().GetPack(ShareDefine.rptTreasure)
    curPack.SetCount(ChConfig.Def_PackCnt_Treasure)
    curPack.SetCount(ItemCommon.GetPackInitCount(ShareDefine.rptTreasure))
    
    #通知客户端
    curPack.Sync_PackCanUseCount()
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerExpandPackCfgMgr.py
@@ -25,6 +25,7 @@
import GameWorld
import IPY_GameWorld
import PlayerControl
import ItemCommon
import ChConfig
import copy
@@ -185,12 +186,12 @@
    #@remarks 加载物品背包和仓库扩充格子时需要用的配置信息
    def Load(self, curPlayer):
        #默认物品背包格子数
        defItemPackCount = ChConfig.Def_PlayerFirstLoginOpenBackCnt
        defItemPackCount = ItemCommon.GetPackInitCount(IPY_GameWorld.rptItem)
        itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
        self.__expandPackCfgDict[IPY_GameWorld.rptItem] = ExpandPackCfg("ExpandItemPack", defItemPackCount, 
                                                                        itemPack.GetMaxCount())
        #默认仓库背包格子数
        defItemPackCount = ChConfig.Def_FirstLogin_OpenWareHouseCnt
        defItemPackCount = ItemCommon.GetPackInitCount(IPY_GameWorld.rptWarehouse)
        itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptWarehouse)
        self.__expandPackCfgDict[IPY_GameWorld.rptWarehouse] = ExpandPackCfg("ExpandWareHousePack", defItemPackCount, 
                                                                             itemPack.GetMaxCount())