hch
2019-05-17 9a739f5ef7dc235d8effd1b46ebe9bf747ab8e36
Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode
2个文件已修改
31 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRefineStove.py 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3882,7 +3882,7 @@
Def_PDict_AlchemyLearnState = "AlchemyLearnState%s" #丹方是否已学习 
Def_PDict_AlchemyItemID = "AlchemyItemID_%s" #炼丹中的丹药ID  参数丹药类型
Def_PDict_AlchemyStartTime = "AlchemyStartTime_%s" #炼丹开始时间    参数丹药ID
Def_PDict_AlchemyCommonCnt = "AlchemyCommonCnt" #普通丹药炼丹次数
Def_PDict_AlchemyCnt = "AlchemyCnt%s" #丹药炼丹次数
Def_PDict_AlchemyPrayCnt = "AlchemyPrayCnt" #炼丹祈福次数
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRefineStove.py
@@ -154,17 +154,23 @@
        if passTime < alchemyIpyData.GetNeedTime():
            GameWorld.DebugLog('开炉丹药,时间未到  passTime=%s' % passTime)
            return
        alchemyCommonCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AlchemyCommonCnt)
        alchemyQuality = alchemyIpyData.GetAlchemyQuality()
        appointInfo = [] #定制配置 [数量,成功率]
        alchemyCustomizedDict = IpyGameDataPY.GetFuncEvalCfg('alchemyCustomized', 1, {})
        if alchemyID in alchemyCustomizedDict:
            alchemyCnt = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_AlchemyCnt, alchemyID, False)
            alchemyCntDict = alchemyCustomizedDict[alchemyID]
            if alchemyCnt + 1 in alchemyCntDict:
                appointInfo = alchemyCntDict[alchemyCnt + 1]
        #成功率
        if alchemType == DefStoveType2:
        if appointInfo:
            successRate = appointInfo[1]
        elif alchemType == DefStoveType2:
            successRate = ShareDefine.Def_MaxRateValue  #仙丹必定成功
        elif alchemType == DefStoveType1:
            #灵丹成功率公式 参数 curLuckValue:慧根  alchemyLV:炼丹等级 alchemyQuality:丹药等级  qualityNeedLuck:要求慧根
            alchemyCustomizedDict = IpyGameDataPY.GetFuncEvalCfg('alchemyCustomized', 1, {})
            if alchemyCommonCnt + 1 in alchemyCustomizedDict:
                successRate = alchemyCustomizedDict[alchemyCommonCnt + 1][1]
            else:
                qualityNeedLuck = IpyGameDataPY.GetFuncEvalCfg('alchemySuccess', 2, {}).get(str(alchemyQuality), 0)
                successRate = eval(IpyGameDataPY.GetFuncCompileCfg('alchemySuccess'))
        else:
@@ -180,8 +186,8 @@
            if alchemType == DefStoveType2:
                resultCnt = 1 #仙丹必定为1
            elif alchemType == DefStoveType1:
                if alchemyCommonCnt + 1 in alchemyCustomizedDict:
                    resultCnt = alchemyCustomizedDict[alchemyCommonCnt + 1][0]
                if appointInfo:
                    resultCnt = appointInfo[0]
                else:
                    ipyData = IpyGameDataPY.InterpolationSearch('AlchemyResult', 'LuckValue', curLuckValue, {'AlchemyQuality':alchemyIpyData.GetAlchemyQuality()})
                    if not ipyData:
@@ -212,11 +218,10 @@
        addExp = alchemyIpyData.GetAlchemyExp()
        AddRefineExp(curPlayer, addExp, alchemyLV)
        #加次数
        if alchemType == DefStoveType1:
            maxCnt = max(alchemyCustomizedDict)
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AlchemyCommonCnt, min(alchemyCommonCnt + 1, maxCnt))
        if alchemyID in alchemyCustomizedDict:
            GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_AlchemyCnt, alchemyID, min(alchemyCnt + 1, 9), False)
        
        GameWorld.DebugLog('炼丹结果 alchemyItemID=%s,successRate=%s,isSuccess=%s,resultCnt=%s' % (alchemyItemID, successRate, isSuccess, resultCnt), playerID)
        GameWorld.DebugLog('炼丹结果 alchemyItemID=%s,successRate=%s,isSuccess=%s,resultCnt=%s,appointInfo=%s' % (alchemyItemID, successRate, isSuccess, resultCnt, appointInfo), playerID)
    
        Sycn_AlchemyMsg(curPlayer, alchemyID, False, alchemyItemID, resultCnt)