fix:3028 【后端】免费寻宝增加多少次必出的保底库配置,和消耗仙玉的独立分开
5个文件已修改
37 ■■■■■ 已修改文件
PySysDB/PySysDBPY.h 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetXunbao.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h
@@ -1102,6 +1102,8 @@
    dict        GridItemInfo;    //格子编号对应物品信息 {"编号":[物品ID, 个数], ...}
    list        JobItemList;    //职业物品组列表 [[职业1物品, 职业2物品, ...], ...]
    list        GridItemRateListFree;    //免费产出格子编号饼图 [[概率, 格子编号], ...]
    list        FreeGridItemRateList2;    //免费每满x次保底产出格子编号饼图 [[概率, 格子编号], ...]
    dict        FreeGridItemRateList3;    //免费第x次必出产出格子编号饼图 {次数:[[概率, 格子编号], ...], ...}
    list        GridItemRateList1;    //常规产出格子编号饼图 [[概率, 格子编号], ...]
    list        GridItemRateList2;    //每满x次保底产出格子编号饼图 [[概率, 格子编号], ...]
    dict        GridItemRateList3;    //第x次必出产出格子编号饼图 {次数:[[概率, 格子编号], ...], ...}
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3349,7 +3349,7 @@
Def_PDict_TreasureStartCalcFreeCntTime = "TreasureFreeCntTime_%s"  # 寻宝 - 开始计算免费次数CD时间, 参数(寻宝编号)
Def_PDict_TreasureFreeTime = "TreasureFreeTime_%s_%s"  # 寻宝开始免费计时time值, 参数(寻宝类型, 寻宝索引)
Def_PDict_TreasureCount = "TreasureCount_%s"  # 寻宝次数, 参数(寻宝类型)
Def_PDict_TreasureCount = "TreasureCount_%s_%s"  # 寻宝次数, 参数(寻宝类型,是否免费)
Def_PDict_TreasureLuck = "TreasureLuck_%s"  # 寻宝当前幸运值, 参数(寻宝类型)
Def_Player_Dict_LastAutoOpenPackTick = "LastAutoOpenPackTick219_%s"   #上一次自动购买的tick<背包类型>
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetXunbao.py
@@ -46,7 +46,8 @@
            
        treasureTypeList = PlayerTreasure.GetTreasureTypeList()
        for treasureType in treasureTypeList:
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCount % (treasureType), 0)
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCount % (treasureType, 0), 0)
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCount % (treasureType, 1), 0)
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureLuck % (treasureType), 0)
            
            if not isFree:
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -879,6 +879,8 @@
                        ("dict", "GridItemInfo", 0),
                        ("list", "JobItemList", 0),
                        ("list", "GridItemRateListFree", 0),
                        ("list", "FreeGridItemRateList2", 0),
                        ("dict", "FreeGridItemRateList3", 0),
                        ("list", "GridItemRateList1", 0),
                        ("list", "GridItemRateList2", 0),
                        ("dict", "GridItemRateList3", 0),
@@ -2731,6 +2733,8 @@
        self.GridItemInfo = {}
        self.JobItemList = []
        self.GridItemRateListFree = []
        self.FreeGridItemRateList2 = []
        self.FreeGridItemRateList3 = {}
        self.GridItemRateList1 = []
        self.GridItemRateList2 = []
        self.GridItemRateList3 = {}
@@ -2742,6 +2746,8 @@
    def GetGridItemInfo(self): return self.GridItemInfo # 格子编号对应物品信息 {"编号":[物品ID, 个数], ...}
    def GetJobItemList(self): return self.JobItemList # 职业物品组列表 [[职业1物品, 职业2物品, ...], ...]
    def GetGridItemRateListFree(self): return self.GridItemRateListFree # 免费产出格子编号饼图 [[概率, 格子编号], ...]
    def GetFreeGridItemRateList2(self): return self.FreeGridItemRateList2 # 免费每满x次保底产出格子编号饼图 [[概率, 格子编号], ...]
    def GetFreeGridItemRateList3(self): return self.FreeGridItemRateList3 # 免费第x次必出产出格子编号饼图 {次数:[[概率, 格子编号], ...], ...}
    def GetGridItemRateList1(self): return self.GridItemRateList1 # 常规产出格子编号饼图 [[概率, 格子编号], ...]
    def GetGridItemRateList2(self): return self.GridItemRateList2 # 每满x次保底产出格子编号饼图 [[概率, 格子编号], ...]
    def GetGridItemRateList3(self): return self.GridItemRateList3 # 第x次必出产出格子编号饼图 {次数:[[概率, 格子编号], ...], ...}
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
@@ -70,7 +70,7 @@
    treasureType = clientData.TreasureType
    treasureIndex = clientData.TreasureIndex
    costType = clientData.CostType
    isFreeType = 1 if costType == 1 else 0
    GameWorld.DebugLog("玩家寻宝: treasureType=%s,treasureIndex=%s,costType=%s,playerLV=%s" 
                       % (treasureType, treasureIndex, costType, playerLV), playerID)
    
@@ -159,19 +159,19 @@
    
    commItemRateList = GetUpdLuckyItemRateList(ipyData, curLuck, luckFormula, costType) # 常规产出物品格子饼图,幸运物品概率已变更
    
    curTreasureCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureCount % (treasureType)) # 当前已寻宝次数
    curTreasureCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TreasureCount % (treasureType, isFreeType)) # 当前已寻宝次数
    updTreasureCount = curTreasureCount + treasureCount
    beSureCountDict = ipyData.GetGridItemRateList3() # 第x次必出产出格子编号饼图
    beSureCountDict = ipyData.GetFreeGridItemRateList3() if isFreeType else ipyData.GetGridItemRateList3() # 第x次必出产出格子编号饼图
    GameWorld.DebugLog("已经寻宝次数=%s,当前幸运=%s,commItemRateList=%s" % (curTreasureCount, curLuck, commItemRateList), playerID)
    
    addScore = IpyGameDataPY.GetFuncEvalCfg(TreasureSet1, 5)[treasureIndex] # 增加积分
    ensureCount = IpyGameDataPY.GetFuncCfg("TreasureSet", 1) # 每多少次触发保底产出库
    ensureCount = IpyGameDataPY.GetFuncEvalCfg("TreasureSet", 1, {})[isFreeType] # 每多少次触发保底产出库
    ensureRateList = ipyData.GetFreeGridItemRateList2() if isFreeType else ipyData.GetGridItemRateList2()
    goodGridNumList = [ipyData.GetLuckyGridNum()] # 好物品格子编号 (幸运物品 + 必出 + 保底)
    for gridRateList in ipyData.GetGridItemRateList3().values():
    for gridRateList in beSureCountDict.values():
        for gridRateInfo in gridRateList:
            goodGridNumList.append(gridRateInfo[1])
    for gridRateInfo in ipyData.GetGridItemRateList2():
    for gridRateInfo in ensureRateList:
        goodGridNumList.append(gridRateInfo[1])
    GameWorld.DebugLog("goodGridNumList=%s" % goodGridNumList, playerID)
        
@@ -192,7 +192,7 @@
                gridNum = GameWorld.GetResultByRandomList(gridNumRateList)
                GameWorld.DebugLog("到达次数必出,updTreasureCount=%s,gridNumRateList=%s,gridNum=%s" % (updTreasureCount, gridNumRateList, gridNum), playerID)
            elif updTreasureCount % ensureCount == 0:
                gridNumRateList = ipyData.GetGridItemRateList2()
                gridNumRateList = ensureRateList
                gridNum = GameWorld.GetResultByRandomList(gridNumRateList)
                GameWorld.DebugLog("满次数保底出,updTreasureCount=%s,gridNumRateList=%s,gridNum=%s" % (updTreasureCount, gridNumRateList, gridNum), playerID)
            else:
@@ -216,11 +216,11 @@
        # 3. 次数保底
        ensureGridNumList = []
        if updTreasureCount / ensureCount > curTreasureCount / ensureCount:
            for gridInfo in ipyData.GetGridItemRateList2():
            for gridInfo in ensureRateList:
                ensureGridNumList.append(gridInfo[1])
            gridNum = GameWorld.GetResultByRandomList(ipyData.GetGridItemRateList2())
            gridNum = GameWorld.GetResultByRandomList(ensureRateList)
            getGridResult.append(gridNum)
            GameWorld.DebugLog("满次数保底出,updTreasureCount=%s,gridNumRateList=%s,gridNum=%s" % (updTreasureCount, ipyData.GetGridItemRateList2(), gridNum), playerID)
            GameWorld.DebugLog("满次数保底出,updTreasureCount=%s,gridNumRateList=%s,gridNum=%s" % (updTreasureCount, ensureRateList, gridNum), playerID)
            
        # 4. 常规产出
        doCount = 200
@@ -319,7 +319,7 @@
        GameWorld.DebugLog("扣除仙玉,costGold=%s" % costGold, playerID)
        
    # 加数据
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCount % (treasureType), updTreasureCount)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCount % (treasureType, isFreeType), updTreasureCount)
    if ipyData.GetLuckyGridNum() in getGridResult:
        updLuck = 0
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureLuck % (treasureType), updLuck)