From 00e75ddb882229e1d9893f963e2485f33972ad34 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 24 十二月 2020 16:03:22 +0800
Subject: [PATCH] 4887 【主干】【BT】【长尾】装备技能无效;

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py             |   20 ++++++++++++++++++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintSkill.py              |    2 ++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py             |   12 ++++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyGameData.py                          |    1 +
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4079.py |    2 +-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py     |   11 +++++++----
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py                            |    4 +++-
 7 files changed, 44 insertions(+), 8 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
index cc352aa..cbf5a03 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
@@ -1438,8 +1438,9 @@
 
 # 致命一击
 def __HurtTypeHappen_Deadly(atkObj, defObj, happenState, curSkill):
-    if PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, defObj, None, ChConfig.TriggerType_IsDealy):
-        return True, 0, 0
+    deadlyHitValue = PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, defObj, None, ChConfig.TriggerType_IsDealy)
+    if deadlyHitValue:
+        return True, deadlyHitValue, 0
     return
 
 #重击定义:当触发重击时,则增加双倍暴击固定值伤害(重击与暴击互斥,优先判断重击,当重击触发时,暴击不触发)
@@ -2129,7 +2130,7 @@
         
     dDamChanceDef = hurtTypeResultDict[ChConfig.Def_HurtType_Parry][2] # 抵御, 大于0代表触发抵御效果
     isZhuxianHit, aZhuxianHurtPer, dZhuxianReducePer = hurtTypeResultDict[ChConfig.Def_HurtType_Zhuxian] # 诛仙一击
-    isDeadlyHit = hurtTypeResultDict[ChConfig.Def_HurtType_DeadlyHit][0] # 致命一击
+    isDeadlyHit, deadlyHitMultiValue, _ = hurtTypeResultDict[ChConfig.Def_HurtType_DeadlyHit] # 致命一击
 
     if PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(defObj, atkObj, None, ChConfig.TriggerType_OneDamage):
         return 1, hurtType
@@ -2330,7 +2331,9 @@
     hurtFormula = hurtDist[hurtFormulaKey]
         
     hurtValue = int(eval(FormulaControl.GetCompileFormula(hurtFormulaKey, hurtFormula)))
-
+    if isDeadlyHit:
+        hurtValue *= deadlyHitMultiValue
+        
     if hurtType == ChConfig.Def_HurtType_Normal and atkSkillPerYinji > 0:
         return hurtValue, ChConfig.Def_HurtType_Yinji
     elif hurtType == ChConfig.Def_HurtType_Normal and SuppressValueRealmRate > 10000:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 8774cb7..4fbf98d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -5215,7 +5215,9 @@
 Def_SkillFuncType_SuiteSkill,     #14 套装技能
 Def_SkillFuncType_PassiveSkillWithSP,     #15 可有专精的被动技能
 Def_SkillFuncType_PetOwnerSkill,     #16 宠物主人技能
-) = range(17)
+Def_SkillFuncType_17,     #17 称号技能 
+Def_SkillFuncType_EquipPassiveSkill,     #18 装备被动技能
+) = range(19)
 
 # 受技能效果完全影响的怪, 对应 Def_BattleRelationType_CommNoBoss
 Def_SkillAttack_NPCIsBoss = [ Def_NPCType_Ogre_Normal     ,  #平凡小怪 0    # c++ 定义为普通NPC视野刷新
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintSkill.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintSkill.py
index 116e74a..64990b4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintSkill.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintSkill.py
@@ -57,6 +57,8 @@
                 14 : "套装技能",
                 15 : "可有专精的被动技能",
                 16 : "灵宠主人技能",
+                17 : "称号技能",
+                18 : "装备被动技能",
                 }
     
     for funcType, skillList in skillDict.items():
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
index 3c83f56..eb011cf 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
@@ -59,6 +59,7 @@
         return
     GameWorld.Log("加载物品数据...")
     
+    PyGameData.EquipItemSkillIDList = []
     PyGameData.DailyUseCountLimitItemIDList = []
     
     gameData = GameWorld.GetGameData()
@@ -75,9 +76,20 @@
             stoneLevel = itemEff.GetEffectValue(1)
             PyGameData.g_stoneLevelIDDict[(stoneEffType, stoneLevel)] = itemID
             
+        if GetIsEquip(findItemData):
+            for skillIndex in xrange(findItemData.GetAddSkillCount()):
+                itemSkillID = findItemData.GetAddSkill(skillIndex)
+                if not itemSkillID:
+                    continue
+                if itemSkillID not in PyGameData.EquipItemSkillIDList:
+                    PyGameData.EquipItemSkillIDList.append(itemSkillID)
+                    
     if PyGameData.DailyUseCountLimitItemIDList:
         GameWorld.Log("每日有使用次数限制的物品ID列表: %s" % PyGameData.DailyUseCountLimitItemIDList)
         
+    if PyGameData.EquipItemSkillIDList:
+        GameWorld.Log("装备技能ID列表: %s" % PyGameData.EquipItemSkillIDList)
+        
     PyGameData.InitPyItem = True
     return
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyGameData.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyGameData.py
index e7d1988..1eb4e41 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyGameData.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyGameData.py
@@ -20,6 +20,7 @@
 
 InitPyItem = False # 是否加载过物品表所需要的Py数据, 每张地图只在启动时执行一次
 DailyUseCountLimitItemIDList = [] # 每日有使用个数限制的物品ID列表
+EquipItemSkillIDList = [] # 装备技能ID列表
 g_stoneLevelIDDict = {} # 宝石类型等级对应物品ID {(stoneEffType, stoneLevel):itemID, ...}
 
 g_refreshAttrBillboardFunc = [] # 刷属性后需要触发的同步排行榜函数列表
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4079.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4079.py
index f32c3fc..27bf90c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4079.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4079.py
@@ -26,4 +26,4 @@
 
 
 def GetValue(attacker, defender, effect):
-    return 1
+    return effect.GetEffectValue(1) # 数值2为倍数
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
index 39f15c0..58a77c6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
@@ -727,7 +727,8 @@
                 continue
             
             if curSkill.GetFuncType() in [ChConfig.Def_SkillFuncType_FbPassiveSkill,
-                                          ChConfig.Def_SkillFuncType_Dogz]:
+                                          ChConfig.Def_SkillFuncType_Dogz,
+                                          ChConfig.Def_SkillFuncType_EquipPassiveSkill]:
                 # 被动技能和神兽需设置才有效
                 continue
             
@@ -1312,7 +1313,10 @@
         if callFunc is None:
             continue
         
-        curValue += callFunc(attacker, defender, effect)
+        if triggerType == ChConfig.TriggerType_IsDealy:
+            curValue = callFunc(attacker, defender, effect)
+        else:
+            curValue += callFunc(attacker, defender, effect)
         if skillTypeID not in Def_PassiveSkillValueNoCD:
             if curSkill.GetCoolDownTime():
                 SkillCommon.SetSkillRemainTime(curSkill, 0, tick, attacker)
@@ -1717,6 +1721,18 @@
         for skillID in itemSkillIDList:
             skillsDict[skillID] = skillsDict.get(skillID, 0) + 1
             
+    skillManager = gameObj.GetSkillManager()
+    for skillID in PyGameData.EquipItemSkillIDList:
+        hasSkill = skillManager.FindSkillBySkillTypeID(skillID)
+        if skillID in skillsDict:
+            if not hasSkill:
+                skillManager.LVUpSkillBySkillTypeID(skillID)
+                #GameWorld.DebugLog("学习装备技能: %s" % skillID, gameObj.GetPlayerID())
+        else:
+            if hasSkill:
+                skillManager.DeleteSkillBySkillTypeID(skillID)
+                #GameWorld.DebugLog("删除装备技能: %s" % skillID, gameObj.GetPlayerID())
+                
     return skillsDict
 
 # 默认情况下 被动不应该再触发(或加强)被动技能,会造成额外触发或者死循环

--
Gitblit v1.8.0