From bcdc9a6cf4da4c82e458b3c4232391a7a0ff9f90 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 11 十月 2018 11:56:51 +0800
Subject: [PATCH] 4142 【后端】仙魔之争增加一个超级机器人
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py | 2 +-
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerXMZZ.py | 8 ++++++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGreatMaster.py | 10 ++++++----
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py | 2 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 11 ++++++++---
5 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerXMZZ.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerXMZZ.py
index 4dea3c3..75f7fc5 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerXMZZ.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerXMZZ.py
@@ -628,11 +628,15 @@
isRobotNPC = True
pkDataDict = {}
conWinCnt = XMZZPlayerDict[myPlayerID].ConWinCnt #参数
- XMZZSpecialNPCRate = eval(IpyGameDataPY.GetFuncCfg('XMZZSpecialNPCRate'))
+ XMZZSpecialNPCRate = eval(IpyGameDataPY.GetFuncCompileCfg('XMZZSpecialNPCRate'))
+ XMZZSuperNPCRate = eval(IpyGameDataPY.GetFuncCompileCfg('XMZZSpecialNPCRate', 2))
XMZZNPCByLVPowerList = IpyGameDataPY.GetFuncEvalCfg('XMZZPKPowerRange', 2)
isByLVPower = conWinCnt + 1 in XMZZNPCByLVPowerList #是否按等级表战力来随机范围
+ if GameWorld.CanHappen(XMZZSuperNPCRate):
+ GameWorld.DebugLog(' 筛选对手 超级机器人 XMZZSuperNPCRate=%s' % (XMZZSuperNPCRate))
+ pkPlayerID = 2
- if not isByLVPower and GameWorld.CanHappen(XMZZSpecialNPCRate):
+ elif not isByLVPower and GameWorld.CanHappen(XMZZSpecialNPCRate):
GameWorld.DebugLog(' 筛选对手 高级机器人 XMZZSpecialNPCRate=%s' % (XMZZSpecialNPCRate))
#机器人ID规则: ID从0~n, n不大于机器人ID列表长度, ID越大机器人越高级,根据策划需求自增
#高级机器人
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index a8efaf8..557b029 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -834,6 +834,7 @@
GameFuncID_Official = 12 # 官爵,境界
GameFuncID_Family = 15 # 战盟,仙盟
GameFuncID_GodWeapon = 20 # 神器
+GameFuncID_Talent = 28 # 天赋
GameFuncID_RefineExp = 60 # 经验炼制,祈愿
GameFuncID_RefineMoney = 61 # 金币炼制,祈愿
GameFuncID_WorldLV = 71 # 世界等级
@@ -849,7 +850,6 @@
GameFuncID_OSSail = 132 # 开服特惠
GameFuncID_HorsePetRobBoss = 139# 骑宠争夺
# 以下为暂时无用的
-GameFuncID_GreatMaster = 28 # 大师
GameFuncID_Truck = 33 # 运镖
GameFuncID_RunDaily = 34 # 日常跑环
GameFuncID_RunFamily = 53 # 战盟跑环
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index 1437f70..5f3d516 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -3740,7 +3740,7 @@
#未达到升级经验
if curTotalExp < lvUpNeedExp:
return
-
+ needSyncTalentPoint = False
playerNeedDoLVUp = False
curLV = curPlayer.GetLV()
maxLV = IpyGameDataPY.GetFuncCfg("PlayerMaxLV", 1)
@@ -3781,7 +3781,10 @@
lvIpyData = GetPlayerLVIpyData(curPlayer.GetLV())
# 大师天赋点
if lvIpyData:
- PlayerGreatMaster.AddGreatMasterSkillPointByLV(curPlayer, lvIpyData.GetTalentPoint())
+ addTalentPoint = lvIpyData.GetTalentPoint()
+ if addTalentPoint:
+ needSyncTalentPoint = True
+ PlayerGreatMaster.AddGreatMasterSkillPointByLV(curPlayer, addTalentPoint)
EventShell.EventResponse_LVUp(curPlayer) # 升级触发事件
@@ -3830,7 +3833,9 @@
# NotifyCode(curPlayer, "GeRen_liubo_127574")
#===================================================================
-
+ # 天赋点通知
+ if needSyncTalentPoint:
+ PlayerGreatMaster.Sync_GreatMasterFreeSkillPoint(curPlayer)
# 升级需要执行的游戏功能处理
GameFuncComm.DoFuncOpenLogic(curPlayer)
ChEquip.CalcEquips_OutOfPrint(curPlayer) # 缓存绝版属性
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 6ba891d..cedbc3d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGreatMaster.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGreatMaster.py
@@ -32,7 +32,7 @@
# @param curPlayer
# @return
def IsGreatMasterOpen(curPlayer):
- if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_GreatMaster):
+ if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_Talent):
return False
return True
@@ -54,7 +54,7 @@
if not addPoint:
return
curFreeSkillPoint = GetGreatMasterFreeSkillPoint(curPlayer)
- #GameWorld.DebugLog("大师天赋点!curFreeSkillPoint = %s"%curFreeSkillPoint)
+ GameWorld.DebugLog("大师天赋点!curFreeSkillPoint = %s"%curFreeSkillPoint)
SetGreatMasterFreeSkillPoint(curPlayer, curFreeSkillPoint + addPoint)
Sync_GreatMasterFreeSkillPoint(curPlayer)
return
@@ -309,8 +309,10 @@
skillManager = curPlayer.GetSkillManager()
isRefreshAttr = False
+ delCnt = 0
for i in range(0, skillManager.GetSkillCount()):
- skill = skillManager.GetSkillByIndex(i)
+ dataIndex = i-delCnt
+ skill = skillManager.GetSkillByIndex(dataIndex)
if skill == None:
continue
skillTypeID = skill.GetSkillTypeID()
@@ -322,8 +324,8 @@
isRefreshAttr = True
resetPoint += curSkillLV
-
skillManager.DeleteSkillBySkillTypeID(skillTypeID)
+ delCnt +=1
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 a8efaf8..557b029 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -834,6 +834,7 @@
GameFuncID_Official = 12 # 官爵,境界
GameFuncID_Family = 15 # 战盟,仙盟
GameFuncID_GodWeapon = 20 # 神器
+GameFuncID_Talent = 28 # 天赋
GameFuncID_RefineExp = 60 # 经验炼制,祈愿
GameFuncID_RefineMoney = 61 # 金币炼制,祈愿
GameFuncID_WorldLV = 71 # 世界等级
@@ -849,7 +850,6 @@
GameFuncID_OSSail = 132 # 开服特惠
GameFuncID_HorsePetRobBoss = 139# 骑宠争夺
# 以下为暂时无用的
-GameFuncID_GreatMaster = 28 # 大师
GameFuncID_Truck = 33 # 运镖
GameFuncID_RunDaily = 34 # 日常跑环
GameFuncID_RunFamily = 53 # 战盟跑环
--
Gitblit v1.8.0