From 3388684ebcff99ed043e5fbc795750dbfba6c8d0 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 13 九月 2018 17:06:42 +0800
Subject: [PATCH] 3466 【主干】【1.0.15】会心时增加会心伤害

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py             |    1 +
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py                    |    2 +-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py                 |    2 +-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py                         |    3 ++-
 ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py                                              |    3 ++-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py                |    5 +++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py     |    4 ++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py                            |    3 ++-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4051.py |   20 ++++++++++++++++++++
 9 files changed, 36 insertions(+), 7 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index f19d7ef..11d2218 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -776,7 +776,8 @@
 CDBPlayerRefresh_TreasureScore,         # 寻宝积分
 CDBPlayerRefresh_Danjing,               # 丹精
 CDBPlayerRefresh_NPCHurtAddPer,         # 对怪物伤害加成
-) = range(146, 189)
+CDBPlayerRefresh_FinalHurtPer,             # 最终输出伤害百分比
+) = range(146, 190)
 
 TYPE_Price_Gold_Paper_Money = 5    # 金钱类型,(先用礼券,再用金子)
 TYPE_Price_Family_Contribution = 6 # 战盟贡献度(活跃度转换得来)
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 35c5823..60ee246 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
@@ -1720,6 +1720,10 @@
         # 暴击增加技能伤害
         atkSkillPer += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_SuperHitSkillPer)
 
+    if isLuckyHit:
+        # 会心一击时增加会心伤害百分比 
+        aLuckyHit += PassiveBuffEffMng.GetPassiveSkillValueByTriggerType(atkObj, defObj, curSkill, ChConfig.TriggerType_LuckyHit)
+
     #参与运算的数值
     rand = random.random()                #种子数 0~1
     
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index aac5540..12fda6f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -4297,7 +4297,8 @@
 TriggerType_AttackOverPassive, # 攻击(对敌技能)后被动技能被触发在其他被动效果处理后调用,触发顺序原因 47
 TriggerType_Buff_BeAttackSubLayer,  # BUFF类:被攻击减buff层,0消失 48
 TriggerType_OneDamage,   # 伤害降低到1点 49
-) = range(1, 50)
+TriggerType_LuckyHit, # 会心一击时增加会心伤害百分比 50
+) = range(1, 51)
 
 
 # NPC功能类型定义
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index 5e856d8..b9de67e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -6136,8 +6136,9 @@
     
 ## 最终伤害百分比
 def GetFinalHurtPer(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_FinalHurtPer)
-def SetFinalHurtPer(curPlayer, value): curPlayer.SetDict(ChConfig.Def_PlayerKey_FinalHurtPer, value)
-
+def SetFinalHurtPer(curPlayer, value):
+    curPlayer.SetDict(ChConfig.Def_PlayerKey_FinalHurtPer, value)
+    curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_FinalHurtPer, value, False)
 ## 最终固定伤害增加
 def GetFinalHurt(curPlayer): return curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_FinalHurt)
 def SetFinalHurt(curPlayer, value):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
index 1c74150..7e2b5bd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
@@ -109,7 +109,7 @@
     if curPlayer.GetFamilyMemberLV() != refreshPack.GetFamilyMemberLV():
         curPlayer.SetFamilyMemberLV(refreshPack.GetFamilyMemberLV())
         #通知周围玩家家族职位刷新
-        curPlayer.Notify_FamilyMemberLVRefresh()
+        #curPlayer.Notify_FamilyMemberLVRefresh()
         GameLogic_FamilyWar.DoCheckChampionFamilyTitle(curPlayer)
     
     if curPlayer.GetFamilyMoney() != refreshPack.GetFamilyMoney():
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py
index f988118..272f7c9 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py
@@ -316,7 +316,7 @@
     PetControl.SetPetHP(rolePet, rolePet.GetMaxHP(), False)
     
     #---通知客户端---
-    rolePet.Sync_PetInfo()
+    #rolePet.Sync_PetInfo()
     #刷新技能栏
     rolePet.Sync_SkillList()
     
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index f19d7ef..11d2218 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -776,7 +776,8 @@
 CDBPlayerRefresh_TreasureScore,         # 寻宝积分
 CDBPlayerRefresh_Danjing,               # 丹精
 CDBPlayerRefresh_NPCHurtAddPer,         # 对怪物伤害加成
-) = range(146, 189)
+CDBPlayerRefresh_FinalHurtPer,             # 最终输出伤害百分比
+) = range(146, 190)
 
 TYPE_Price_Gold_Paper_Money = 5    # 金钱类型,(先用礼券,再用金子)
 TYPE_Price_Family_Contribution = 6 # 战盟贡献度(活跃度转换得来)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4051.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4051.py
new file mode 100644
index 0000000..11ab9c4
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuff/PassiveSkill_4051.py
@@ -0,0 +1,20 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#
+# @todo: 会心一击时增加会心伤害百分比
+#
+# @author: Alee
+# @date 2018-1-9 下午09:39:37
+# @version 1.0
+#
+# @note: 
+#
+#---------------------------------------------------------------------
+
+
+def CheckCanHappen(attacker, defender, effect, curSkill):   
+    return True
+    
+
+def GetValue(attacker, defender, effect):
+    return effect.GetEffectValue(0)
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 f894fb4..293d7c0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/PassiveBuffEffMng.py
@@ -324,6 +324,7 @@
              4048:ChConfig.TriggerType_MissSkill,   # 闪避后触发释放技能
              4049:ChConfig.TriggerType_MissSuccessPer, # 闪避成功率提升
              4050:ChConfig.TriggerType_OneDamage,   # 伤害降低到1点
+             4051:ChConfig.TriggerType_LuckyHit, # 会心一击时增加会心伤害百分比 50
              }
     return tdict.get(effectID, -1)
     #===========================================================================

--
Gitblit v1.8.0