From 9ba8221ffc65a8a9f4e447b4cb6c7db08b1589dd Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 07 九月 2021 15:18:54 +0800
Subject: [PATCH] 8585 【主干】【BT3】【bt3_1.100.1】【后端】竞技场(新增玩家初始积分设置;优化赛季重置玩家积分重置逻辑)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/EffGetSet.py |   55 +++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 45 insertions(+), 10 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/EffGetSet.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/EffGetSet.py
index 1605b8f..268f375 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/EffGetSet.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/EffGetSet.py
@@ -110,7 +110,7 @@
    [lambda curObj:PlayerControl.GetReduceBackHPPer(curObj), lambda curObj, value:PlayerControl.SetReduceBackHPPer(curObj, value), 0, 0, 0],  # 暂无用
    [lambda curObj:PlayerControl.GetXPRestorePer(curObj), lambda curObj, value:PlayerControl.SetXPRestorePer(curObj, value), 0, 0, 0],        # 自动恢复XP值比率
    
-   [lambda curObj:PlayerControl.GetReduceSkillCD(curObj), lambda curObj, value:PlayerControl.SetReduceSkillCD(curObj, value), 0, 0, 0],          # 减技能CD值
+   [lambda curObj:PlayerControl.GetReduceSkillCDPer(curObj), lambda curObj, value:PlayerControl.SetReduceSkillCDPer(curObj, value), IPY_PlayerDefine.CDBPlayerRefresh_BattleValEx3, 1, 0],  # 减技能CD比例
    [lambda curObj:curObj.GetSkillAtkRate(), lambda curObj, value:curObj.SetSkillAtkRate(value), IPY_PlayerDefine.CDBPlayerRefresh_SkillAtkRate, 1, 0],                                        # 技能攻击比例加成
    [lambda curObj:PlayerControl.GetSkillAtkRateReduce(curObj), lambda curObj, value:PlayerControl.SetSkillAtkRateReduce(curObj, value), ShareDefine.CDBPlayerRefresh_SkillAtkRateReduce, 1, 0],# 技能攻击比例减少
    [lambda curObj:PlayerControl.GetDamagePVP(curObj), lambda curObj, value:PlayerControl.SetDamagePVP(curObj, value), ShareDefine.CDBPlayerRefresh_DamagePVP, 1, 0],     # PVP固定伤害
@@ -174,6 +174,30 @@
    [lambda curObj:PlayerControl.GetBurnValue(curObj), lambda curObj, value:PlayerControl.SetBurnValue(curObj, value), ShareDefine.CDBPlayerRefresh_YinjiTime, 0, 0],    # 灼烧固定伤害
    [lambda curObj:PlayerControl.GetBurnTimePer(curObj), lambda curObj, value:PlayerControl.SetBurnTimePer(curObj, value), 0, 0, 0],    # 延长灼烧时间百分比
    [lambda curObj:PlayerControl.GetSubSpeedPer(curObj), lambda curObj, value:PlayerControl.SetSubSpeedPer(curObj, value), 0, 0, 0],    # 减移动速度百分比
+   [lambda curObj:PlayerControl.GetSkillAddPer1(curObj), lambda curObj, value:PlayerControl.SetSkillAddPer1(curObj, value), ShareDefine.CDBPlayerRefresh_SkillAddPer1, 1, 0],    # 技能伤害增强1
+   [lambda curObj:PlayerControl.GetSkillAddPer2(curObj), lambda curObj, value:PlayerControl.SetSkillAddPer2(curObj, value), ShareDefine.CDBPlayerRefresh_SkillAddPer2, 1, 0],    # 技能伤害增强2
+   [lambda curObj:PlayerControl.GetSkillAddPer3(curObj), lambda curObj, value:PlayerControl.SetSkillAddPer3(curObj, value), ShareDefine.CDBPlayerRefresh_SkillAddPer3, 1, 0],    # 技能伤害增强3
+   [lambda curObj:PlayerControl.GetSkillAddPer4(curObj), lambda curObj, value:PlayerControl.SetSkillAddPer4(curObj, value), ShareDefine.CDBPlayerRefresh_SkillAddPer4, 1, 0],    # 技能伤害增强4
+   [lambda curObj:PlayerControl.GetSkillAddPer5(curObj), lambda curObj, value:PlayerControl.SetSkillAddPer5(curObj, value), ShareDefine.CDBPlayerRefresh_SkillAddPer5, 1, 0],    # 技能伤害增强5
+   [lambda curObj:PlayerControl.GetSkillAddPer6(curObj), lambda curObj, value:PlayerControl.SetSkillAddPer6(curObj, value), ShareDefine.CDBPlayerRefresh_SkillAddPer6, 1, 0],    # 技能伤害增强6
+   [lambda curObj:PlayerControl.GetSkillAddPer7(curObj), lambda curObj, value:PlayerControl.SetSkillAddPer7(curObj, value), ShareDefine.CDBPlayerRefresh_SkillAddPer7, 1, 0],    # 技能伤害增强7
+   [lambda curObj:PlayerControl.GetSkillReducePer1(curObj), lambda curObj, value:PlayerControl.SetSkillReducePer1(curObj, value), ShareDefine.CDBPlayerRefresh_SkillReducePer1, 1, 0],    # 受到技能伤害减少1
+   [lambda curObj:PlayerControl.GetSkillReducePer2(curObj), lambda curObj, value:PlayerControl.SetSkillReducePer2(curObj, value), ShareDefine.CDBPlayerRefresh_SkillReducePer2, 1, 0],    # 受到技能伤害减少2
+   [lambda curObj:PlayerControl.GetSkillReducePer3(curObj), lambda curObj, value:PlayerControl.SetSkillReducePer3(curObj, value), ShareDefine.CDBPlayerRefresh_SkillReducePer3, 1, 0],    # 受到技能伤害减少3
+   [lambda curObj:PlayerControl.GetSkillReducePer4(curObj), lambda curObj, value:PlayerControl.SetSkillReducePer4(curObj, value), ShareDefine.CDBPlayerRefresh_SkillReducePer4, 1, 0],    # 受到技能伤害减少4
+   [lambda curObj:PlayerControl.GetSkillReducePer5(curObj), lambda curObj, value:PlayerControl.SetSkillReducePer5(curObj, value), ShareDefine.CDBPlayerRefresh_SkillReducePer5, 1, 0],    # 受到技能伤害减少5
+   [lambda curObj:PlayerControl.GetSkillReducePer6(curObj), lambda curObj, value:PlayerControl.SetSkillReducePer6(curObj, value), ShareDefine.CDBPlayerRefresh_SkillReducePer6, 1, 0],    # 受到技能伤害减少6
+   [lambda curObj:PlayerControl.GetSkillReducePer7(curObj), lambda curObj, value:PlayerControl.SetSkillReducePer7(curObj, value), ShareDefine.CDBPlayerRefresh_SkillReducePer7, 1, 0],    # 受到技能伤害减少7
+   [lambda curObj:PlayerControl.GetZhuXianRate(curObj), lambda curObj, value:PlayerControl.SetZhuXianRate(curObj, value), 0, 0, 0],    # 诛仙一击: 概率直接减少BOSS当前10%血量
+   [lambda curObj:PlayerControl.GetZhuXianReducePer(curObj), lambda curObj, value:PlayerControl.SetZhuXianReducePer(curObj, value), 0, 0, 0],    # 诛仙护体: 受到BOSS伤害减免 万分率
+   [lambda curObj:PlayerControl.GetHorseMaxHPPer(curObj), lambda curObj, value:PlayerControl.SetHorseMaxHPPer(curObj, value), 0, 0, 0],      # 坐骑生命加成
+   [lambda curObj:PlayerControl.GetPetAtkPer(curObj), lambda curObj, value:PlayerControl.SetPetAtkPer(curObj, value), 0, 0, 0],      # 灵宠攻击加成
+   [lambda curObj:PlayerControl.GetHorseTrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetHorseTrainAttrPer(curObj, value), 0, 0, 0],      # 坐骑培养属性加成
+   [lambda curObj:PlayerControl.GetPetTrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetPetTrainAttrPer(curObj, value), 0, 0, 0],      # 灵宠培养属性加成
+   [lambda curObj:PlayerControl.GetGuardTrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetGuardTrainAttrPer(curObj, value), 0, 0, 0],      # 守护培养属性加成
+   [lambda curObj:PlayerControl.GetWingTrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetWingTrainAttrPer(curObj, value), 0, 0, 0],      # 翅膀培养属性加成
+   [lambda curObj:PlayerControl.GetPeerlessWeaponTrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetPeerlessWeaponTrainAttrPer(curObj, value), 0, 0, 0],      # 灭世培养属性加成
+   [lambda curObj:PlayerControl.GetPeerlessWeapon2TrainAttrPer(curObj), lambda curObj, value:PlayerControl.SetPeerlessWeapon2TrainAttrPer(curObj, value), 0, 0, 0],      # 弑神培养属性加成
 ]
 
 ## 通过索引获得属性值
@@ -201,7 +225,8 @@
         GameWorld.ErrLog("设置对象属性失败, Index = %s" % (effIndex))
         return
     
-    effectValue = min(effectValue, ChConfig.Def_UpperLimit_DWord)
+    if effIndex not in ChConfig.TYPE_BIGVALUE_ATTR:
+        effectValue = min(effectValue, ChConfig.Def_UpperLimit_DWord)
     return ObjProperty_AttrByIndex[effIndex - 1][1](curObj, effectValue)
 
 
@@ -223,22 +248,32 @@
 def CopyPlayerFuncAttr(curPlayer):
     for i in xrange(len(ObjProperty_AttrByIndex)):
         # Get
-        if i+1 in [ChConfig.TYPE_Calc_AttrHP, ChConfig.TYPE_Calc_AttrMP, ChConfig.TYPE_Calc_ProDef]:
+        effIndex = i + 1
+        if effIndex in [ChConfig.TYPE_Calc_AttrHP, ChConfig.TYPE_Calc_AttrMP, ChConfig.TYPE_Calc_ProDef]:
             continue
         value = ObjProperty_AttrByIndex[i][0](curPlayer)
-        if value == 0 and curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttr%i) == 0:
+        if value == 0 and GetCopyFuncAttrValue(curPlayer, effIndex) == 0:
             continue
-        curPlayer.SetDict(ChConfig.Def_PlayerKey_CopyFuncAttr%i, ObjProperty_AttrByIndex[i][0](curPlayer))
+        SetCopyFuncAttrValue(curPlayer, effIndex, value)
     return
         
 # 恢复缓存功能属性的刷新结果,用于BUFF属性单独刷新
 def RestorePlayerFuncAttr(curPlayer):
     for i in xrange(len(ObjProperty_AttrByIndex)):
-        if i+1 in [ChConfig.TYPE_Calc_AttrHP, ChConfig.TYPE_Calc_AttrMP, ChConfig.TYPE_Calc_ProDef]:
+        effIndex = i + 1
+        if effIndex in [ChConfig.TYPE_Calc_AttrHP, ChConfig.TYPE_Calc_AttrMP, ChConfig.TYPE_Calc_ProDef]:
             continue
-        ObjProperty_AttrByIndex[i][1](curPlayer, 
-                                      curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttr%i))
+        ObjProperty_AttrByIndex[i][1](curPlayer, GetCopyFuncAttrValue(curPlayer, effIndex))
     return
-            
-            
+
+def GetCopyFuncAttrValue(curPlayer, effIndex):
+    value = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttr % effIndex)
+    valueEx = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_CopyFuncAttrEx % effIndex)
+    return valueEx * ShareDefine.Def_PerPointValue + value
+
+def SetCopyFuncAttrValue(curPlayer, effIndex, value):
+    curPlayer.SetDict(ChConfig.Def_PlayerKey_CopyFuncAttr % effIndex, value % ShareDefine.Def_PerPointValue)
+    curPlayer.SetDict(ChConfig.Def_PlayerKey_CopyFuncAttrEx % effIndex, value / ShareDefine.Def_PerPointValue)
+    return
+
             
\ No newline at end of file

--
Gitblit v1.8.0