From 5900df874cf9fdcda30e6d84a39773b8a5d398c0 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 11 九月 2018 13:56:59 +0800
Subject: [PATCH] fix:3432【后端】Boss复活新增本次活动“Boss已复活次数”显示
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 8 ++++++--
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py | 6 ++++++
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 8 ++++++--
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerDBGSEvent.py | 2 ++
4 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 2d5268a..8ced94f 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -4420,6 +4420,7 @@
("SubCmd", c_ubyte),
("Point", c_int), # 复活点数
("TotalPoint", c_int), # 复活总点数
+ ("RebornCnt", c_ushort), # 复活次数
]
def __init__(self):
@@ -4438,6 +4439,7 @@
self.SubCmd = 0x08
self.Point = 0
self.TotalPoint = 0
+ self.RebornCnt = 0
return
def GetLength(self):
@@ -4451,13 +4453,15 @@
Cmd:%s,
SubCmd:%s,
Point:%d,
- TotalPoint:%d
+ TotalPoint:%d,
+ RebornCnt:%d
'''\
%(
self.Cmd,
self.SubCmd,
self.Point,
- self.TotalPoint
+ self.TotalPoint,
+ self.RebornCnt
)
return DumpString
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
index 02a3f75..f822b27 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
@@ -911,6 +911,9 @@
PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_BossRebornPoint, updPoint)
if curPoint+addPoint >= totalPoint:
#重生boss
+ rebornCnt = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_BossRebornCnt)
+ PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_BossRebornCnt, rebornCnt+1)
+
killBossCntLimitDict = IpyGameDataPY.GetFuncEvalCfg('KillBossCntLimit', 1, {})
canRebornBossIDList = []
for bidlist, bkey in killBossCntLimitDict.items():
@@ -948,6 +951,8 @@
def ResetBossRebornPoint():
## 重置boss复活点
PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_BossRebornPoint, 0)
+ PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_BossRebornCnt, 0)
+
# 活动开启时设置参数 服务器人数
lvLimit = IpyGameDataPY.GetFuncCfg('ServerActivePlayerCnt')
yesterdayPlayerCnt = len([1 for lv in PyGameData.g_yesterdayPlayerLVDict.values() if lv >= lvLimit]) #参数昨日活跃人数
@@ -999,6 +1004,7 @@
if not totalPoint:
totalPoint = SetBossRebornNeedPoint()
packData.TotalPoint = totalPoint
+ packData.RebornCnt = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_BossRebornCnt)
playerManager = GameWorld.GetPlayerManager()
if not curPlayer:
for i in xrange(playerManager.GetActivePlayerCount()):
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerDBGSEvent.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerDBGSEvent.py
index 9e96568..82917dc 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerDBGSEvent.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerDBGSEvent.py
@@ -146,6 +146,8 @@
Def_BossRebornPoint = "BossRebornPoint"
#boss复活活动参数服务器人数
Def_BRServerPlayerCnt = "BRServerPlayerCnt"
+#boss复活活动已复活次数
+Def_BossRebornCnt = "BossRebornCnt"
## 查找事件
# @param findID 查找的ID
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 2d5268a..8ced94f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -4420,6 +4420,7 @@
("SubCmd", c_ubyte),
("Point", c_int), # 复活点数
("TotalPoint", c_int), # 复活总点数
+ ("RebornCnt", c_ushort), # 复活次数
]
def __init__(self):
@@ -4438,6 +4439,7 @@
self.SubCmd = 0x08
self.Point = 0
self.TotalPoint = 0
+ self.RebornCnt = 0
return
def GetLength(self):
@@ -4451,13 +4453,15 @@
Cmd:%s,
SubCmd:%s,
Point:%d,
- TotalPoint:%d
+ TotalPoint:%d,
+ RebornCnt:%d
'''\
%(
self.Cmd,
self.SubCmd,
self.Point,
- self.TotalPoint
+ self.TotalPoint,
+ self.RebornCnt
)
return DumpString
--
Gitblit v1.8.0