8883 【BT2】【后端】坐骑升级属性修改(改为每培养X颗培养丹对应提升属性,X=每次培养消耗数)
3个文件已修改
36 ■■■■ 已修改文件
PySysDB/PySysDBPY.h 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h
@@ -407,6 +407,9 @@
    WORD        NeedEatCount;    //升级所需个数(非累计)
    list        LVAttrType;    //每级额外属性类型(非累积)
    list        LVAttrValue;    //每级额外属性值(非累积)
    list        UpItemAttrType;    //每x个培养丹增加属性类型,x=UpEatItemPerCount
    list        UpItemAttrValue;    //每x个培养丹增加属性值,x=UpEatItemPerCount
    DWORD        UpEatItemPerCount;    //每次培养消耗x个
};
//坐骑培养表
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -338,6 +338,9 @@
                        ("WORD", "NeedEatCount", 0),
                        ("list", "LVAttrType", 0),
                        ("list", "LVAttrValue", 0),
                        ("list", "UpItemAttrType", 0),
                        ("list", "UpItemAttrValue", 0),
                        ("DWORD", "UpEatItemPerCount", 0),
                        ),
                "HorseTrain":(
@@ -2778,6 +2781,9 @@
        self.NeedEatCount = 0
        self.LVAttrType = []
        self.LVAttrValue = []
        self.UpItemAttrType = []
        self.UpItemAttrValue = []
        self.UpEatItemPerCount = 0
        return
        
    def GetHorseLV(self): return self.HorseLV # 坐骑等级
@@ -2785,6 +2791,9 @@
    def GetNeedEatCount(self): return self.NeedEatCount # 升级所需个数(非累计)
    def GetLVAttrType(self): return self.LVAttrType # 每级额外属性类型(非累积)
    def GetLVAttrValue(self): return self.LVAttrValue # 每级额外属性值(非累积)
    def GetUpItemAttrType(self): return self.UpItemAttrType # 每x个培养丹增加属性类型,x=UpEatItemPerCount
    def GetUpItemAttrValue(self): return self.UpItemAttrValue # 每x个培养丹增加属性值,x=UpEatItemPerCount
    def GetUpEatItemPerCount(self): return self.UpEatItemPerCount # 每次培养消耗x个
# 坐骑培养表
class IPY_HorseTrain():
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
@@ -409,7 +409,7 @@
    horseSpeed = 0 # 坐骑功能增加的速度值,骑乘时才有效果
    horseLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorserLV)
    # 等阶培养属性
    totalItemCount = 0
    #totalItemCount = 0
    ipyDataMgr = IpyGameDataPY.IPY_Data()
    for index in xrange(ipyDataMgr.GetHorseLVUpCount()):
        horseIpyData = ipyDataMgr.GetHorseLVUpByIndex(index)
@@ -417,9 +417,9 @@
        if dataHorseLV > horseLV:
            break
        elif dataHorseLV == horseLV:
            totalItemCount += curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorserEatItemCount)
            upItemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorserEatItemCount)
        else:
            totalItemCount += horseIpyData.GetNeedEatCount()
            upItemCount = horseIpyData.GetNeedEatCount()
                
        # 等阶额外属性
        lvAttrTypeList = horseIpyData.GetLVAttrType()
@@ -431,10 +431,20 @@
                continue
            PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrList)
            
    # 等阶培养丹累加个数属性
    eatItemAttrInfo = IpyGameDataPY.GetFuncCfg("HorseUpItem", 3)
    for attrID, attrValue in eatItemAttrInfo:
        PlayerControl.CalcAttrDict_Type(attrID, attrValue * totalItemCount, allAttrList)
        # 培养丹增加属性
        upItemPerCount = horseIpyData.GetUpEatItemPerCount()
        if upItemCount and upItemPerCount:
            upItemAttrTypeList = horseIpyData.GetUpItemAttrType()
            upItemAttrValueList = horseIpyData.GetUpItemAttrValue()
            attrMultiple = upItemCount / upItemPerCount
            for i, attrID in enumerate(upItemAttrTypeList):
                attrValue = upItemAttrValueList[i]
                PlayerControl.CalcAttrDict_Type(attrID, attrValue * attrMultiple, allAttrList)
#    # 等阶培养丹累加个数属性
#    eatItemAttrInfo = IpyGameDataPY.GetFuncCfg("HorseUpItem", 3)
#    for attrID, attrValue in eatItemAttrInfo:
#        PlayerControl.CalcAttrDict_Type(attrID, attrValue * totalItemCount, allAttrList)
        
    # 幻化属性
    initFPAdd = 0 #初始战力