From 4a97f4b54a9bdf9c881d95c531f14b769b1a33b8 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 24 八月 2022 17:03:10 +0800
Subject: [PATCH] 9696 【后端】【越南】【主干】境界炼体功能
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLianTi.py | 9 +++++++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 7 +++++--
PySysDB/PySysDBPY.h | 1 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/LianTi.py | 16 ++++++++++++++++
4 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index dc6550d..b564235 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -83,6 +83,7 @@
WORD NeedEatCount; //升级所需个数(非累计)
WORD EatPerCount; //每次培养消耗x个
list LVUpCostItemInfo; //突破等级道具ID|个数
+ DWORD ActivateSkillID; //激活技能ID
};
//神兵表 #tagGodWeapon
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/LianTi.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/LianTi.py
index 6c67215..042ca6f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/LianTi.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/LianTi.py
@@ -19,6 +19,8 @@
import GameWorld
import PlayerControl
import PlayerLianTi
+import IpyGameDataPY
+import SkillCommon
#---------------------------------------------------------------------
#逻辑实现
@@ -49,6 +51,20 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LianTiLV, lv)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LianTiEatItemCount, eatItemCount)
+ skillIDList = []
+ ipyDataMgr = IpyGameDataPY.IPY_Data()
+ for index in xrange(ipyDataMgr.GetLianTiCount()):
+ lvupIpyData = ipyDataMgr.GetLianTiByIndex(index)
+ dataLV = lvupIpyData.GetLianTiLV()
+ if dataLV > lv:
+ break
+ activateSkillID = lvupIpyData.GetActivateSkillID()
+ if activateSkillID:
+ skillIDList.append(activateSkillID)
+
+ if skillIDList:
+ SkillCommon.GivePlayerSkillByJobSkill(curPlayer, skillIDList)
+
else:
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 2a91d17..51d13ad 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -99,6 +99,7 @@
("WORD", "NeedEatCount", 0),
("WORD", "EatPerCount", 0),
("list", "LVUpCostItemInfo", 0),
+ ("DWORD", "ActivateSkillID", 0),
),
"GodWeapon":(
@@ -2107,7 +2108,8 @@
self.EatItemAttrValue = []
self.NeedEatCount = 0
self.EatPerCount = 0
- self.LVUpCostItemInfo = []
+ self.LVUpCostItemInfo = []
+ self.ActivateSkillID = 0
return
def GetLianTiLV(self): return self.LianTiLV # 炼体等级
@@ -2119,7 +2121,8 @@
def GetEatItemAttrValue(self): return self.EatItemAttrValue # 每x个培养丹增加属性值,x=UpEatItemPerCount
def GetNeedEatCount(self): return self.NeedEatCount # 升级所需个数(非累计)
def GetEatPerCount(self): return self.EatPerCount # 每次培养消耗x个
- def GetLVUpCostItemInfo(self): return self.LVUpCostItemInfo # 突破等级道具ID|个数
+ def GetLVUpCostItemInfo(self): return self.LVUpCostItemInfo # 突破等级道具ID|个数
+ def GetActivateSkillID(self): return self.ActivateSkillID # 激活技能ID
# 神兵表
class IPY_GodWeapon():
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLianTi.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLianTi.py
index 302a71c..bbf4056 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLianTi.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerLianTi.py
@@ -23,6 +23,7 @@
import NetPackCommon
import ItemCommon
import ChConfig
+import SkillCommon
def DoLianTiOpen(curPlayer):
## 功能开启
@@ -167,12 +168,16 @@
ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, costItemCount, ChConfig.ItemDel_LianTi)
updEatItemCount = curEatItemCount - needEatCount
- GameWorld.DebugLog("炼体突破: lianTiLV=%s,curEatItemCount=%s,needEatCount=%s,updEatItemCount=%s,nextLianTiLv=%s"
- % (lianTiLV, curEatItemCount, needEatCount, updEatItemCount, nextLianTiLv))
+ activateSkillID = nextIpyData.GetActivateSkillID()
+ GameWorld.DebugLog("炼体突破: lianTiLV=%s,curEatItemCount=%s,needEatCount=%s,updEatItemCount=%s,nextLianTiLv=%s,activateSkillID=%s"
+ % (lianTiLV, curEatItemCount, needEatCount, updEatItemCount, nextLianTiLv, activateSkillID))
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LianTiLV, nextLianTiLv)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LianTiEatItemCount, updEatItemCount)
+ if activateSkillID:
+ SkillCommon.GivePlayerSkillByJobSkill(curPlayer, [activateSkillID])
+
SyncLianTiInfo(curPlayer)
RefreshLianTiAttr(curPlayer)
return
--
Gitblit v1.8.0