From 9884f7248cae1b51d22e59b61d1c2af21141101d Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 12 十一月 2018 20:45:33 +0800
Subject: [PATCH] 4723 【后端】【1.3】仙界秘境副本进入CD在角色达到N级后取消

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4508.py |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4508.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4508.py
index ac475bc..fdd6126 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4508.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveBuff_4508.py
@@ -15,6 +15,8 @@
 import GameWorld
 import SkillCommon
 import BuffSkill
+import SkillShell
+import IPY_GameWorld
 
 def CheckCanHappen(attacker, defender, passiveEffect, skillID, **skillkwargs):
     curSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
@@ -35,7 +37,24 @@
     if buff.GetLayer() <= 0:
         return False
 
+    rate = passiveEffect.GetEffectValue(0)
+    if rate and not GameWorld.CanHappen(rate):
+        return False
+    
     BuffSkill.SetBuffLayer(attacker, buff, buff.GetLayer()-1, skillTypeID=curSkill.GetSkillTypeID())
+    
+    triggerSkillID = passiveEffect.GetEffectValue(1)
+    if triggerSkillID and attacker.GetGameObjType() == IPY_GameWorld.gotPlayer:
+        skillManager = attacker.GetSkillManager()
+        #获得技能
+        curSkill = skillManager.FindSkillBySkillTypeID(triggerSkillID)
+        if curSkill:
+            #玩家技能会升级
+            SkillShell.UsePassiveTriggerSkill(attacker, curSkill, defender, GameWorld.GetGameWorld().GetTick(), isEnhanceSkill = True)
+        else:
+            triggerSkill = GameWorld.GetGameData().GetSkillBySkillID(skillID)
+            if triggerSkill:
+                SkillShell.UsePassiveTriggerSkill(attacker, triggerSkill, defender, GameWorld.GetGameWorld().GetTick(), isEnhanceSkill = True)
     return True
 
 

--
Gitblit v1.8.0