hxp
2018-08-15 fe16164142cd10c52c1007de0885118680210d6e
Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode
1个文件已修改
25 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerMagicWeapon.py
@@ -207,8 +207,8 @@
            activeCnt += 1
    return activeCnt
def GetMWIDByPotentialsSkillID(skillID):
    #通过潜力技能ID获取对应的法宝ID
def GetPotentialsNextSkillID(skillID):
    #通过潜力技能ID获取对应的下一个技能ID
    global g_potentialsSkillDict
    if not g_potentialsSkillDict:
        g_potentialsSkillDict = {}
@@ -217,8 +217,9 @@
            ipyData = ipyDataMgr.GetTreasureByIndex(i)
            mwID = ipyData.GetID()
            skillIDList = ipyData.GetPotentials()
            for curSkillID in skillIDList:
                g_potentialsSkillDict[curSkillID] = mwID
            for i, curSkillID in enumerate(skillIDList):
                nextSkillID = skillIDList[i+1] if i+1 < len(skillIDList) else 0
                g_potentialsSkillDict[curSkillID] = nextSkillID
    return g_potentialsSkillDict.get(skillID, 0)
## 给技能
@@ -364,10 +365,11 @@
                if newSkill:
                    skillManager.LVUPSkillByID(newSkillID)
                    GameWorld.DebugLog('    法宝技能升级 skillTypeID=%s, upSkillLv=%s, 触发学习技能%s' % (skillTypeID, upSkillLv, newSkillID))
                    curControl.RefreshSkillFightPowerEx(newSkillID, beforeFightPower)
                    curControl.RefreshSkillFightPowerEx(newSkillID, 0)
                    PassiveBuffEffMng.GetPassiveEffManager().RegistPassiveEff(curPlayer, newSkillID)
                    if SkillCommon.isPassiveAttr(newSkill):
                        newSkillIsPassive = True
                    PlayerControl.WorldNotify(0, 'SkillPotential2', [curPlayer.GetName(), skillTypeID, upSkillLv, newSkillID])
            
    
    if SkillCommon.isPassiveAttr(upSkill) or newSkillIsPassive:
@@ -376,9 +378,16 @@
    curControl.RefreshSkillFightPowerEx(upSkill.GetSkillID(), beforeFightPower)
    PassiveBuffEffMng.GetPassiveEffManager().RegistPassiveEff(curPlayer, upSkill.GetSkillID())
    
    #通知技能已升级成功 GeRen_admin_31379
    #<n color="255,255,0" BKCOLOR="0,0,0">恭喜您将</n><n color="0,190,255" BKCOLOR="0,0,0"><Info Type="Skill" Name="Name" ID="{%S1%}"/></n><n color="255,255,0" BKCOLOR="0,0,0">升至</n><n color="0,190,255" BKCOLOR="0,0,0">{%S2%}</n><n color="255,255,0" BKCOLOR="0,0,0">级!</n>
    #PlayerControl.NotifyCode(curPlayer, "GeRen_admin_31379", [skillTypeID, upSkillLv])
    #通知技能已升级成功
    nextSkillID = GetPotentialsNextSkillID(skillTypeID)
    if nextSkillID:
        nextSkill = GameWorld.GetGameData().FindSkillByType(nextSkillID, 1)
        if nextSkill and nextSkill.GetLearnSkillReq() == skillTypeID and upSkillLv == nextSkill.GetLearnSkillLV():
            PlayerControl.WorldNotify(0, 'SkillPotential1', [curPlayer.GetName(), skillTypeID, upSkillLv, nextSkillID])
    maxLV = upSkill.GetSkillMaxLV()
    if upSkillLv == maxLV:
        PlayerControl.WorldNotify(0, 'SkillPotential3', [curPlayer.GetName(), skillTypeID, maxLV])
    
    #获得技能等级
    #curSkillLV = curSkill.GetSkillLV()