From ac8b3445afc8a15c3c139bab8e82add9b098abde Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 07 十月 2023 14:48:38 +0800
Subject: [PATCH] 8883 【BT2】【后端】坐骑升级属性修改(改为每培养X颗培养丹对应提升属性,X=每次培养消耗数)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 13 +++++++++++--
PySysDB/PySysDBPY.h | 3 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py | 24 +++++++++++++++++-------
3 files changed, 31 insertions(+), 9 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index ade19ea..1e47284 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -407,6 +407,9 @@
WORD NeedEatCount; //升级所需个数(非累计)
list LVAttrType; //每级额外属性类型(非累积)
list LVAttrValue; //每级额外属性值(非累积)
+ list UpItemAttrType; //每x个培养丹增加属性类型,x=UpEatItemPerCount
+ list UpItemAttrValue; //每x个培养丹增加属性值,x=UpEatItemPerCount
+ DWORD UpEatItemPerCount; //每次培养消耗x个
};
//坐骑培养表
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index db7dd13..56c64be 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -338,6 +338,9 @@
("WORD", "NeedEatCount", 0),
("list", "LVAttrType", 0),
("list", "LVAttrValue", 0),
+ ("list", "UpItemAttrType", 0),
+ ("list", "UpItemAttrValue", 0),
+ ("DWORD", "UpEatItemPerCount", 0),
),
"HorseTrain":(
@@ -2777,14 +2780,20 @@
self.HorseSkinID = 0
self.NeedEatCount = 0
self.LVAttrType = []
- self.LVAttrValue = []
+ self.LVAttrValue = []
+ self.UpItemAttrType = []
+ self.UpItemAttrValue = []
+ self.UpEatItemPerCount = 0
return
def GetHorseLV(self): return self.HorseLV # 坐骑等级
def GetHorseSkinID(self): return self.HorseSkinID # 外观物品ID
def GetNeedEatCount(self): return self.NeedEatCount # 升级所需个数(非累计)
def GetLVAttrType(self): return self.LVAttrType # 每级额外属性类型(非累积)
- def GetLVAttrValue(self): return self.LVAttrValue # 每级额外属性值(非累积)
+ def GetLVAttrValue(self): return self.LVAttrValue # 每级额外属性值(非累积)
+ def GetUpItemAttrType(self): return self.UpItemAttrType # 每x个培养丹增加属性类型,x=UpEatItemPerCount
+ def GetUpItemAttrValue(self): return self.UpItemAttrValue # 每x个培养丹增加属性值,x=UpEatItemPerCount
+ def GetUpEatItemPerCount(self): return self.UpEatItemPerCount # 每次培养消耗x个
# 坐骑培养表
class IPY_HorseTrain():
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 ca0e5b0..e9da8fd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
@@ -409,7 +409,7 @@
horseSpeed = 0 # 坐骑功能增加的速度值,骑乘时才有效果
horseLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorserLV)
# 等阶培养属性
- totalItemCount = 0
+ #totalItemCount = 0
ipyDataMgr = IpyGameDataPY.IPY_Data()
for index in xrange(ipyDataMgr.GetHorseLVUpCount()):
horseIpyData = ipyDataMgr.GetHorseLVUpByIndex(index)
@@ -417,9 +417,9 @@
if dataHorseLV > horseLV:
break
elif dataHorseLV == horseLV:
- totalItemCount += curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorserEatItemCount)
+ upItemCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorserEatItemCount)
else:
- totalItemCount += horseIpyData.GetNeedEatCount()
+ upItemCount = horseIpyData.GetNeedEatCount()
# 等阶额外属性
lvAttrTypeList = horseIpyData.GetLVAttrType()
@@ -431,10 +431,20 @@
continue
PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrList)
- # 等阶培养丹累加个数属性
- eatItemAttrInfo = IpyGameDataPY.GetFuncCfg("HorseUpItem", 3)
- for attrID, attrValue in eatItemAttrInfo:
- PlayerControl.CalcAttrDict_Type(attrID, attrValue * totalItemCount, allAttrList)
+ # 培养丹增加属性
+ upItemPerCount = horseIpyData.GetUpEatItemPerCount()
+ if upItemCount and upItemPerCount:
+ upItemAttrTypeList = horseIpyData.GetUpItemAttrType()
+ upItemAttrValueList = horseIpyData.GetUpItemAttrValue()
+ attrMultiple = upItemCount / upItemPerCount
+ for i, attrID in enumerate(upItemAttrTypeList):
+ attrValue = upItemAttrValueList[i]
+ PlayerControl.CalcAttrDict_Type(attrID, attrValue * attrMultiple, allAttrList)
+
+# # 等阶培养丹累加个数属性
+# eatItemAttrInfo = IpyGameDataPY.GetFuncCfg("HorseUpItem", 3)
+# for attrID, attrValue in eatItemAttrInfo:
+# PlayerControl.CalcAttrDict_Type(attrID, attrValue * totalItemCount, allAttrList)
# 幻化属性
initFPAdd = 0 #初始战力
--
Gitblit v1.8.0