From 609503ca43ef2b95254bebb67f8ac8c7a28ca5cb Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 04 十二月 2018 17:49:55 +0800
Subject: [PATCH] 5216 【后端】【1.3】【1.3.100】开服全民冲榜赠送魂增加战力显示

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py     |   16 +++++++++++++---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py           |    3 ++-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearFruitAttr.py |    2 ++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py              |    7 +++++--
 PySysDB/PySysDBPY.h                                                                               |    1 +
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py         |    5 +++--
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRefineStove.py   |    3 ++-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py                   |    1 +
 8 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index 1dfae2a..220f95d 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -210,6 +210,7 @@
 	BYTE		FuncID;	//所属功能ID
 	WORD		MaxUseCnt;	//最大可使用数量
 	WORD		RecycleMoney;	//回收货币值
+	DWORD		FightPowerEx;	//附加战斗力
 };
 
 
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 1aebcb1..c1681c0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3187,6 +3187,7 @@
 
 #功能索引ShareDefine.Def_AttrFruitFuncList
 Def_PlayerKey_FruitAttr = "FruitAttr_%s_%s" # 属性果实增加的属性,参数为(功能索引, 物品效果id)
+Def_PlayerKey_FruitFightPowerEx = "FruitFightPowerEx_%s" # 属性果实增加的附加战力,参数为(功能索引)
 Def_PlayerKey_FamilyLVLeave = "FamilyLVLeave" # 离开的最后一个家族的等级
 
 Def_PlayerKey_CalcAddAttrType = "CalcAType_%s_%s_%s"   # 刷属性类型, 参数[funcIndex, attrIndex, 缓存编号]
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearFruitAttr.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearFruitAttr.py
index ad26787..116b609 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearFruitAttr.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearFruitAttr.py
@@ -63,6 +63,8 @@
         elif limitType == PlayerAttrFruit.Def_LimitType_Attr:
             PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AttrFruitAddValue % itemID, 0)
         
+        curPlayer.SetDict(ChConfig.Def_PlayerKey_FruitFightPowerEx % (funcIndex), 0)
+        
         itemData = GameWorld.GetGameData().GetItemByTypeID(itemID)
         # 重置该物品所加的属性值
         if itemData:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 312d7e5..bfc23d2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -188,6 +188,7 @@
                         ("BYTE", "FuncID", 0),
                         ("WORD", "MaxUseCnt", 0),
                         ("WORD", "RecycleMoney", 0),
+                        ("DWORD", "FightPowerEx", 0),
                         ),
 
                 "PetInfo":(
@@ -1452,13 +1453,15 @@
         self.ID = 0
         self.FuncID = 0
         self.MaxUseCnt = 0
-        self.RecycleMoney = 0
+        self.RecycleMoney = 0
+        self.FightPowerEx = 0
         return
         
     def GetID(self): return self.ID # 物品ID
     def GetFuncID(self): return self.FuncID # 所属功能ID
     def GetMaxUseCnt(self): return self.MaxUseCnt # 最大可使用数量
-    def GetRecycleMoney(self): return self.RecycleMoney # 回收货币值
+    def GetRecycleMoney(self): return self.RecycleMoney # 回收货币值
+    def GetFightPowerEx(self): return self.FightPowerEx # 附加战斗力
 
 # 灵兽表
 class IPY_PetInfo():
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py
index f92a2e0..a4f10f9 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerAttrFruit.py
@@ -297,7 +297,16 @@
     
     
     limitType = Def_LimitType_Cnt #默认按个数
-
+    
+    # 增加附加战力,仅按个数时有效
+    fightPowerExfigKey = ChConfig.Def_PlayerKey_FruitFightPowerEx % (funcIndex)
+    fightPowerEx = curPlayer.GetDictByKey(fightPowerExfigKey)
+    fruitIpyData = GetAttrFruitIpyData(fruitItemID)
+    addFightPowerEx = 0 if not fruitIpyData else fruitIpyData.GetFightPowerEx()
+    fightPowerEx = fightPowerEx + addFightPowerEx * addValue
+    curPlayer.SetDict(fightPowerExfigKey, fightPowerEx)
+    GameWorld.DebugLog("    Add funcIndex=%s,addFightPowerEx=%s,addValue=%s,fightPowerEx=%s" % (funcIndex, addFightPowerEx, addValue, fightPowerEx))
+    
     for i in range(itemData.GetEffectCount()):
         curEffect = itemData.GetEffectByIndex(i)
         effectID = curEffect.GetEffectID()
@@ -369,8 +378,9 @@
         #GameWorld.DebugLog("    effectID=%s,addValue=%s" % (effectID, addValue))
         PlayerControl.CalcAttrDict_Type(effectID, addValue, allAttrList)
 
-    #GameWorld.DebugLog("    有果实属性 allAttrList=%s" % str(allAttrList))
-    return
+    fightPowerEx = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_FruitFightPowerEx % (funcIndex))
+    #GameWorld.DebugLog("    有果实属性funcIndex=%s,fightPowerEx=%s,allAttrList=%s" % (funcIndex, fightPowerEx, allAttrList))
+    return fightPowerEx
     
 
 ## 统计百分比属性对功能内层的属性增加
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
index 149425f..2b1367b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
@@ -476,8 +476,9 @@
     curPlayer.SetDict(ChConfig.Def_PlayerKey_SpeedHorse, maxSpeed)
     
     # 果实对坐骑的加成, 魂石果实算附加属性层,单独计算
-    PlayerAttrFruit.CalcAttrFruitAddAtrr(curPlayer, allAttrListHorseSoul, ShareDefine.Def_AttrFruitFunc_Horse)
-
+    fightPowerEx = PlayerAttrFruit.CalcAttrFruitAddAtrr(curPlayer, allAttrListHorseSoul, ShareDefine.Def_AttrFruitFunc_Horse)
+    curPlayer.SetDict(ChConfig.Def_PlayerKey_MFPEx % ShareDefine.Def_MFPType_HorseSoul, fightPowerEx)
+    
     #PlayerControl.CalcFuncPackItem(curPlayer, ShareDefine.Def_Pack_Type_HorseSkill, allAttrList)
     
     # 保存计算值
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 1d8dcbb..5e87340 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py
@@ -779,7 +779,8 @@
     PlayerControl.CalcAttrDict_Type(ShareDefine.Def_Effect_PetMaxAtk, totalMaxAtk, allAttrListPet)
     totalSignNum = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalSignNum) # 总签到天数
     # 果实给人物加属性, 魂石果实算附加属性层,单独计算
-    PlayerAttrFruit.CalcAttrFruitAddAtrr(curPlayer, allAttrListPetSoul, ShareDefine.Def_AttrFruitFunc_Pet)
+    fightPowerEx = PlayerAttrFruit.CalcAttrFruitAddAtrr(curPlayer, allAttrListPetSoul, ShareDefine.Def_AttrFruitFunc_Pet)
+    curPlayer.SetDict(ChConfig.Def_PlayerKey_MFPEx % ShareDefine.Def_MFPType_PetSoul, fightPowerEx)
     
     #灵兽技能给人物加的属性
     learnSkillList, passiveSkillList = GetPetLearnSkill(curPlayer)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRefineStove.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRefineStove.py
index 5c38b75..37e99ea 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRefineStove.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerRefineStove.py
@@ -305,8 +305,9 @@
 def CalcStoveAttr(curPlayer):
     # 果实加成
     allAttrYaoList = [{} for _ in range(4)]
-    PlayerAttrFruit.CalcAttrFruitAddAtrr(curPlayer, allAttrYaoList, ShareDefine.Def_AttrFruitFunc_Stove)
+    fightPowerEx = PlayerAttrFruit.CalcAttrFruitAddAtrr(curPlayer, allAttrYaoList, ShareDefine.Def_AttrFruitFunc_Stove)
     PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_StoveYao, allAttrYaoList)
+    curPlayer.SetDict(ChConfig.Def_PlayerKey_MFPEx % ShareDefine.Def_MFPType_StoveYao, fightPowerEx)
     
     allAttrList = [{} for _ in range(4)]
     alchemyLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AlchemyLV)

--
Gitblit v1.8.0