hxp
2022-08-24 4a97f4b54a9bdf9c881d95c531f14b769b1a33b8
9696 【后端】【越南】【主干】境界炼体功能
4个文件已修改
33 ■■■■ 已修改文件
PySysDB/PySysDBPY.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/LianTi.py 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLianTi.py 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/PySysDBPY.h
@@ -83,6 +83,7 @@
    WORD        NeedEatCount;    //升级所需个数(非累计)
    WORD        EatPerCount;    //每次培养消耗x个
    list        LVUpCostItemInfo;    //突破等级道具ID|个数
    DWORD        ActivateSkillID;    //激活技能ID
};
//神兵表 #tagGodWeapon
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/LianTi.py
@@ -19,6 +19,8 @@
import GameWorld
import PlayerControl
import PlayerLianTi
import IpyGameDataPY
import SkillCommon
#---------------------------------------------------------------------
#逻辑实现
@@ -49,6 +51,20 @@
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LianTiLV, lv)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LianTiEatItemCount, eatItemCount)
        
        skillIDList = []
        ipyDataMgr = IpyGameDataPY.IPY_Data()
        for index in xrange(ipyDataMgr.GetLianTiCount()):
            lvupIpyData = ipyDataMgr.GetLianTiByIndex(index)
            dataLV = lvupIpyData.GetLianTiLV()
            if dataLV > lv:
                break
            activateSkillID = lvupIpyData.GetActivateSkillID()
            if activateSkillID:
                skillIDList.append(activateSkillID)
        if skillIDList:
            SkillCommon.GivePlayerSkillByJobSkill(curPlayer, skillIDList)
    else:
        return
    
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -99,6 +99,7 @@
                        ("WORD", "NeedEatCount", 0),
                        ("WORD", "EatPerCount", 0),
                        ("list", "LVUpCostItemInfo", 0),
                        ("DWORD", "ActivateSkillID", 0),
                        ),
                "GodWeapon":(
@@ -2107,7 +2108,8 @@
        self.EatItemAttrValue = []
        self.NeedEatCount = 0
        self.EatPerCount = 0
        self.LVUpCostItemInfo = []
        self.LVUpCostItemInfo = []
        self.ActivateSkillID = 0
        return
        
    def GetLianTiLV(self): return self.LianTiLV # 炼体等级
@@ -2119,7 +2121,8 @@
    def GetEatItemAttrValue(self): return self.EatItemAttrValue # 每x个培养丹增加属性值,x=UpEatItemPerCount
    def GetNeedEatCount(self): return self.NeedEatCount # 升级所需个数(非累计)
    def GetEatPerCount(self): return self.EatPerCount # 每次培养消耗x个
    def GetLVUpCostItemInfo(self): return self.LVUpCostItemInfo # 突破等级道具ID|个数
    def GetLVUpCostItemInfo(self): return self.LVUpCostItemInfo # 突破等级道具ID|个数
    def GetActivateSkillID(self): return self.ActivateSkillID # 激活技能ID
# 神兵表
class IPY_GodWeapon():
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLianTi.py
@@ -23,6 +23,7 @@
import NetPackCommon
import ItemCommon
import ChConfig
import SkillCommon
def DoLianTiOpen(curPlayer):
    ## 功能开启
@@ -167,12 +168,16 @@
    ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, costItemCount, ChConfig.ItemDel_LianTi)
    
    updEatItemCount = curEatItemCount - needEatCount
    GameWorld.DebugLog("炼体突破: lianTiLV=%s,curEatItemCount=%s,needEatCount=%s,updEatItemCount=%s,nextLianTiLv=%s"
                       % (lianTiLV, curEatItemCount, needEatCount, updEatItemCount, nextLianTiLv))
    activateSkillID = nextIpyData.GetActivateSkillID()
    GameWorld.DebugLog("炼体突破: lianTiLV=%s,curEatItemCount=%s,needEatCount=%s,updEatItemCount=%s,nextLianTiLv=%s,activateSkillID=%s"
                       % (lianTiLV, curEatItemCount, needEatCount, updEatItemCount, nextLianTiLv, activateSkillID))
    
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LianTiLV, nextLianTiLv)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LianTiEatItemCount, updEatItemCount)
    
    if activateSkillID:
        SkillCommon.GivePlayerSkillByJobSkill(curPlayer, [activateSkillID])
    SyncLianTiInfo(curPlayer)
    RefreshLianTiAttr(curPlayer)
    return