From cb9519432b4e8bee01d2d5f1fc7f82efae3c9210 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 13 一月 2020 16:18:40 +0800
Subject: [PATCH] 8369 境界修改(升级境界可学习技能或增加灵根点)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 10 ++++++++--
PySysDB/PySysDBPY.h | 2 ++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py | 38 ++++++++++++++++++++++++++++++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py | 9 +++++++++
4 files changed, 57 insertions(+), 2 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index 45f8db4..911158f 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -48,6 +48,8 @@
DWORD BuffID; //给全服在线玩家增加buff
DWORD ExpRate; //修为池经验速率
DWORD ExpLimit; //修为池经验上限
+ list LearnSkillIDInfo; //学习技能ID信息 [职业1技能ID,职业2技能ID, ...]
+ BYTE AddFreePoint; //增加自由属性点
};
//神兵表 #tagGodWeapon
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index dcbe31d..bc38160 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -70,6 +70,8 @@
("DWORD", "BuffID", 0),
("DWORD", "ExpRate", 0),
("DWORD", "ExpLimit", 0),
+ ("list", "LearnSkillIDInfo", 0),
+ ("BYTE", "AddFreePoint", 0),
),
"GodWeapon":(
@@ -1641,7 +1643,9 @@
self.BossID = 0
self.BuffID = 0
self.ExpRate = 0
- self.ExpLimit = 0
+ self.ExpLimit = 0
+ self.LearnSkillIDInfo = []
+ self.AddFreePoint = 0
return
def GetLv(self): return self.Lv # 境界等级
@@ -1654,7 +1658,9 @@
def GetBossID(self): return self.BossID # 渡劫bossid
def GetBuffID(self): return self.BuffID # 给全服在线玩家增加buff
def GetExpRate(self): return self.ExpRate # 修为池经验速率
- def GetExpLimit(self): return self.ExpLimit # 修为池经验上限
+ def GetExpLimit(self): return self.ExpLimit # 修为池经验上限
+ def GetLearnSkillIDInfo(self): return self.LearnSkillIDInfo # 学习技能ID信息 [职业1技能ID,职业2技能ID, ...]
+ def GetAddFreePoint(self): return self.AddFreePoint # 增加自由属性点
# 神兵表
class IPY_GodWeapon():
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py
index 6fcc029..c0aef9c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPrestigeSys.py
@@ -30,6 +30,7 @@
import PlayerBillboard
import EventShell
import DataRecordPack
+import SkillCommon
import time
#------------------------------------------------------------------------------
@@ -204,6 +205,14 @@
else:
PlayerControl.WorldNotify(0, 'RealmUpSuccess', [curPlayer.GetName(), curPlayer.GetID(), nextRealmLv])
+ SkillCommon.GivePlayerSkillByJobSkillList(curPlayer, nextRealmIpyData.GetLearnSkillIDInfo())
+
+ addFreePoint = nextRealmIpyData.GetAddFreePoint()
+ if addFreePoint:
+ updFreePoint = curPlayer.GetFreePoint() + addFreePoint
+ curPlayer.SetFreePoint(updFreePoint)
+ GameWorld.DebugLog(" addFreePoint=%s,updFreePoint=%s" % (addFreePoint, updFreePoint))
+
RefreshOfficialAttr(curPlayer)
GameFuncComm.DoFuncOpenLogic(curPlayer)
SyncRealmFBState(curPlayer)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
index 0e36460..a6cdc18 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
@@ -188,6 +188,44 @@
return
+def GivePlayerSkillByJobSkillList(curPlayer, jobSkillList):
+ ## 根据职业技能ID列表给玩家技能
+
+ if not jobSkillList:
+ return
+
+ skillLV = 1
+ giveSkill = None
+ for skillID in jobSkillList:
+ skillData = GameWorld.GetGameData().FindSkillByType(skillID, skillLV)
+ if skillData == None:
+ continue
+ if not CheckSkillJob(curPlayer, skillData):
+ continue
+ if not SkillShell.CheckLearnSkillCondition(curPlayer, skillData):
+ continue
+ giveSkill = skillData
+ break
+
+ if not giveSkill:
+ GameWorld.ErrLog("找不到可以给的技能!jobSkillList=%s" % str(jobSkillList))
+ return
+
+ skillTypeID = giveSkill.GetSkillTypeID()
+ skillManager = curPlayer.GetSkillManager()
+ if skillManager.FindSkillBySkillTypeID(skillTypeID):
+ #GameWorld.DebugLog("已经有该技能!")
+ return
+ skillManager.LVUpSkillBySkillTypeID(skillTypeID)
+ GameWorld.DebugLog(" 给玩家技能: skillTypeID=%s" % (skillTypeID), curPlayer.GetID())
+
+ if isPassiveSkill(giveSkill):
+ PassiveBuffEffMng.GetPassiveEffManager().RegistPassiveEff(curPlayer, skillTypeID)
+
+ DataRecordPack.DR_LearnORUPSkill(curPlayer, skillTypeID, skillLV)
+ PlayerControl.PlayerControl(curPlayer).RefreshSkillFightPowerEx(skillTypeID, 0)
+ return
+
## 玩家登录检查学习技能(上线)
# @param curPlayer 当前玩家
# @return None
--
Gitblit v1.8.0