From 22489d3056252bbd7c81fd05b6cce956d4cc736b Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 27 九月 2018 15:50:13 +0800
Subject: [PATCH] 3553 绑玉转盘功能开发 3688【后端】天赋功能开发
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBindJadeWheel.py | 85 ++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py | 31 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 48 ++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 56 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGreatMaster.py | 653 +++++++++++------------------------
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 48 ++
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 56 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini | 28 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 23 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ReGreatMaster.py | 7
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 4
PySysDB/PySysDBPY.h | 9
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 19
16 files changed, 603 insertions(+), 475 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index fcca1bd..75d16ee 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -1269,3 +1269,12 @@
WORD HighestLV; // 推荐最高等级
DWORD Defense; // 推荐防御
};
+
+//天赋技能表
+
+struct tagTalentSkill
+{
+ DWORD _SkillID; //技能ID
+ BYTE TalentType; //天赋类型
+ BYTE Series; //天赋系别
+};
\ No newline at end of file
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index a2e4493..96d39c5 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -10275,6 +10275,54 @@
#------------------------------------------------------
+# A5 17 绑玉转盘开始 #tagCMStartBindJadeWheel
+
+class tagCMStartBindJadeWheel(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA5
+ self.SubCmd = 0x17
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.Cmd = 0xA5
+ self.SubCmd = 0x17
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMStartBindJadeWheel)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A5 17 绑玉转盘开始 //tagCMStartBindJadeWheel:
+ Cmd:%s,
+ SubCmd:%s
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd
+ )
+ return DumpString
+
+
+m_NAtagCMStartBindJadeWheel=tagCMStartBindJadeWheel()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMStartBindJadeWheel.Cmd,m_NAtagCMStartBindJadeWheel.SubCmd))] = m_NAtagCMStartBindJadeWheel
+
+
+#------------------------------------------------------
# A5 11 试用首充武器 #tagCMTryFirstGoldItem
class tagCMTryFirstGoldItem(Structure):
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 77a2b09..e0a7560 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -10269,6 +10269,62 @@
#------------------------------------------------------
+# A3 24 通知绑玉转盘结果 #tagMCBindJadeWheelResult
+
+class tagMCBindJadeWheelResult(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("Index", c_ubyte), # 格子
+ ("Cnt", c_ubyte), #今日已转次数
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA3
+ self.SubCmd = 0x24
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.Cmd = 0xA3
+ self.SubCmd = 0x24
+ self.Index = 0
+ self.Cnt = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCBindJadeWheelResult)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A3 24 通知绑玉转盘结果 //tagMCBindJadeWheelResult:
+ Cmd:%s,
+ SubCmd:%s,
+ Index:%d,
+ Cnt:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.Index,
+ self.Cnt
+ )
+ return DumpString
+
+
+m_NAtagMCBindJadeWheelResult=tagMCBindJadeWheelResult()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCBindJadeWheelResult.Cmd,m_NAtagMCBindJadeWheelResult.SubCmd))] = m_NAtagMCBindJadeWheelResult
+
+
+#------------------------------------------------------
#A3 B7 当日累计攻击boss次数 #tagMCBOSSAttactCnt
class tagMCBossCntInfo(Structure):
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index 0f80fd4..104dba5 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -769,7 +769,8 @@
CDBPlayerRefresh_Danjing, # 丹精
CDBPlayerRefresh_NPCHurtAddPer, # 对怪物伤害加成
CDBPlayerRefresh_FinalHurtPer, # 最终输出伤害百分比
-) = range(146, 190)
+CDBPlayerRefresh_TalentPoint, # 天赋点数 190
+) = range(146, 191)
TYPE_Price_Gold_Paper_Money = 5 # 金钱类型,(先用礼券,再用金子)
TYPE_Price_Family_Contribution = 6 # 战盟贡献度(活跃度转换得来)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
index 9da8278..0cc7f26 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/PyNetPack.ini
@@ -809,19 +809,15 @@
Writer = hxp
Releaser = hxp
RegType = 0
-RegisterPackCount = 3
+RegisterPackCount = 2
PacketCMD_1=0xA5
-PacketSubCMD_1=0x48
-PacketCallFunc_1=OnExchangeMasterExp
+PacketSubCMD_1=0x49
+PacketCallFunc_1=OnAddMasterSkillPoint
PacketCMD_2=0xA5
-PacketSubCMD_2=0x49
-PacketCallFunc_2=OnAddMasterSkillPoint
-
-PacketCMD_3=0xA5
-PacketSubCMD_3=0x50
-PacketCallFunc_3=OnResetMasterSkill
+PacketSubCMD_2=0x50
+PacketCallFunc_2=OnResetMasterSkill
;装备洗练
[EquipWash]
@@ -1315,4 +1311,16 @@
PacketCMD_1=0xA5
PacketSubCMD_1=0x11
-PacketCallFunc_1=OnTryFirstGoldItem
\ No newline at end of file
+PacketCallFunc_1=OnTryFirstGoldItem
+
+;绑玉转盘
+[PlayerBindJadeWheel]
+ScriptName = Player\PlayerBindJadeWheel.py
+Writer = xdh
+Releaser = xdh
+RegType = 0
+RegisterPackCount = 1
+
+PacketCMD_1=0xA5
+PacketSubCMD_1=0x17
+PacketCallFunc_1=OnStartBindJadeWheel
\ No newline at end of file
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 4bafff2..3f66de6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3601,6 +3601,10 @@
Def_PDict_FCPartyCurPoint = "FCPartyCurPoint" #全民来嗨活动当前总点数
Def_PDict_FCPartyAwardRecord = "FCPartyAwardRecord" #全民来嗨活动领奖记录
Def_PDict_FCCostGold = "FCCostGold" # 绝版降临总累计消费仙玉
+
+#绑玉转盘
+Def_PDict_BindJadeWheelCurCnt = "BindJadeWheelCurCnt" # 今日已转次数
+Def_PDict_BindJadeWheelHistoryCnt = "BindJadeWheelHistoryCnt" # 历史已转次数
#-------------------------------------------------------------------------------
#类型 Def_PDictType_OnlinePrize
Def_PDict1_OnlinePrizeCnt = "OnlinePrizeCnt" # 新手在线已领取奖励次数
@@ -4440,13 +4444,14 @@
Def_Cost_DogzEquipPlus, # 神兽装备强化
Def_Cost_RuneHole, # 符印孔解锁
Def_Cost_AlchemyPray, # 丹药祈福
+Def_Cost_ResetGreatMasterSkill, # 重置天赋技能
+Def_Cost_BindJadeWheel, # 绑玉转盘
#-----------以下为暂时没用的,先不删除,如有新增消费点则放在这些之前------------
Def_Cost_RefreshArrestTask, # 刷新悬赏任务
Def_Cost_OffLineExp, # 兑换离线经验
Def_Cost_RefreshTruck, # 刷新镖车
Def_Cost_FinishTruck, # 完成镖车
Def_Cost_RefreshTimeShop, # 刷新神秘商店
-Def_Cost_ResetGreatMasterSkill, # 重置大师技能
Def_Cost_OpenNoble, # 开通贵族
Def_Cost_BuyMergePKCnt, # 购买跨服PK次数
Def_Cost_RecoverMergePKWin, # 恢复跨服PK连胜
@@ -4461,7 +4466,7 @@
Def_Cost_Trade, # 交易
Def_Cost_Rename, # 改名
Def_Cost_SkillLvUp, # 技能升级
-) = range(2000, 2000 + 55)
+) = range(2000, 2000 + 56)
Def_Cost_Reason_SonKey = "reason_name_son" # 消费点原因子类说明key
@@ -4506,7 +4511,7 @@
Def_Cost_FinishTruck:"FinishTruck",
Def_Cost_RefreshArrestTask:"RefreshArrestTask",
Def_Cost_RefreshTimeShop:"RefreshTimeShop",
-Def_Cost_ResetGreatMasterSkill:"ResetGreatMasterSkill",
+Def_Cost_ResetGreatMasterSkill:"ResetTalentSkill",
Def_Cost_BuyMergePKCnt:"BuyMergePKCnt",
Def_Cost_RecoverMergePKWin:"RecoverMergePKWin",
Def_Cost_MergeKingSupport:"MergeKingSupport",
@@ -4544,6 +4549,7 @@
Def_Cost_DogzEquipPlus:"DogzEquipPlus",
Def_Cost_RuneHole:"RuneHole",
Def_Cost_AlchemyPray:"AlchemyPray",
+Def_Cost_BindJadeWheel:"BindJadeWheel",
}
## -----------------------------------------------------
@@ -4574,7 +4580,8 @@
Def_GiveMoney_Trade, # 交易
Def_GiveMoney_Truck, # 运镖
Def_GiveMoney_FreeGoods, # 极品白拿 25
-) = range(1000, 1000 + 25)
+Def_GiveMoney_BindJadeWheel, # 绑玉转盘
+) = range(1000, 1000 + 26)
Def_Give_Reason_SonKey = "reason_name_son" # 原因子类说明key
@@ -4605,6 +4612,7 @@
Def_GiveMoney_Trade:"Trade",
Def_GiveMoney_Truck:"Truck",
Def_GiveMoney_FreeGoods:"FreeGoods",
+Def_GiveMoney_BindJadeWheel:"BindJadeWheel",
}
##==================================================================================================
@@ -4837,7 +4845,8 @@
VIPPrivilege_BOSSHomeKillLimit, #27 BOSS之家疲劳值上限
VIPPrivilege_FMTDouble, #28 封魔坛双倍击杀
VIPPrivilege_29, #29 娲皇遗迹购买次数 - 副本总表统一处理
-) = range(1, 30)
+VIPPrivilege_BindJadeWheel, #30 绑玉转盘次数
+) = range(1, 31)
(
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index a2e4493..96d39c5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -10275,6 +10275,54 @@
#------------------------------------------------------
+# A5 17 绑玉转盘开始 #tagCMStartBindJadeWheel
+
+class tagCMStartBindJadeWheel(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA5
+ self.SubCmd = 0x17
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.Cmd = 0xA5
+ self.SubCmd = 0x17
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMStartBindJadeWheel)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A5 17 绑玉转盘开始 //tagCMStartBindJadeWheel:
+ Cmd:%s,
+ SubCmd:%s
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd
+ )
+ return DumpString
+
+
+m_NAtagCMStartBindJadeWheel=tagCMStartBindJadeWheel()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMStartBindJadeWheel.Cmd,m_NAtagCMStartBindJadeWheel.SubCmd))] = m_NAtagCMStartBindJadeWheel
+
+
+#------------------------------------------------------
# A5 11 试用首充武器 #tagCMTryFirstGoldItem
class tagCMTryFirstGoldItem(Structure):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 77a2b09..e0a7560 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -10269,6 +10269,62 @@
#------------------------------------------------------
+# A3 24 通知绑玉转盘结果 #tagMCBindJadeWheelResult
+
+class tagMCBindJadeWheelResult(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("Index", c_ubyte), # 格子
+ ("Cnt", c_ubyte), #今日已转次数
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA3
+ self.SubCmd = 0x24
+ return
+
+ def ReadData(self, stringData, _pos=0, _len=0):
+ self.Clear()
+ memmove(addressof(self), stringData[_pos:], self.GetLength())
+ return _pos + self.GetLength()
+
+ def Clear(self):
+ self.Cmd = 0xA3
+ self.SubCmd = 0x24
+ self.Index = 0
+ self.Cnt = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCBindJadeWheelResult)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A3 24 通知绑玉转盘结果 //tagMCBindJadeWheelResult:
+ Cmd:%s,
+ SubCmd:%s,
+ Index:%d,
+ Cnt:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.Index,
+ self.Cnt
+ )
+ return DumpString
+
+
+m_NAtagMCBindJadeWheelResult=tagMCBindJadeWheelResult()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCBindJadeWheelResult.Cmd,m_NAtagMCBindJadeWheelResult.SubCmd))] = m_NAtagMCBindJadeWheelResult
+
+
+#------------------------------------------------------
#A3 B7 当日累计攻击boss次数 #tagMCBOSSAttactCnt
class tagMCBossCntInfo(Structure):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ReGreatMaster.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ReGreatMaster.py
index 6065547..21e1ee4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ReGreatMaster.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ReGreatMaster.py
@@ -35,13 +35,12 @@
PlayerGreatMaster.DoResetMasterSkillPoint(curPlayer)
- PlayerGreatMaster.SetCurGreatMasterExp(curPlayer, 0)
- PlayerGreatMaster.SetGreatMasterExpPoint(curPlayer, 0)
+
PlayerGreatMaster.SetGreatMasterFreeSkillPoint(curPlayer, 0)
- PlayerGreatMaster.Sync_GreatMasterExp(curPlayer)
+
PlayerGreatMaster.Sync_GreatMasterFreeSkillPoint(curPlayer)
- GameWorld.DebugAnswer(curPlayer, "重置大师OK!")
+ GameWorld.DebugAnswer(curPlayer, "重置天赋OK!")
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index d8226da..cd11c50 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -1007,6 +1007,12 @@
("WORD", "HighestLV", 0),
("DWORD", "Defense", 0),
),
+
+ "TalentSkill":(
+ ("DWORD", "SkillID", 1),
+ ("BYTE", "TalentType", 0),
+ ("BYTE", "Series", 0),
+ ),
}
@@ -3054,6 +3060,19 @@
def GetLowLV(self): return self.LowLV # 推荐最低等级
def GetHighestLV(self): return self.HighestLV # 推荐最高等级
def GetDefense(self): return self.Defense # 推荐防御
+
+# 天赋技能表
+class IPY_TalentSkill():
+
+ def __init__(self):
+ self.SkillID = 0
+ self.TalentType = 0
+ self.Series = 0
+ return
+
+ def GetSkillID(self): return self.SkillID # 技能ID
+ def GetTalentType(self): return self.TalentType # 天赋类型
+ def GetSeries(self): return self.Series # 天赋系别
def Log(msg, playerID=0, par=0):
@@ -3265,6 +3284,8 @@
self.ipyAllPeoplePartyAwardLen = len(self.ipyAllPeoplePartyAwardCache)
self.ipyMapEventPointCache = self.__LoadFileData("MapEventPoint", IPY_MapEventPoint)
self.ipyMapEventPointLen = len(self.ipyMapEventPointCache)
+ self.ipyTalentSkillCache = self.__LoadFileData("TalentSkill", IPY_TalentSkill)
+ self.ipyTalentSkillLen = len(self.ipyTalentSkillCache)
Log("IPY_FuncConfig count=%s" % len(self.ipyFuncConfigDict))
Log("IPY_DataMgr InitOK!")
return
@@ -3617,6 +3638,8 @@
def GetAllPeoplePartyAwardByIndex(self, index): return self.ipyAllPeoplePartyAwardCache[index]
def GetMapEventPointCount(self): return self.ipyMapEventPointLen
def GetMapEventPointByIndex(self, index): return self.ipyMapEventPointCache[index]
+ def GetTalentSkillCount(self): return self.ipyTalentSkillLen
+ def GetTalentSkillByIndex(self, index): return self.ipyTalentSkillCache[index]
IPYData = IPY_DataMgr()
def IPY_Data(): return IPYData
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
index fc71c73..d29c0e5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -62,7 +62,7 @@
import PlayerActivity
import PlayerTeHui
import FBCommon
-import HighLadderTube
+import PlayerBindJadeWheel
import BossHurtMng
import PlayerAction
import PlayerAttrFruit
@@ -543,6 +543,8 @@
PlayerDogz.OnPlayerLogin(curPlayer)
# 骑宠
FamilyRobBoss.OnPlayerLogin(curPlayer)
+ # 绑玉转盘
+ PlayerBindJadeWheel.OnDay(curPlayer)
# 上线查询一次充值订单
curPlayer.SendDBQueryRecharge()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBindJadeWheel.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBindJadeWheel.py
new file mode 100644
index 0000000..5e9007f
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBindJadeWheel.py
@@ -0,0 +1,85 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#-------------------------------------------------------------------------------
+#
+##@package Player.PlayerBindJadeWheel
+#
+# @todo:绑玉转盘
+# @author xdh
+# @date 2018-09-27
+# @version 1.0
+#
+# 详细描述: 绑玉转盘
+#
+#-------------------------------------------------------------------------------
+#"""Version = 2018-09-27 16:00"""
+#-------------------------------------------------------------------------------
+
+import GameWorld
+import PlayerVip
+import IpyGameDataPY
+import IPY_GameWorld
+import ChPyNetSendPack
+import PlayerControl
+import NetPackCommon
+import ChConfig
+
+
+
+
+def OnDay(curPlayer):
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BindJadeWheelCurCnt, 0)
+ SyncBindJadeWheelResult(curPlayer)
+ return
+
+def OnLogin(curPlayer):
+ SyncBindJadeWheelResult(curPlayer)
+ return
+
+#// A5 17 绑玉转盘开始 #tagCMStartBindJadeWheel
+#
+#struct tagCMStartBindJadeWheel
+#
+#{
+# tagHead Head;
+#};
+def OnStartBindJadeWheel(index, clientData, tick):
+ curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+ maxCnt = PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_BindJadeWheel)
+ curCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BindJadeWheelCurCnt)
+ if curCnt >= maxCnt:
+ GameWorld.DebugLog(' 绑玉转盘次数不足!')
+ return
+ costMoney = IpyGameDataPY.GetFuncCfg('BindJadeWheelCfg')
+ if not PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, costMoney):
+ return
+ historyCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BindJadeWheelHistoryCnt)
+ beSureCountDict = IpyGameDataPY.GetFuncEvalCfg('BindJadeWheelCfg', 4, {})
+ updHistory = historyCnt + 1
+ if updHistory in beSureCountDict:
+ gridNumRateList = beSureCountDict[updHistory]
+ else:
+ gridNumRateList = IpyGameDataPY.GetFuncEvalCfg('BindJadeWheelCfg', 3)
+ gridNum = GameWorld.GetResultByRandomList(gridNumRateList)
+ if not gridNum:
+ GameWorld.ErrLog(' 绑玉转盘 没转出结果 gridNumRateList=%s'%gridNumRateList, curPlayer.GetID())
+ return
+ giveMoney = IpyGameDataPY.GetFuncEvalCfg('BindJadeWheelCfg', 2, {}).get(str(gridNum))
+ if not giveMoney:
+ return
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BindJadeWheelCurCnt, curCnt+1)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BindJadeWheelHistoryCnt, updHistory)
+
+ infoDict = {"giveMoney":giveMoney, "historyCnt":historyCnt, "curCnt":curCnt}
+ PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, costMoney, ChConfig.Def_Cost_BindJadeWheel, infoDict)
+ PlayerControl.GiveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Paper, giveMoney, ChConfig.Def_GiveMoney_BindJadeWheel, isSysHint=False)
+ SyncBindJadeWheelResult(curPlayer, gridNum)
+ return
+
+def SyncBindJadeWheelResult(curPlayer, gridNum=0):
+ sendPack = ChPyNetSendPack.tagMCBindJadeWheelResult()
+ sendPack.Clear()
+ sendPack.Index = gridNum
+ sendPack.Cnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BindJadeWheelCurCnt)
+ NetPackCommon.SendFakePack(curPlayer, sendPack)
+ return
\ No newline at end of file
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
index c417421..e7e2154 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
@@ -58,7 +58,7 @@
import PlayerGoldGift
import PlayerActivity
import PlayerTeHui
-import HighLadderTube
+import PlayerBindJadeWheel
import PlayerAction
import PlayerTruck
import FBCommon
@@ -512,7 +512,8 @@
PlayerGoldGift.OnDay(curPlayer)
#炼丹
PlayerRefineStove.OnDay(curPlayer)
-
+ #绑玉转盘
+ PlayerBindJadeWheel.OnDay(curPlayer)
# 特殊时间点X点过天
elif onEventType == ShareDefine.Def_OnEventTypeEx:
#触发每日任务重置脚本
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGreatMaster.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGreatMaster.py
index 2509871..6ba891d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGreatMaster.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGreatMaster.py
@@ -6,55 +6,46 @@
#
##@package Player.PlayerGreatMaster
#
-# @todo:大师系统
-# @author hxp
-# @date 2015-2-27
-# @version 1.8
+# @todo:天赋系统
+# @author xdh
+# @date 2018-9-26
+# @version 1.0
#
-# @change: "2015-03-05 11:00" hxp 根据大师等级获取大师所需升级经验
-# @change: "2015-03-07 00:00" hxp 天赋buff刷属性时机修改
-# @change: "2015-03-07 04:10" ljd 保存成功系统提示
-# @change: "2015-05-28 14:00" hxp 刷属性优化
-# @change: "2015-07-29 15:20" xdh 大师改成等级开启
-# @change: "2015-08-24 14:40" zqx 增加分配x点天赋点成就
-# @change: "2016-01-26 15:00" hxp PY表支持重读
-# @change: "2016-06-02 20:00" hxp 功能开放逻辑修改
#
-# 详细描述: 大师系统
+# 详细描述: 天赋系统
#
#---------------------------------------------------------------------
-#"""Version = 2016-06-02 20:00"""
+#"""Version = 2018-9-26 20:00"""
import GameWorld
-import PyMapTable
import PlayerControl
import IPY_GameWorld
-import PlayerBillboard
-import ChPyNetSendPack
import DataRecordPack
-import NetPackCommon
-import ReadChConfig
import SkillCommon
import ShareDefine
-import SkillShell
-import BuffSkill
import ChConfig
-import PlayerSuccess
import GameFuncComm
import IpyGameDataPY
+import ItemCommon
## 大师功能是否开启
# @param curPlayer
# @return
def IsGreatMasterOpen(curPlayer):
-# curReinCnt = curPlayer.GetReincarnationLv() # 当前转生次数
-# if curReinCnt < 3:
-# return False
-
if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_GreatMaster):
return False
-
return True
+
+## 登录处理
+# @param curPlayer
+# @return
+def MasterOnLogin(curPlayer):
+ if not IsGreatMasterOpen(curPlayer):
+ return
+
+ Sync_GreatMasterFreeSkillPoint(curPlayer)
+ return
+
## 增加大师天赋点
# @param curPlayer
@@ -67,71 +58,7 @@
SetGreatMasterFreeSkillPoint(curPlayer, curFreeSkillPoint + addPoint)
Sync_GreatMasterFreeSkillPoint(curPlayer)
return
-
-
-## 转生处理
-# @param curPlayer
-# @return
-def OnReincarnation(curPlayer):
- #如果是满级的,则多余经验转移到大师经验
- isFullLV = curPlayer.GetLVEx() >= IpyGameDataPY.GetFuncCfg("PlayerMaxLV") # 玩家已满级
-
- if not isFullLV:
- return
-
- curTotalExp = PlayerControl.GetPlayerTotalExp(curPlayer) # 当前经验
- PlayerControl.SetPlayerTotalExp(curPlayer, 0)
- AddGreatMasterExp(curPlayer, curTotalExp)
- return
-## 登录处理
-# @param curPlayer
-# @return
-def MasterOnLogin(curPlayer):
- if not IsGreatMasterOpen(curPlayer):
- return
-
- Sync_GreatMasterExp(curPlayer)
- Sync_GreatMasterFreeSkillPoint(curPlayer)
- return
-
-## 获取当前大师经验(不算经验点的)
-def GetCurGreatMasterExp(curPlayer):
- return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Master_Exp, 0, ChConfig.Def_PDictType_GreatMaster)
-
-## 设置当前大师经验(不算经验点的)
-def SetCurGreatMasterExp(curPlayer, value):
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Master_Exp, value, ChConfig.Def_PDictType_GreatMaster)
- return
-
-## 获取当前大师经验点
-def GetGreatMasterExpPoint(curPlayer):
- return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Master_ExpPoint, 0, ChConfig.Def_PDictType_GreatMaster)
-
-## 设置当前大师经验点
-def SetGreatMasterExpPoint(curPlayer, value):
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Master_ExpPoint, value, ChConfig.Def_PDictType_GreatMaster)
- return
-
-## 获取当前大师总经验(包含经验点)
-def GetTotalGreatMasterExp(curPlayer):
- masterExp = GetCurGreatMasterExp(curPlayer)
- masterExpPoint = GetGreatMasterExpPoint(curPlayer)
- totalMasterExp = masterExpPoint * ChConfig.Def_PerPointValue + masterExp
- return totalMasterExp
-
-## 设置当前大师总经验(包含经验点)
-def SetTotalGreatMasterExp(curPlayer, totalExp):
- curExp = totalExp % ChConfig.Def_PerPointValue
- expPoint = totalExp / ChConfig.Def_PerPointValue
-
- # 更新大师经验、经验点
- SetCurGreatMasterExp(curPlayer, curExp)
- SetGreatMasterExpPoint(curPlayer, expPoint)
- #GameWorld.DebugLog("SetTotalGreatMasterExp totalExp=%s,expPoint=%s,curExp=%s"
- # % (totalExp, expPoint, curExp), curPlayer.GetPlayerID())
- Sync_GreatMasterExp(curPlayer)
- return
## 获取当前剩余大师技能点
def GetGreatMasterFreeSkillPoint(curPlayer):
@@ -142,161 +69,12 @@
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Master_FreeSkillPoint, value, ChConfig.Def_PDictType_GreatMaster)
return
-## 根据大师等级获取升级所需经验
-# @param masterLV: 大师等级
-# @return: -1-已满级; >=0升级所需经验
-def GetTotalExpByGreatMasterLV(masterLV):
- masterExpTable = PyMapTable.GetPyMapTable("GreatMasterExp")
-
- maxMasterLV = masterExpTable.GetRecordCount() - 1
-
- if masterLV >= maxMasterLV:
- return -1
-
- expInfoList = masterExpTable.GetRecordByIndex(masterLV)
- totalExp = int(expInfoList["Exp"])
-
- return totalExp
-
-## 增加大师等级经验
-# @param curPlayer
-# @param addExp
-# @return 是否成功
-def AddGreatMasterExp(curPlayer, addExp):
- # 取消大师等级
- return
- if not IsGreatMasterOpen(curPlayer):
- return False
-
- #取得人物当前经验
- playerID = curPlayer.GetPlayerID()
- masterLV = curPlayer.GetLV2() # 大师等级, 从0级开始
-
- masterExpTable = PyMapTable.GetPyMapTable("GreatMasterExp")
-
- maxMasterLV = masterExpTable.GetRecordCount() - 1
-
- #GameWorld.DebugLog("增加大师等级经验 addExp=%s,masterLV=%s,maxMasterLV=%s"
- # % (addExp, masterLV, maxMasterLV), playerID)
-
- if masterLV >= maxMasterLV:
- PlayerControl.NotifyCode(curPlayer, "GeRen_admin_825676")
- GameWorld.DebugLog("大师等级已满级!", playerID)
- return False
-
- curTotalMasterExp = GetTotalGreatMasterExp(curPlayer) + addExp
-
- # 先加再处理升级
- SetTotalGreatMasterExp(curPlayer, curTotalMasterExp)
-
- expInfoList = masterExpTable.GetRecordByIndex(masterLV)
- needExp = int(expInfoList["Exp"])
- if needExp <= 0:
- GameWorld.ErrLog("大师升级所需经验配置错误!masterLV=%s,needExp=%s" % (masterLV, needExp), playerID)
- return True
-
- #GameWorld.DebugLog(" expInfoList=%s,needExp=%s,curTotalMasterExp=%s"
- # % (str(expInfoList), needExp, curTotalMasterExp), playerID)
-
- isLVUP = False
- while curTotalMasterExp >= needExp:
- isLVUP = True
- masterLV += 1
- curPlayer.SetLV2(masterLV)
- curTotalMasterExp -= needExp
- #GameWorld.DebugLog(" 大师等级升级needExp=%s,nextMasterLV=%s,curTotalMasterExp=%s"
- # % (needExp, masterLV, curTotalMasterExp), playerID)
-
- # 给大师天赋点
- addSkillPoint = int(expInfoList["AddSkillPoint"])
- curFreeSkillPoint = GetGreatMasterFreeSkillPoint(curPlayer)
- SetGreatMasterFreeSkillPoint(curPlayer, curFreeSkillPoint + addSkillPoint)
-
- # 升级流向
- DataRecordPack.DR_PlayerMasterLVChange(curPlayer, curTotalMasterExp)
-
- # 循环升级
- if masterLV >= maxMasterLV:
- GameWorld.DebugLog(" 循环升级大师等级已满级!", playerID)
- break
-
- expInfoList = masterExpTable.GetRecordByIndex(masterLV)
- needExp = int(expInfoList["Exp"])
- if needExp <= 0:
- GameWorld.DebugLog(" 循环升级下一级经验为0!masterLV=%s" % masterLV, playerID)
- break
-
- # 升级处理
- if isLVUP:
- #GameWorld.DebugLog(" 大师升级处理!", playerID)
- PlayerBillboard.UpdatePlayerLVBillboard(curPlayer)
-
- #重刷所有属性
- PlayerControl.PlayerControl(curPlayer).RefreshAllState()
-
- #将血设置为最大
- curPlayer.SetHP(curPlayer.GetMaxHP())
- curPlayer.SetMP(curPlayer.GetMaxMP())
-
- Sync_GreatMasterFreeSkillPoint(curPlayer)
-
- # 更新剩余总经验
- SetTotalGreatMasterExp(curPlayer, curTotalMasterExp)
- return True
-
-## 同步大师经验
-# @param curPlayer
-# @return
-def Sync_GreatMasterExp(curPlayer):
- masterExpPack = ChPyNetSendPack.tagMCGreatMasterExp()
- masterExpPack.Clear()
- masterExpPack.MasterExpPoint = GetGreatMasterExpPoint(curPlayer)
- masterExpPack.CurMasterEXP = GetCurGreatMasterExp(curPlayer)
- NetPackCommon.SendFakePack(curPlayer, masterExpPack)
- return
-
## 同步大师剩余天赋点
# @param curPlayer
# @return
def Sync_GreatMasterFreeSkillPoint(curPlayer):
- #PlayerControl.NotifyPlayerDictValue(curPlayer, ChConfig.Def_PDict_Master_FreeSkillPoint)
- return
-
-#// A5 48 兑换大师等级经验 #tagCMExchangeMasterEXP
-#
-#struct tagCMExchangeMasterEXP
-#{
-# tagHead Head;
-# BYTE Multiples; // 20亿经验倍数
-# DWORD ExtraExp; // 额外附加经验(不超过20亿)
-#};
-## 兑换大师经验
-# @param index: 玩家索引
-# @param clientData: 封包结构体
-# @param tick: 时间戳
-# @return: None
-def OnExchangeMasterExp(index, clientData, tick):
-
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
-
- if not IsGreatMasterOpen(curPlayer):
- GameWorld.ErrLog("大师功能未开启!不能兑换大师等级经验!", curPlayer.GetPlayerID())
- return
-
- exchangeExp = clientData.Multiples * ChConfig.Def_PerPointValue + clientData.ExtraExp
- curTotalExp = PlayerControl.GetPlayerTotalExp(curPlayer) # 当前经验
-
- actualExchangeExp = min(curTotalExp, exchangeExp)
-
- GameWorld.DebugLog("兑换大师等级经验ExchangeExp=%s" % actualExchangeExp, curPlayer.GetPlayerID())
-
- if actualExchangeExp <= 0:
- return
-
- updTotalExp = curTotalExp - actualExchangeExp
- PlayerControl.SetPlayerTotalExp(curPlayer, updTotalExp)
- AddGreatMasterExp(curPlayer, actualExchangeExp)
+ curPlayer.SendPropertyRefresh(ShareDefine.CDBPlayerRefresh_TalentPoint, GetGreatMasterFreeSkillPoint(curPlayer), False)
return
@@ -321,172 +99,173 @@
# @param tick: 时间戳
# @return: None
def OnAddMasterSkillPoint(index, clientData, tick):
- curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
-
- needAddSkillPointList = clientData.AddSkillPointList
-
- if not needAddSkillPointList:
- return
-
- reqTotalPointSkillDict = ReadChConfig.GetEvalChConfig("ReqTotalPointSkill")
- greatMasterSkillDict = ReadChConfig.GetEvalChConfig("GreatMasterSkill")
- jobType = ChConfig.JOB_TYPE_DICT[curPlayer.GetJob()]
-
- if jobType not in greatMasterSkillDict:
- return
-
- jobMasterSkillDict = greatMasterSkillDict[jobType] # 本职业天赋系对应技能
- reqTotalPointSkillList = reqTotalPointSkillDict.get(jobType, []) # 本职业需求总天赋点技能
-
- skillTypeSeriesDict = {} # 技能对应天赋系
- skillTypeLVDict = {} # 技能对应等级
- seriesTotalPointDict = {} # 天赋系对应总技能点
- allSeriesTotalPoint = 0 # 所有天赋系总点数
-
- # 汇总天赋技能所属天赋系
- for seriesType, skillTypeIDList in jobMasterSkillDict.items():
- for sTypeID in skillTypeIDList:
- skillTypeSeriesDict[sTypeID] = seriesType
-
- skillManager = curPlayer.GetSkillManager()
-
- # 获取玩家目前所有技能
- for i in range(skillManager.GetSkillCount()):
- playerSkill = skillManager.GetSkillByIndex(i)
- if playerSkill == None:
- continue
-
- playerSkillTypeID = playerSkill.GetSkillTypeID()
-
- for seriesType, skillTypeIDList in jobMasterSkillDict.items():
- if playerSkillTypeID not in skillTypeIDList:
- continue
-
- skillLV = playerSkill.GetSkillLV()
- skillTypeLVDict[playerSkillTypeID] = skillLV
- seriesTotalPointDict[seriesType] = seriesTotalPointDict.get(seriesType, 0) + skillLV
- allSeriesTotalPoint += skillLV
- break
-
- isAddSkill = True
- isRefreshAttr = False
- buffType = IPY_GameWorld.btPassiveBuf
- addPointDict = {} # 请求加点技能已执行加点数
-
- GameWorld.DebugLog("【天赋加点】jobType=%s,技能对应等级=%s,天赋系对应总技能点=%s,总点数=%s"
- % (jobType, skillTypeLVDict, seriesTotalPointDict, allSeriesTotalPoint))
-
- while isAddSkill:
- # 每次循环重置状态,直到无法再加技能才跳出
- isAddSkill = False
-
- for addSkill in needAddSkillPointList:
- skillTypeID = addSkill.SkillID
- totalAddPoint = addSkill.AddPoint
-
- freeSkillPoint = GetGreatMasterFreeSkillPoint(curPlayer)
- if freeSkillPoint <= 0:
- GameWorld.DebugLog(" 当前无剩余天赋点!")
- break
-
- if skillTypeID not in skillTypeSeriesDict:
- GameWorld.ErrLog("技能不在合法天赋系里!skillTypeID=%s" % skillTypeID)
- continue
-
- curSeriesType = skillTypeSeriesDict[skillTypeID]
-
- addPoint = addPointDict.get(skillTypeID, 0) # 该技能已执行加点数
-
- # 已经达到请求加的点数,不再处理
- if addPoint >= totalAddPoint:
- #GameWorld.DebugLog(" 已经加到请求加的点数,不再处理!skillTypeID=%s,addPoint=%s" % (skillTypeID, addPoint))
- continue
-
- curSkill = skillManager.FindSkillBySkillTypeID(skillTypeID)
-
- # 未学习
- if not curSkill:
- learnSkillLV = 1
- # 已学习
- else:
- curSkillLV = curSkill.GetSkillLV()
- curSkillMaxLV = curSkill.GetSkillMaxLV()
- if curSkillLV >= curSkillMaxLV:
- GameWorld.DebugLog(" 技能已满级!skillTypeID=%s" % (skillTypeID))
- continue
-
- learnSkillLV = curSkillLV + 1
-
- learnSkillData = GameWorld.GetGameData().FindSkillByType(skillTypeID, learnSkillLV)
-
- if not learnSkillData:
- GameWorld.ErrLog("找不到学习技能数据:skillTypeID=%s,skillLV=%s" % (skillTypeID, learnSkillLV))
- continue
-
- learnSkillID = learnSkillData.GetSkillID()
- skillLearnReq = learnSkillData.GetLearnSkillReq()
- skillLearnReqLV = learnSkillData.GetLearnSkillLV()
- skillLearnSeriesPointReq = learnSkillData.GetLearnSkillPointReq()
-
- # 前置技能点数需求
- reqSkillLV = skillTypeLVDict.get(skillLearnReq, 0)
- if skillLearnReq > 0 and skillTypeLVDict.get(skillLearnReq, 0) < skillLearnReqLV:
- #GameWorld.DebugLog(" 前置技能加点未满足!learnSkillID=%s,[前置技能%s 当前%s点 需%s点]"
- # % (learnSkillID, skillLearnReq, reqSkillLV, skillLearnReqLV))
- continue
-
- # 天赋系点数需求
- if skillLearnSeriesPointReq > 0:
- isReqAllPoint = skillTypeID in reqTotalPointSkillList # 是否需求所有系总点数
-
- # 已加总天赋点数不足
- if isReqAllPoint and allSeriesTotalPoint < skillLearnSeriesPointReq:
- #GameWorld.DebugLog(" 总天赋点数不足!learnSkillID=%s,curPoint=%s,reqPoint=%s"
- # % (learnSkillID, allSeriesTotalPoint, skillLearnSeriesPointReq))
- continue
-
- # 已加本系天赋点数不足
- curSeriesTotalPoint = seriesTotalPointDict.get(curSeriesType, 0)
- if not isReqAllPoint and curSeriesTotalPoint < skillLearnSeriesPointReq:
- #GameWorld.DebugLog(" 本系天赋点数不足!learnSkillID=%s,curSeriesType=%s,curPoint=%s,reqPoint=%s"
- # % (learnSkillID, curSeriesType, curSeriesTotalPoint, skillLearnSeriesPointReq))
- continue
-
- # 可加点, 下面执行该技能加点
- skillManager.LVUpSkillBySkillTypeID(skillTypeID)
- DataRecordPack.DR_LearnORUPSkill(curPlayer, skillTypeID, learnSkillLV)
-
- # 是被动技能要重刷属性
- #if SkillCommon.isPassiveBuffSkill(learnSkillData):
- # BuffSkill.AddBuffNoRefreshState(curPlayer, buffType, learnSkillData, tick, [], curPlayer)
- # isRefreshAttr = True
-
- isAddSkill = True
-
- addPointDict[skillTypeID] = addPoint + 1
- skillTypeLVDict[skillTypeID] = learnSkillLV
- seriesTotalPointDict[curSeriesType] = seriesTotalPointDict.get(curSeriesType, 0) + 1
- allSeriesTotalPoint += 1
- SetGreatMasterFreeSkillPoint(curPlayer, freeSkillPoint - 1)
- # 成就
- #successKey = ChConfig.Def_PDict_Success_CntValue%(ShareDefine.SuccType_TalentPoint, 0)
- #curSuccess = PlayerSuccess.GetPDictValue(curPlayer, successKey)
- #if curSuccess < allSeriesTotalPoint:
- # PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_TalentPoint, 1)
-
- #GameWorld.DebugLog(" 加天赋技能 learnSkillID=%s,skillTypeID=%s,skillLV=%s,doCnt=%s,needCnt=%s"
- # % (learnSkillID, skillTypeID, learnSkillLV, addPoint + 1, totalAddPoint))
-
- #GameWorld.DebugLog(" isAddSkill=%s" % isAddSkill)
-
- if isRefreshAttr:
- curControl = PlayerControl.PlayerControl(curPlayer)
- #curControl.CalcPassiveBuffAttr()
- curControl.RefreshPlayerAttrByBuff()
-
- PlayerControl.NotifyCode(curPlayer, "GeRen_liubo_224510")
- Sync_GreatMasterFreeSkillPoint(curPlayer)
- return
+ return #现版本加点方式不同 使用03 04 玩家学习技能#tagCAddSkillPoint,此处先屏蔽
+# curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
+#
+# needAddSkillPointList = clientData.AddSkillPointList
+#
+# if not needAddSkillPointList:
+# return
+#
+# reqTotalPointSkillDict = ReadChConfig.GetEvalChConfig("ReqTotalPointSkill")
+# greatMasterSkillDict = ReadChConfig.GetEvalChConfig("GreatMasterSkill")
+# jobType = ChConfig.JOB_TYPE_DICT[curPlayer.GetJob()]
+#
+# if jobType not in greatMasterSkillDict:
+# return
+#
+# jobMasterSkillDict = greatMasterSkillDict[jobType] # 本职业天赋系对应技能
+# reqTotalPointSkillList = reqTotalPointSkillDict.get(jobType, []) # 本职业需求总天赋点技能
+#
+# skillTypeSeriesDict = {} # 技能对应天赋系
+# skillTypeLVDict = {} # 技能对应等级
+# seriesTotalPointDict = {} # 天赋系对应总技能点
+# allSeriesTotalPoint = 0 # 所有天赋系总点数
+#
+# # 汇总天赋技能所属天赋系
+# for seriesType, skillTypeIDList in jobMasterSkillDict.items():
+# for sTypeID in skillTypeIDList:
+# skillTypeSeriesDict[sTypeID] = seriesType
+#
+# skillManager = curPlayer.GetSkillManager()
+#
+# # 获取玩家目前所有技能
+# for i in range(skillManager.GetSkillCount()):
+# playerSkill = skillManager.GetSkillByIndex(i)
+# if playerSkill == None:
+# continue
+#
+# playerSkillTypeID = playerSkill.GetSkillTypeID()
+#
+# for seriesType, skillTypeIDList in jobMasterSkillDict.items():
+# if playerSkillTypeID not in skillTypeIDList:
+# continue
+#
+# skillLV = playerSkill.GetSkillLV()
+# skillTypeLVDict[playerSkillTypeID] = skillLV
+# seriesTotalPointDict[seriesType] = seriesTotalPointDict.get(seriesType, 0) + skillLV
+# allSeriesTotalPoint += skillLV
+# break
+#
+# isAddSkill = True
+# isRefreshAttr = False
+# buffType = IPY_GameWorld.btPassiveBuf
+# addPointDict = {} # 请求加点技能已执行加点数
+#
+# GameWorld.DebugLog("【天赋加点】jobType=%s,技能对应等级=%s,天赋系对应总技能点=%s,总点数=%s"
+# % (jobType, skillTypeLVDict, seriesTotalPointDict, allSeriesTotalPoint))
+#
+# while isAddSkill:
+# # 每次循环重置状态,直到无法再加技能才跳出
+# isAddSkill = False
+#
+# for addSkill in needAddSkillPointList:
+# skillTypeID = addSkill.SkillID
+# totalAddPoint = addSkill.AddPoint
+#
+# freeSkillPoint = GetGreatMasterFreeSkillPoint(curPlayer)
+# if freeSkillPoint <= 0:
+# GameWorld.DebugLog(" 当前无剩余天赋点!")
+# break
+#
+# if skillTypeID not in skillTypeSeriesDict:
+# GameWorld.ErrLog("技能不在合法天赋系里!skillTypeID=%s" % skillTypeID)
+# continue
+#
+# curSeriesType = skillTypeSeriesDict[skillTypeID]
+#
+# addPoint = addPointDict.get(skillTypeID, 0) # 该技能已执行加点数
+#
+# # 已经达到请求加的点数,不再处理
+# if addPoint >= totalAddPoint:
+# #GameWorld.DebugLog(" 已经加到请求加的点数,不再处理!skillTypeID=%s,addPoint=%s" % (skillTypeID, addPoint))
+# continue
+#
+# curSkill = skillManager.FindSkillBySkillTypeID(skillTypeID)
+#
+# # 未学习
+# if not curSkill:
+# learnSkillLV = 1
+# # 已学习
+# else:
+# curSkillLV = curSkill.GetSkillLV()
+# curSkillMaxLV = curSkill.GetSkillMaxLV()
+# if curSkillLV >= curSkillMaxLV:
+# GameWorld.DebugLog(" 技能已满级!skillTypeID=%s" % (skillTypeID))
+# continue
+#
+# learnSkillLV = curSkillLV + 1
+#
+# learnSkillData = GameWorld.GetGameData().FindSkillByType(skillTypeID, learnSkillLV)
+#
+# if not learnSkillData:
+# GameWorld.ErrLog("找不到学习技能数据:skillTypeID=%s,skillLV=%s" % (skillTypeID, learnSkillLV))
+# continue
+#
+# learnSkillID = learnSkillData.GetSkillID()
+# skillLearnReq = learnSkillData.GetLearnSkillReq()
+# skillLearnReqLV = learnSkillData.GetLearnSkillLV()
+# skillLearnSeriesPointReq = learnSkillData.GetLearnSkillPointReq()
+#
+# # 前置技能点数需求
+# reqSkillLV = skillTypeLVDict.get(skillLearnReq, 0)
+# if skillLearnReq > 0 and skillTypeLVDict.get(skillLearnReq, 0) < skillLearnReqLV:
+# #GameWorld.DebugLog(" 前置技能加点未满足!learnSkillID=%s,[前置技能%s 当前%s点 需%s点]"
+# # % (learnSkillID, skillLearnReq, reqSkillLV, skillLearnReqLV))
+# continue
+#
+# # 天赋系点数需求
+# if skillLearnSeriesPointReq > 0:
+# isReqAllPoint = skillTypeID in reqTotalPointSkillList # 是否需求所有系总点数
+#
+# # 已加总天赋点数不足
+# if isReqAllPoint and allSeriesTotalPoint < skillLearnSeriesPointReq:
+# #GameWorld.DebugLog(" 总天赋点数不足!learnSkillID=%s,curPoint=%s,reqPoint=%s"
+# # % (learnSkillID, allSeriesTotalPoint, skillLearnSeriesPointReq))
+# continue
+#
+# # 已加本系天赋点数不足
+# curSeriesTotalPoint = seriesTotalPointDict.get(curSeriesType, 0)
+# if not isReqAllPoint and curSeriesTotalPoint < skillLearnSeriesPointReq:
+# #GameWorld.DebugLog(" 本系天赋点数不足!learnSkillID=%s,curSeriesType=%s,curPoint=%s,reqPoint=%s"
+# # % (learnSkillID, curSeriesType, curSeriesTotalPoint, skillLearnSeriesPointReq))
+# continue
+#
+# # 可加点, 下面执行该技能加点
+# skillManager.LVUpSkillBySkillTypeID(skillTypeID)
+# DataRecordPack.DR_LearnORUPSkill(curPlayer, skillTypeID, learnSkillLV)
+#
+# # 是被动技能要重刷属性
+# #if SkillCommon.isPassiveBuffSkill(learnSkillData):
+# # BuffSkill.AddBuffNoRefreshState(curPlayer, buffType, learnSkillData, tick, [], curPlayer)
+# # isRefreshAttr = True
+#
+# isAddSkill = True
+#
+# addPointDict[skillTypeID] = addPoint + 1
+# skillTypeLVDict[skillTypeID] = learnSkillLV
+# seriesTotalPointDict[curSeriesType] = seriesTotalPointDict.get(curSeriesType, 0) + 1
+# allSeriesTotalPoint += 1
+# SetGreatMasterFreeSkillPoint(curPlayer, freeSkillPoint - 1)
+# # 成就
+# #successKey = ChConfig.Def_PDict_Success_CntValue%(ShareDefine.SuccType_TalentPoint, 0)
+# #curSuccess = PlayerSuccess.GetPDictValue(curPlayer, successKey)
+# #if curSuccess < allSeriesTotalPoint:
+# # PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_TalentPoint, 1)
+#
+# #GameWorld.DebugLog(" 加天赋技能 learnSkillID=%s,skillTypeID=%s,skillLV=%s,doCnt=%s,needCnt=%s"
+# # % (learnSkillID, skillTypeID, learnSkillLV, addPoint + 1, totalAddPoint))
+#
+# #GameWorld.DebugLog(" isAddSkill=%s" % isAddSkill)
+#
+# if isRefreshAttr:
+# curControl = PlayerControl.PlayerControl(curPlayer)
+# #curControl.CalcPassiveBuffAttr()
+# curControl.RefreshPlayerAttrByBuff()
+#
+# PlayerControl.NotifyCode(curPlayer, "GeRen_liubo_224510")
+# Sync_GreatMasterFreeSkillPoint(curPlayer)
+# return
#// A5 50 重置大师天赋技能 #tagCMResetMasterSkill
@@ -502,57 +281,49 @@
# @return: None
def OnResetMasterSkill(index, clientData, tick):
curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
- ResetMasterSkillCost = ReadChConfig.GetEvalChConfig("ResetMasterSkillCost")
-
+ needItemID = IpyGameDataPY.GetFuncCfg('TalentResetBook')
+ costMoney = IpyGameDataPY.GetFuncCfg('TalentResetBook', 2)
moneyType = IPY_GameWorld.TYPE_Price_Gold_Money
-
- if not PlayerControl.HaveMoney(curPlayer, moneyType, ResetMasterSkillCost):
- return
+ itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
+ hasEnough, itemList = ItemCommon.GetItem_FromPack_ByID(needItemID, itemPack, 1)
+ if not hasEnough:
+ #道具不足,扣钱
+ if not PlayerControl.HaveMoney(curPlayer, moneyType, costMoney):
+ return
if not DoResetMasterSkillPoint(curPlayer):
return
-
- # 扣除消耗
- PlayerControl.PayMoney(curPlayer, moneyType, ResetMasterSkillCost, ChConfig.Def_Cost_ResetGreatMasterSkill)
+ if hasEnough:
+ ItemCommon.ReduceItem(curPlayer, itemPack, itemList, 1, False)
+ else:
+ PlayerControl.PayMoney(curPlayer, moneyType, costMoney, ChConfig.Def_Cost_ResetGreatMasterSkill)
return
## 重置大师天赋技能
# @param curPlayer
# @return: 是否成功
def DoResetMasterSkillPoint(curPlayer):
- greatMasterSkillDict = ReadChConfig.GetEvalChConfig("GreatMasterSkill")
- jobType = ChConfig.JOB_TYPE_DICT[curPlayer.GetJob()]
-
- if jobType not in greatMasterSkillDict:
- return False
-
- jobMasterSkillDict = greatMasterSkillDict[jobType] # 本职业天赋系对应技能
-
freeSkillPoint = GetGreatMasterFreeSkillPoint(curPlayer)
resetPoint = 0
skillManager = curPlayer.GetSkillManager()
isRefreshAttr = False
-
- # 汇总天赋技能所属天赋系
- for skillTypeIDList in jobMasterSkillDict.values():
+ for i in range(0, skillManager.GetSkillCount()):
+ skill = skillManager.GetSkillByIndex(i)
+ if skill == None:
+ continue
+ skillTypeID = skill.GetSkillTypeID()
+ if not IpyGameDataPY.GetIpyGameDataNotLog('TalentSkill', skillTypeID):
+ continue
+ curSkillLV = skill.GetSkillLV()
+ # 被动技能刷属性
+ if SkillCommon.isPassiveSkill(skill):
+ isRefreshAttr = True
- for skillTypeID in skillTypeIDList:
- curSkill = skillManager.FindSkillBySkillTypeID(skillTypeID)
-
- if not curSkill:
- continue
-
- curSkillLV = curSkill.GetSkillLV()
-
- # 被动技能刷属性
- if SkillCommon.isPassiveSkill(curSkill):
- isRefreshAttr = True
-
- resetPoint += curSkillLV
-
- skillManager.DeleteSkillBySkillTypeID(skillTypeID)
+ resetPoint += curSkillLV
+
+ skillManager.DeleteSkillBySkillTypeID(skillTypeID)
if resetPoint <= 0:
GameWorld.DebugLog("不需要重置技能天赋!")
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index 0f80fd4..104dba5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -769,7 +769,8 @@
CDBPlayerRefresh_Danjing, # 丹精
CDBPlayerRefresh_NPCHurtAddPer, # 对怪物伤害加成
CDBPlayerRefresh_FinalHurtPer, # 最终输出伤害百分比
-) = range(146, 190)
+CDBPlayerRefresh_TalentPoint, # 天赋点数 190
+) = range(146, 191)
TYPE_Price_Gold_Paper_Money = 5 # 金钱类型,(先用礼券,再用金子)
TYPE_Price_Family_Contribution = 6 # 战盟贡献度(活跃度转换得来)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
index 99e5fb4..9dd33bc 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -36,7 +36,7 @@
import ShareDefine
import PlayerGodWeapon
import PlayerSuccess
-import PlayerMagicWeapon
+import PlayerGreatMaster
import PlayerHorse
import GameObj
import random
@@ -47,6 +47,7 @@
import PassiveBuffEffMng
import SkillShell
import FBCommon
+import IpyGameDataPY
#---------------------------------------------------------------------
GameWorld.ImportAll("Script\\Skill\\" , "GameSkills")
GameWorld.ImportAll("Script\\Skill\\" , "GameBuffs")
@@ -1849,7 +1850,10 @@
if upSkill.GetFuncType() == ChConfig.Def_SkillFuncType_HorseSkill:
if not PlayerHorse.CheckLearnHorseSkill(curPlayer, curSkillTypeID):
return False
-
+ #天赋技学习点数判断
+ if upSkill.GetFuncType() == ChConfig.Def_SkillFuncType_GiftSkill:
+ if not PlayerGreatMaster.GetGreatMasterFreeSkillPoint(curPlayer):
+ return False
#经验检测
skillLvUpNeedExp = upSkill.GetLVUpCostExp()
@@ -1913,6 +1917,8 @@
#GeRen_jin_474794 <n color="255,255,0" BKCOLOR="0,0,0">您消耗了经验值:</n><n color="0,190,255" BKCOLOR="0,0,0">{%S1%}</n>
PlayerControl.NotifyCode(curPlayer, "GeRen_jin_474794", [skillLvUpNeedExp])
+ if upSkill.GetFuncType() == ChConfig.Def_SkillFuncType_GiftSkill:
+ PlayerGreatMaster.AddGreatMasterSkillPointByLV(curPlayer, -1)
return True
#---------------------------------------------------------------------
##检测学习技能需求条件
@@ -1944,7 +1950,11 @@
#当前技能前置技能需求,前置技能等级需求
curSkillLearnReq = curSkill.GetLearnSkillReq()
lvCurSkillLearnReq = curSkill.GetLearnSkillLV()
-
+ #需要对应天赋系别点数
+ learnSkillPointReq = curSkill.GetLearnSkillPointReq()
+ needSeries, needSeriesPoint= learnSkillPointReq/10000, learnSkillPointReq%10000
+ ipyData = IpyGameDataPY.GetIpyGameDataNotLog('TalentSkill', curSkill.GetSkillTypeID())
+ curTalentType = ipyData.GetTalentType() if ipyData else 0
#获取玩家目前所有技能
for i in range(0, skillManager.GetSkillCount()):
skill = skillManager.GetSkillByIndex(i)
@@ -1961,9 +1971,10 @@
#满足前置技能需求
if skillTypeID == curSkillLearnReq and lvSkill >= lvCurSkillLearnReq and not hasLearnSkillReq:
hasLearnSkillReq = True
-
- #投入分支点总和
- numLearnSkillPoint += skill.GetSkillLV()
+ ipyData = IpyGameDataPY.GetIpyGameDataNotLog('TalentSkill', skillTypeID)
+ if ipyData and ipyData.GetTalentType() is curTalentType and ipyData.GetSeries() is needSeries:
+ #投入分支点总和
+ numLearnSkillPoint += skill.GetSkillLV()
#有前置技能ID需要
if curSkillLearnReq != 0 and not hasLearnSkillReq:
@@ -1975,10 +1986,10 @@
# PlayerControl.NotifyCode(curPlayer, "UseMagicLost15", [ curSkillStateReq, lvCurSkillStateReq ])
# return False
-# #有分支点总和要求
-# if curSkill.GetLearnSkillPointReq() != 0 and numLearnSkillPoint < curSkill.GetLearnSkillPointReq():
-# PlayerControl.NotifyCode( curPlayer, "UseMagicLost13",[ curSkill.GetLearnSkillPointReq() ] )
-# return False
+ #有分支点总和要求
+ if learnSkillPointReq != 0 and numLearnSkillPoint < needSeriesPoint:
+ PlayerControl.NotifyCode( curPlayer, "UseMagicLost13",[ needSeriesPoint ] )
+ return False
return True
--
Gitblit v1.8.0