From cb9519432b4e8bee01d2d5f1fc7f82efae3c9210 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 13 一月 2020 16:18:40 +0800
Subject: [PATCH] 8369 境界修改(升级境界可学习技能或增加灵根点)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py |   38 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
index 0e36460..a6cdc18 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
@@ -188,6 +188,44 @@
 
     return
 
+def GivePlayerSkillByJobSkillList(curPlayer, jobSkillList):
+    ## 根据职业技能ID列表给玩家技能
+    
+    if not jobSkillList:
+        return
+    
+    skillLV = 1
+    giveSkill = None
+    for skillID in jobSkillList:
+        skillData = GameWorld.GetGameData().FindSkillByType(skillID, skillLV)
+        if skillData == None:
+            continue
+        if not CheckSkillJob(curPlayer, skillData):
+            continue
+        if not SkillShell.CheckLearnSkillCondition(curPlayer, skillData):
+            continue
+        giveSkill = skillData
+        break
+    
+    if not giveSkill:
+        GameWorld.ErrLog("找不到可以给的技能!jobSkillList=%s" % str(jobSkillList))
+        return
+    
+    skillTypeID = giveSkill.GetSkillTypeID()
+    skillManager = curPlayer.GetSkillManager()
+    if skillManager.FindSkillBySkillTypeID(skillTypeID):
+        #GameWorld.DebugLog("已经有该技能!")
+        return
+    skillManager.LVUpSkillBySkillTypeID(skillTypeID)
+    GameWorld.DebugLog("    给玩家技能: skillTypeID=%s" % (skillTypeID), curPlayer.GetID())
+    
+    if isPassiveSkill(giveSkill):
+        PassiveBuffEffMng.GetPassiveEffManager().RegistPassiveEff(curPlayer, skillTypeID)
+        
+    DataRecordPack.DR_LearnORUPSkill(curPlayer, skillTypeID, skillLV)
+    PlayerControl.PlayerControl(curPlayer).RefreshSkillFightPowerEx(skillTypeID, 0)
+    return
+
 ## 玩家登录检查学习技能(上线)
 #  @param curPlayer 当前玩家
 #  @return None

--
Gitblit v1.8.0