From a4e9d95f1afee7c045a78e1bed3ede1867eb3a87 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 08 三月 2019 16:33:40 +0800
Subject: [PATCH] 6291 【后端】【2.0】限时仙盟boss
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianBoss.py | 2
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py | 6
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_EnterFB.py | 2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py | 5
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFB.py | 10
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 52 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyGameData.py | 2
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 52 +++
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerDBGSEvent.py | 2
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py | 6
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_AllFamilyBoss.py | 587 +++++++++++++++++++++++++++++++++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py | 23 +
ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py | 2
PySysDB/PySysDBPY.h | 9
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyBoss.py | 54 +++
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py | 5
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py | 7
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 6
19 files changed, 826 insertions(+), 10 deletions(-)
diff --git a/PySysDB/PySysDBPY.h b/PySysDB/PySysDBPY.h
index 47bd40a..c4308b7 100644
--- a/PySysDB/PySysDBPY.h
+++ b/PySysDB/PySysDBPY.h
@@ -1816,4 +1816,13 @@
WORD NeedPlusLV; //需要强化等级
dict CostItem; //消耗材料
dict Attr; //属性
+};
+
+//仙盟Boss奖励表
+
+struct tagFamilyBossAward
+{
+ list WorldLV; //世界等级
+ list Rank; //排名
+ list Award; //奖励 [[独立概率万分率,[物品ID,数量,拍品分组]],..]
};
\ No newline at end of file
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py b/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py
index ea753ec..aca4e02 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChConfig.py
@@ -675,6 +675,8 @@
Def_FBMapID_XMZZ = 31010
#仙盟boss副本
Def_FBMapID_FamilyBossMap = 31210
+#多仙盟Boss
+Def_FBMapID_AllFamilyBoss = 31260
#宗门试炼
Def_FBMapID_MunekadoTrial = 60010
#混乱妖域
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 2e830ca..ae970d5 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -899,6 +899,58 @@
#------------------------------------------------------
+# A4 0C 多仙盟boss活动信息 #tagGCAllFamilyBossInfo
+
+class tagGCAllFamilyBossInfo(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("IsEnd", c_ubyte), # 是否已结束
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA4
+ self.SubCmd = 0x0C
+ 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 = 0xA4
+ self.SubCmd = 0x0C
+ self.IsEnd = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagGCAllFamilyBossInfo)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A4 0C 多仙盟boss活动信息 //tagGCAllFamilyBossInfo:
+ Cmd:%s,
+ SubCmd:%s,
+ IsEnd:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.IsEnd
+ )
+ return DumpString
+
+
+m_NAtagGCAllFamilyBossInfo=tagGCAllFamilyBossInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCAllFamilyBossInfo.Cmd,m_NAtagGCAllFamilyBossInfo.SubCmd))] = m_NAtagGCAllFamilyBossInfo
+
+
+#------------------------------------------------------
# A4 0A 假仙盟信息 #tagGCFakeFamilyInfo
class tagGCFakeFamilyInfo(Structure):
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
index 70206b0..52e3fc7 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
@@ -35,6 +35,7 @@
import PlayerNewFairyCeremony
import PlayerUniversalGameRec
import GameWorldAverageLv
+import PlayerFamilyBoss
import GameWorldProcess
import ChPyNetSendPack
import NetPackCommon
@@ -1265,6 +1266,11 @@
#跨服PK
elif dictName == ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_CrossReamPK:
CrossRealmPK.OnCrossRealmPKDailyActionStateChange(isOpen)
+ #仙盟BOSS
+ elif dictName in [ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilyBoss1,
+ ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilyBoss2,]:
+ PlayerFamilyBoss.OnAllFamilyBossStateChange(isOpen)
+
return
#-------------------------------------------------------------------------------
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerDBGSEvent.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerDBGSEvent.py
index 08fdb5b..a5e0e3d 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerDBGSEvent.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerDBGSEvent.py
@@ -150,6 +150,8 @@
Def_BRServerPlayerCnt = "BRServerPlayerCnt"
#boss复活活动已复活次数
Def_BossRebornCnt = "BossRebornCnt"
+#多仙盟Boss击杀时间
+Def_AllFamilyBossTime = "AllFamilyBossTime"
#跨服服务器是否维护中
Def_CrossServerClose = "CrossServerClose"
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFB.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFB.py
index 9436b24..a5e4bc4 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFB.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFB.py
@@ -25,6 +25,7 @@
import PlayerControl
import PyGameData
import IpyGameDataPY
+import PlayerDBGSEvent
import PlayerTeam
import GameWorld
import ChConfig
@@ -121,7 +122,14 @@
if curPlayer.GetFamilyID() in PyGameData.g_swrhJoinRecord:
PlayerControl.NotifyCode(curPlayer, "TheEmperor1")
return
-
+ #多仙盟BOSS 是否已结束
+ elif tagMapID == ChConfig.Def_FBMapID_AllFamilyBoss:
+ if not PlayerFamilyBoss.IsInAllFamilyBoss(tagLineID):
+ #活动未开启
+ return
+ if PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_AllFamilyBossTime):
+ #BOSS已被击杀
+ return
# MapServer_QueryPlayer(int srcPlayerID, int queryType, int queryID, int mapID, char *callName, char *cmd,WORD cmdLen, int RouteServerIndex)
playerManager.MapServer_QueryPlayer(curPlayer.GetPlayerID(), ChConfig.queryType_EnterFB, 0, tagMapID,
queryCallName, sendCMD, len(sendCMD), curPlayer.GetRouteServerIndex())
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py
index fa5e8f3..71cff36 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py
@@ -1423,6 +1423,9 @@
if GameWorld.GetGameWorld().GetDictByKey(ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilyRobBoss):
PlayerControl.NotifyCode(curPlayer, "FairyGrabBossExitError")
return
+ if PlayerFamilyBoss.IsInAllFamilyBoss():
+ PlayerControl.NotifyCode(curPlayer, "LeagueBOSSExitError1")
+ return
tagPlayerName = curTagMember.GetName() # 被踢玩家名
tagPlayerID = curTagMember.GetPlayerID() # 被踢玩家ID
@@ -1502,6 +1505,9 @@
if GameWorld.GetGameWorld().GetDictByKey(ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilyRobBoss):
PlayerControl.NotifyCode(curPlayer, "FairyGrabBossExitError")
return
+ if PlayerFamilyBoss.IsInAllFamilyBoss():
+ PlayerControl.NotifyCode(curPlayer, "LeagueBOSSExitError1")
+ return
#判断退出时间间隔
curTime = int(time.time())
lastLeaveFamilyTime = PlayerControl.GetLeaveFamilyTime(curPlayer)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyBoss.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyBoss.py
index 23c4a01..cf6a2cf 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyBoss.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyBoss.py
@@ -24,6 +24,8 @@
import NetPackCommon
import ShareDefine
import IpyGameDataPY
+import PlayerDBGSEvent
+import PlayerControl
import ChConfig
import time
@@ -88,6 +90,7 @@
# @return None
def OnLogin(curPlayer):
NotifyFamilyBossFBInfo(curPlayer)
+ NotifyAllFamilyBossState(curPlayer)
return
@@ -272,4 +275,55 @@
+#############################多仙盟BOSS#############################
+def OnAllFamilyBossStateChange(isOpen):
+ if isOpen:
+ #本次开启时间距离上次击杀时间超过1小时则重置
+ lastKillTime = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_AllFamilyBossTime)
+ curTime = int(time.time())
+ if abs(curTime-lastKillTime)> 3600:
+ PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_AllFamilyBossTime, 0)
+ #通知
+ NotifyAllFamilyBossState()
+ return
+
+def AllFamilyBossKilled():
+ if PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_AllFamilyBossTime):
+ GameWorld.Log('多仙盟Boss已被击杀,不可重复!!')
+ return
+ curTime = int(time.time())
+ PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_AllFamilyBossTime, curTime)
+ GameWorld.Log('多仙盟Boss被击杀!!')
+ NotifyAllFamilyBossState()
+ return
+
+def NotifyAllFamilyBossState(curPlayer=None):
+ lastKillTime = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_AllFamilyBossTime)
+ bossInfo = ChPyNetSendPack.tagGCAllFamilyBossInfo()
+ bossInfo.IsEnd = 1 if lastKillTime else 0
+
+ if curPlayer == None:
+ playerManager = GameWorld.GetPlayerManager()
+ for i in xrange(playerManager.GetActivePlayerCount()):
+ curPlayer = playerManager.GetActivePlayerAt(i)
+ if curPlayer == None or not curPlayer.GetInitOK():
+ continue
+ if PlayerControl.GetIsTJG(curPlayer):
+ continue
+ NetPackCommon.SendFakePack(curPlayer, bossInfo)
+ else:
+ if PlayerControl.GetIsTJG(curPlayer):
+ return
+ NetPackCommon.SendFakePack(curPlayer, bossInfo)
+ return
+
+#是否在仙盟BOSS活动中
+def IsInAllFamilyBoss(lineID=-1):
+ state1 = GameWorld.GetGameWorld().GetDictByKey(ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilyBoss1)
+ state2 = GameWorld.GetGameWorld().GetDictByKey(ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilyBoss2)
+ if lineID == 0:
+ return state1
+ elif lineID == 1:
+ return state2
+ return state1 or state2
\ No newline at end of file
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py
index 6087b91..49df025 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerQuery.py
@@ -851,6 +851,10 @@
if callName =="AddBossRebornPoint":
GameWorldBoss.AddBossRebornPoint(eval(resultName))
return
+ #多仙盟BOSS结束
+ if callName =="AllFamilyBossOver":
+ PlayerFamilyBoss.AllFamilyBossKilled()
+ return
#---return分割线-----------------------------------------------------------------
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index 4a57ddb..8c72982 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -1536,8 +1536,9 @@
DailyActionID_IceLode, # 冰晶矿脉
DailyActionID_HelpBattleCheckIn, # 助战登记 20
DailyActionID_CrossReamPK, # 跨服PK 21
-DailyActionID_ZhuXianBoss, # 诛仙BOSS 22
-) = range(1, 22 + 1)
+DailyActionID_FamilyBoss1, # 仙盟BOSS第一场 22
+DailyActionID_FamilyBoss2, # 仙盟BOSS第二场 23
+) = range(1, 23 + 1)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index cf300ce..a47240c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -1844,7 +1844,7 @@
Def_MapID_LineIDToPropertyID = [Def_FBMapID_ElderBattlefield]
# 进入副本需要发送到GameServer的地图
-Def_MapID_SendToGameServer = [Def_FBMapID_FamilyInvade, Def_FBMapID_FamilyBossMap, Def_FBMapID_SealDemon, Def_FBMapID_FamilyWar, Def_FBMapID_ZhuXianBoss] + Def_MapID_LineIDToPropertyID
+Def_MapID_SendToGameServer = [Def_FBMapID_FamilyInvade, Def_FBMapID_FamilyBossMap, Def_FBMapID_SealDemon, Def_FBMapID_FamilyWar, Def_FBMapID_ZhuXianBoss, Def_FBMapID_AllFamilyBoss] + Def_MapID_LineIDToPropertyID
## 进入副本需要根据请求的功能线路处理的地图, hxp-改了进入模式,暂不需要了 180320
#Def_MapID_ReqFBFuncLine = [Def_FBMapID_KirinHome, Def_FBMapID_BZZD, Def_FBMapID_SealDemonEx,
@@ -1852,7 +1852,7 @@
# + Def_FBMapID_ClearDevil
# 刷新标识点在无玩家的情况下也需要刷新的地图
-Def_NoPlayerNeedProcessRefreshPointMap = [Def_FBMapID_SealDemon, Def_FBMapID_GodArea, Def_FBMapID_BossHome, Def_FBMapID_GatherSoul, Def_FBMapID_ZhuXianBoss]
+Def_NoPlayerNeedProcessRefreshPointMap = [Def_FBMapID_SealDemon, Def_FBMapID_GodArea, Def_FBMapID_BossHome, Def_FBMapID_GatherSoul, Def_FBMapID_ZhuXianBoss, Def_FBMapID_AllFamilyBoss]
# 可重复进的副本
Def_NoLimitEnterCntMap = [Def_FBMapID_FamilyParty, Def_FBMapID_FamilyWar, Def_FBMapID_FamilyInvade, Def_FBMapID_ElderBattlefield, Def_FBMapID_ZhuXianBoss]
@@ -1917,7 +1917,7 @@
'GatherSoul':[Def_FBMapID_GatherSoul],#聚魂副本
'ZhuXianBoss':[Def_FBMapID_ZhuXianBoss],#诛仙BOSS
'ZhuXianTower':[Def_FBMapID_ZhuXianTower],#诛仙塔
- #'AllFamilyBoss':[Def_FBMapID_AllFamilyBoss],#多仙盟BOSS
+ 'AllFamilyBoss':[Def_FBMapID_AllFamilyBoss],#多仙盟BOSS
}
#特殊副本ID, 由系统分配, 进入时候不验证IsMapCopyFull
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 2e830ca..ae970d5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -899,6 +899,58 @@
#------------------------------------------------------
+# A4 0C 多仙盟boss活动信息 #tagGCAllFamilyBossInfo
+
+class tagGCAllFamilyBossInfo(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("IsEnd", c_ubyte), # 是否已结束
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA4
+ self.SubCmd = 0x0C
+ 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 = 0xA4
+ self.SubCmd = 0x0C
+ self.IsEnd = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagGCAllFamilyBossInfo)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A4 0C 多仙盟boss活动信息 //tagGCAllFamilyBossInfo:
+ Cmd:%s,
+ SubCmd:%s,
+ IsEnd:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.IsEnd
+ )
+ return DumpString
+
+
+m_NAtagGCAllFamilyBossInfo=tagGCAllFamilyBossInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCAllFamilyBossInfo.Cmd,m_NAtagGCAllFamilyBossInfo.SubCmd))] = m_NAtagGCAllFamilyBossInfo
+
+
+#------------------------------------------------------
# A4 0A 假仙盟信息 #tagGCFakeFamilyInfo
class tagGCFakeFamilyInfo(Structure):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_AllFamilyBoss.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_AllFamilyBoss.py
new file mode 100644
index 0000000..0b0a821
--- /dev/null
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_AllFamilyBoss.py
@@ -0,0 +1,587 @@
+#!/usr/bin/python
+# -*- coding: GBK -*-
+#-------------------------------------------------------------------------------
+#
+##@package GameWorldLogic.FBProcess.GameLogic_AllFamilyBoss
+#
+# @todo:多仙盟BOSS
+# @author xdh
+# @date 2019-01-18
+# @version 1.0
+#
+# 详细描述: 多仙盟BOSS
+#
+#-------------------------------------------------------------------------------
+#"""Version = 2019-01-18 14:30"""
+#-------------------------------------------------------------------------------
+
+import FBCommon
+import GameWorld
+import IPY_GameWorld
+import GameWorldProcess
+import IpyGameDataPY
+import ChConfig
+import PyGameData
+import PlayerControl
+import ShareDefine
+import NPCCustomRefresh
+import PlayerAuctionHouse
+import ItemControler
+import PlayerActivity
+import EventReport
+
+FBDict_StartTick = 'FBDict_StartTick' #开始时间
+FBDict_Speed = 'FBDict_Speed' #掉血速度 /s
+FBDict_RemainHP = 'FBDict_RemainHP' #剩余时间
+FBPlayerDict_EncourageLV = 'FBPlayerDict_EncourageLV' # 鼓舞等级
+FBDict_IsOver = 'FBDict_IsOver' #是否已结算, 结算时的tick
+FBDict_IsReduceing = 'FBDict_IsReduceing' #是否掉血中
+FBPlayerDict_Rank = "FBPlayerDict_Rank" # 玩家排名
+FBDict_BossTotalHP = 'FBDict_BossTotalHP' #BOSS血量
+FBDict_LastHurtTick = 'FBDict_LastHurtTick' #上次伤害时间
+
+(
+ Def_BossTime, #BOSS时间
+ Def_LeaveTime,#离开时间
+ ) = range(2)
+
+#当前副本地图的状态
+(
+FB_Step_Open, # 副本开启
+FB_Step_Fighting, # 副本进行中
+FB_Step_Over, # 副本结束
+FB_Step_Close, # 副本关闭
+) = range(4)
+
+def OnFBPlayerOnLogin(curPlayer):
+
+ return
+
+
+def OnFBPlayerOnDay(curPlayer):
+
+ return
+
+
+## 是否能够通过活动查询进入
+# @param curPlayer 玩家实例
+# @param mapID 地图ID
+# @param lineID 线路id
+# @param tick 时间戳
+# @return 布尔值
+def OnEnterFBEvent(curPlayer, mapID, lineID, tick):
+ if not curPlayer.GetFamilyID():
+ GameWorld.DebugLog("OnEnterFBEvent not family!")
+ return False
+ return True
+
+
+##副本玩家进入点
+# @param curPlayer 玩家实例
+# @param mapID 地图ID
+# @param lineId 分线ID
+# @param ipyEnterPosInfo 功能线路IPY配置坐标信息
+# @param tick 时间戳
+# @return posX, posY, 随机半径(可选)
+def OnGetFBEnterPos(curPlayer, mapID, lineId, ipyEnterPosInfo, tick):
+ return ipyEnterPosInfo
+
+
+### 查询地图是否开启
+## @param tick 时间戳
+## @return 布尔值
+def OnCanOpen(tick):
+ return
+
+
+##查询是否可以进入地图
+# @param ask:请求结构体(IPY_BMChangeMapAsk)
+# @param tick:时间戳
+# @return IPY_GameWorld.cme 枚举
+def OnChangeMapAsk(ask, tick):
+ return IPY_GameWorld.cmeAccept
+
+
+##开启副本
+# @param tick 时间戳
+# @return 返回值无意义
+# @remarks 开启副本
+def OnOpenFB(tick):
+ lineID = GameWorld.GetGameWorld().GetPropertyID() - 1
+ bossID = CurFBLineBOSSID(lineID)
+ if not bossID:
+ return
+ NPCCustomRefresh.SetNPCRefresh(101, [bossID])
+ BossTime = FBCommon.GetFBLineStepTime(ChConfig.Def_FBMapID_AllFamilyBoss, lineID)[Def_BossTime]
+ GameWorld.GetGameWorld().SetGameWorldDict(FBDict_BossTotalHP, BossTime * 1000)
+ return
+
+
+def OnAllFamilyBossStateChange(state, tick):
+ #活动状态变更
+ mapID = GameWorld.GetMap().GetMapID()
+ if mapID != ChConfig.Def_FBMapID_AllFamilyBoss:
+ return
+ GameWorld.DebugLog(' 多仙盟BOSS活动状态变更 state=%s' % state)
+
+ if not state:
+ if GameWorld.GetGameWorld().GetGameWorldDictByKey(FBDict_StartTick) and not GameWorld.GetGameFB().GetGameFBDictByKey(FBDict_IsOver):
+ GameWorld.GetGameFB().SetGameFBDict(FBDict_IsOver, tick)
+ __DoLogicAllFamilyBossOver(0, tick)
+ return
+
+
+## 进副本
+# @param curPlayer
+# @param tick
+# @return None
+def DoEnterFB(curPlayer, tick):
+ playerID = curPlayer.GetPlayerID()
+
+ lineID = GameWorld.GetGameWorld().GetPropertyID() - 1
+
+ playerCnt = GameWorld.GetGameWorld().GetMapCopyPlayerManager().GetPlayerCount()
+ GameWorld.DebugLog("DoEnterFB...playerCnt=%s,lineID=%s" % (playerCnt, lineID), playerID)
+
+ hadDelTicket = FBCommon.GetHadDelTicket(curPlayer)
+ if not hadDelTicket:
+ FBCommon.SetHadDelTicket(curPlayer)
+ FBCommon.AddEnterFBCount(curPlayer, ChConfig.Def_FBMapID_AllFamilyBoss, 1)
+ if lineID == 0:
+ PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_FamilyBoss1, 1)
+ else:
+ PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_FamilyBoss2, 1)
+ if GameWorld.GetGameFB().GetFBStep() == FB_Step_Open:
+ FBCommon.SetFBStep(FB_Step_Fighting, tick)
+ familyID = curPlayer.GetFamilyID()
+ if familyID not in PyGameData.g_allfamilyBossDict:
+ PyGameData.g_allfamilyBossDict[familyID] = [curPlayer.GetFamilyName(), 0, [playerID]]
+ elif playerID not in PyGameData.g_allfamilyBossDict[familyID][2]:
+ PyGameData.g_allfamilyBossDict[familyID][2].append(playerID)
+
+ EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_AllFamilyBoss, 0, ChConfig.CME_Log_Start)
+
+ UpdateHPReduceSpeed(tick)
+ gameFB = GameWorld.GetGameFB()
+ # 上鼓舞buff
+ encourageLV = gameFB.GetPlayerGameFBDictByKey(playerID, FBPlayerDict_EncourageLV)
+ if encourageLV > 0:
+ FBCommon.AddFbEncourageBuff(curPlayer, FBPlayerDict_EncourageLV, tick)
+ else:
+ FBCommon.SendFBEncourageInfo(curPlayer, encourageLV)
+
+ #DoFBHelp(curPlayer, tick)
+ return
+
+
+##关闭副本
+# @param tick 时间戳
+# @return 无意义
+# @remarks
+def OnCloseFB(tick):
+ gameWorld = GameWorld.GetGameWorld()
+
+ gameWorld.SetGameWorldDict(FBDict_StartTick, 0)
+ gameWorld.SetGameWorldDict(FBDict_Speed, 0)
+ gameWorld.SetGameWorldDict(FBDict_RemainHP, 0)
+
+ gameWorld.SetPropertyID(0)
+ PyGameData.g_allfamilyBossDict = {}
+ return
+
+
+##玩家退出副本
+# @param curPlayer 玩家实例
+# @param tick 时间戳
+# @return 无意义
+def DoExitFB(curPlayer, tick):
+ # 清除鼓舞buff
+ FBCommon.ClearEncourageBuff(curPlayer, tick)
+# #最后一人
+# if gameWorld.GetMapCopyPlayerManager().GetPlayerCount() == 1:
+# lineID = gameWorld.GetPropertyID() - 1
+# PyGameData.g_AllFamilyBossPlayerHurtDict[lineID] = {}
+# gameWorld.SetGameWorldDict(FBDict_StartTick, 0)
+# GameWorld.GetGameFB().ClearGameFBDict()
+# GameWorldProcess.CloseFB(tick)
+# return
+
+ UpdateHPReduceSpeed(tick, True)
+
+ return
+
+
+##玩家主动离开副本.
+# @param curPlayer 玩家实例
+# @param tick 时间戳
+# @return 返回值无意义
+def DoPlayerLeaveFB(curPlayer, tick):
+# FBCommon.SetHadDelTicket(curPlayer, 0)
+# #主动退出的去掉排行榜信息
+# lineID = GameWorld.GetGameWorld().GetPropertyID() - 1
+# playerHurtDict = PyGameData.g_AllFamilyBossPlayerHurtDict.get(lineID, {})
+# playerHurtDict.pop(curPlayer.GetPlayerID(), 0)
+# PyGameData.g_AllFamilyBossPlayerHurtDict[lineID] = playerHurtDict
+# if not playerHurtDict: #榜上没人,停止掉血
+# StopReduceHP(lineID, tick)
+ return
+
+
+##玩家切换地图
+def DoPlayerChangeMapLogic(curPlayer):
+ #FBCommon.SetHadDelTicket(curPlayer, 0)
+ return
+
+
+## 是否副本复活
+# @param None
+# @return 是否副本复活
+def OnPlayerReborn():
+ return True
+
+
+## 获得副本帮助信息
+# @param curPlayer 当前玩家(被通知对象)
+# @param tick 当前时间
+# @return None
+def DoFBHelp(curPlayer, tick):
+ #伤害排行信息
+ if GameWorld.GetGameFB().GetGameFBDictByKey(FBDict_IsOver):
+ return
+ hurtInfo = []
+ familyHurtList = __GetSortHurtList()
+ myFamilyID = curPlayer.GetFamilyID()
+ myRank, myHurt, myMenberCnt = 0, 0, 0
+ for i, info in enumerate(familyHurtList, 1):
+ familyID = info[0]
+ name, hurt, menberList = info[1][:3]
+ if myFamilyID == familyID:
+ myRank, myHurt, myMenberCnt = i, hurt, len(menberList)
+ if i <= 3:
+ hurtDict = {}
+ hurtDict["rank"] = i
+ hurtDict["playerName"] = name
+ hurtDict["hurt"] = hurt % ChConfig.Def_PerPointValue
+ hurtDict["hurtEx"] = hurt / ChConfig.Def_PerPointValue
+ hurtInfo.append(hurtDict)
+
+ curSpeed = GameWorld.GetGameWorld().GetGameWorldDictByKey(FBDict_Speed)
+ isReduceing = GameWorld.GetGameWorld().GetGameWorldDictByKey(FBDict_IsReduceing)
+ remainHP = GetBossRemainHP(tick)
+ totalHP = __GetBossTotalHP()
+ hpReduceSpeed = curSpeed * 10000 / totalHP if totalHP else 0
+ remainHPPer = min(1000000, remainHP * 1000000 / totalHP) if totalHP else 0
+
+ fbHelpDict = {"hurtInfo":hurtInfo, 'hpReduceSpeed':hpReduceSpeed,
+ 'remainHPPer':remainHPPer, 'isReduceing':isReduceing, 'myHurt':myHurt % ChConfig.Def_PerPointValue,
+ 'myHurtEx':myHurt / ChConfig.Def_PerPointValue, 'myRank':myRank, 'myMenberCnt':myMenberCnt
+ }
+ GameWorld.DebugLog("DoFBHelp: %s" % fbHelpDict, curPlayer.GetPlayerID())
+ FBCommon.Notify_FBHelp(curPlayer, fbHelpDict)
+ return
+
+
+## 副本行为
+# @param curPlayer 玩家
+# @param actionType 行为类型
+# @param actionInfo 行为信息
+# @param tick 当前时间
+# @return None
+def DoFBAction(curPlayer, actionType, actionInfo, tick):
+ if actionType == 0:
+ FBCommon.FbEncourageBuff(curPlayer, FBPlayerDict_EncourageLV, actionInfo, tick)
+ return
+
+
+## 玩家对NPC造成伤害
+# @param curPlayer 当前玩家
+# @param curNPC
+# @param hurtHP
+# @return None
+def DoFB_Player_HurtNPC(curPlayer, curNPC, hurtHP):
+ UpdateHurtInfo(curPlayer, hurtHP)
+ GameWorld.GetGameFB().SetGameFBDict(FBDict_LastHurtTick, GameWorld.GetGameWorld().GetTick())
+ return
+
+
+#
+def UpdateHurtInfo(curPlayer, hurtHP, isAdd=False):
+ familyID = curPlayer.GetFamilyID()
+ if familyID not in PyGameData.g_allfamilyBossDict:
+ GameWorld.DebugLog('PyGameData.g_allfamilyBossDict 没有该家族!!')
+ return
+
+ PyGameData.g_allfamilyBossDict[familyID][1] += hurtHP
+
+ #有人上榜开始掉血
+ StartReduceHP(GameWorld.GetGameWorld().GetTick())
+ return
+
+
+##---副本总逻辑计时器---
+# @param tick:时间戳
+# @return 无意义
+# @remarks 副本总逻辑计时器
+def OnProcess(tick):
+ gameFB = GameWorld.GetGameFB()
+ gameWorld = GameWorld.GetGameWorld()
+ overTick = gameFB.GetGameFBDictByKey(FBDict_IsOver)
+ fbStep = gameFB.GetFBStep()
+ lineID = gameWorld.GetPropertyID() - 1
+ if lineID < 0:
+ return
+ if fbStep == FB_Step_Over:
+ mapID = GameWorld.GetMap().GetMapID()
+ leaveTick = FBCommon.GetFBLineStepTime(mapID, lineID)[Def_LeaveTime] * 1000
+ if tick - GameWorld.GetGameFB().GetFBStepTick() > leaveTick:
+ GameWorld.Log("强制踢出玩家关闭副本: overTick=%s,tick=%s" % (overTick, tick))
+ gameWorld.SetGameWorldDict(ShareDefine.Def_Notify_WorldKey_FBCanEnter % ChConfig.Def_FBMapID_AllFamilyBoss, 0)
+ GameWorldProcess.CloseFB(tick)
+ FBCommon.SetFBStep(FB_Step_Close, tick)
+ return
+
+
+ elif fbStep == FB_Step_Fighting:
+ startTick = gameWorld.GetGameWorldDictByKey(FBDict_StartTick)
+ if not startTick or overTick:
+ return
+ lastHurtTick = gameFB.GetGameFBDictByKey(FBDict_LastHurtTick)
+ if lastHurtTick and tick - lastHurtTick >= 2000:
+ StopReduceHP(tick)
+ gameFB.SetGameFBDict(FBDict_LastHurtTick, 0)
+
+ FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 5000)
+ __CheckBossHP(tick)
+
+ return
+
+
+def __GetSortHurtList():
+ playerHurtList = sorted(PyGameData.g_allfamilyBossDict.iteritems(), key=lambda asd:asd[1][1], reverse=True)
+ return playerHurtList
+
+
+def __DoLogicAllFamilyBossOver(isPass, tick):
+ #结算
+ FBCommon.SetFBStep(FB_Step_Over, tick)
+ msgStr = str([])
+ GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'AllFamilyBossOver', msgStr, len(msgStr))
+
+ mapID = GameWorld.GetMap().GetMapID()
+ lineID = GameWorld.GetGameWorld().GetPropertyID() - 1
+ leaveTick = FBCommon.GetFBLineStepTime(mapID, lineID)[Def_LeaveTime] * 1000
+ playerHurtList = __GetSortHurtList()
+ if not playerHurtList:
+ GameWorld.Log(' __DoLogicAllFamilyBossOver, 伤害榜上没有人!!lineID=%s')
+ return
+
+ playerManager = GameWorld.GetMapCopyPlayerManager()
+
+ if isPass:
+ worldLV = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
+ familyAuctionItemDict = {} #{仙盟ID:[[享受收益的成员ID, ...], [[拍品ID,总个数,拍品组数], ...]], ...}
+ event=["AllFamilyBoss", False, {}]
+ for rank, hurtInfo in enumerate(playerHurtList, 1):
+ familyID = hurtInfo[0]
+ memberIDList = hurtInfo[1][2]
+ familyAuctionItemList, menberItemList = __GetFamilyBossAward(rank, worldLV)
+ GameWorld.DebugLog('rank=%s,worldLV=%s,familyAuctionItemList=%s,menberItemList=%s'%(rank, worldLV,familyAuctionItemList,menberItemList), familyID)
+ if familyAuctionItemList:#仙盟拍品
+ familyAuctionItemDict[familyID] = [memberIDList, familyAuctionItemList]
+ if menberItemList: #成员奖励
+ overDict = {FBCommon.Over_rank:rank,
+ FBCommon.Over_itemInfo:FBCommon.GetJsonItemList(menberItemList),
+ 'AuctionItem':FBCommon.GetJsonItemList(familyAuctionItemList),
+ 'memberCnt':len(memberIDList)}
+ for memberID in memberIDList:
+ member = playerManager.FindPlayerByID(memberID)
+ if member:
+ ItemControler.GivePlayerItemOrMail(member, menberItemList, 'LeagueBOSS1', event)
+ member.Sync_TimeTick(IPY_GameWorld.tttLeaveMap, 0, leaveTick, True)
+ FBCommon.NotifyFBOver(member, ChConfig.Def_FBMapID_AllFamilyBoss, lineID, isPass, overDict)
+ else:
+ PlayerControl.SendMailByKey('LeagueBOSS2', [memberID], menberItemList)
+ if familyAuctionItemDict:
+ GameWorld.Log('familyAuctionItemDict=%s'%familyAuctionItemDict)
+ PlayerAuctionHouse.DoAddFamilyAuctionItem(familyAuctionItemDict)
+ else:
+ playerCount = playerManager.GetPlayerCount()
+ for index in xrange(playerCount):
+ curPlayer = playerManager.GetPlayerByIndex(index)
+ if not curPlayer:
+ continue
+ member.Sync_TimeTick(IPY_GameWorld.tttLeaveMap, 0, leaveTick, True)
+ FBCommon.NotifyFBOver(member, ChConfig.Def_FBMapID_AllFamilyBoss, lineID, isPass)
+
+ return
+
+def __GetFamilyBossAward(rank, worldLV):
+ familyAuctionItemList, menberItemList = [], []
+ awardRateList = []
+ ipyMgr = IpyGameDataPY.IPY_Data()
+ for i in xrange(ipyMgr.GetFamilyBossAwardCount()):
+ ipyData = ipyMgr.GetFamilyBossAwardByIndex(i)
+ worldLVList = ipyData.GetWorldLV()
+ if worldLV < worldLVList[0] or worldLV > worldLVList[1]:
+ continue
+ rankList = ipyData.GetRank()
+ if rank < rankList[0] or rank > rankList[1]:
+ continue
+ awardRateList = ipyData.GetAward()
+ if not awardRateList:
+ GameWorld.ErrLog('仙盟Boss奖励表 未配置该奖励 rank=%s,worldLV=%s'%(rank, worldLV))
+ return familyAuctionItemList, menberItemList
+ for rate, itemInfo in awardRateList:
+ if not GameWorld.CanHappen(rate, 10000):
+ continue
+ if len(itemInfo) != 3:
+ GameWorld.ErrLog('仙盟Boss奖励表配置错误 itemInfo=%s'%itemInfo)
+ continue
+ if itemInfo[2]:
+ familyAuctionItemList.append(itemInfo)
+ else:
+ menberItemList.append(itemInfo)
+
+ return familyAuctionItemList, menberItemList
+
+
+def __CheckBossHP(tick):
+ gameFB = GameWorld.GetGameFB()
+ isOver = gameFB.GetGameFBDictByKey(FBDict_IsOver)
+
+ if not isOver and GetBossRemainHP(tick) == 0:
+
+ #结束 设置BOSS死亡
+ FBCommon.ClearFBNPC()
+ FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 0)
+ GameWorld.DebugLog('结束 设置BOSS死亡')
+
+ gameFB.SetGameFBDict(FBDict_IsOver, tick)
+
+ __DoLogicAllFamilyBossOver(1, tick)
+
+ return
+
+
+def UpdateHPReduceSpeed(tick, isExit=False):
+ gameWorld = GameWorld.GetGameWorld()
+ playerCnt = gameWorld.GetMapCopyPlayerManager().GetPlayerCount()
+ playerCnt = playerCnt - 1 if isExit else playerCnt
+ if playerCnt <= 0:
+ return
+ lineID = GameWorld.GetGameWorld().GetPropertyID() - 1
+ if lineID < 0:
+ return
+
+ curSpeed = int(min(1 + 0.08 * (playerCnt - 1), 1.8) * 1000)
+ gameWorld.SetGameWorldDict(FBDict_Speed, curSpeed)
+ if not gameWorld.GetGameWorldDictByKey(FBDict_IsReduceing):
+ return
+
+ startTick = gameWorld.GetGameWorldDictByKey(FBDict_StartTick)
+ remainHP = gameWorld.GetGameWorldDictByKey(FBDict_RemainHP)
+ lastSpeed = gameWorld.GetGameWorldDictByKey(FBDict_Speed)
+ if not startTick:
+ startTick = tick
+ lastSpeed = curSpeed
+ remainHP = __GetBossTotalHP()
+ remainHP = max(0, int((remainHP - (tick - startTick) / 1000.0 * lastSpeed)))
+ gameWorld.SetGameWorldDict(FBDict_StartTick, tick)
+
+ gameWorld.SetGameWorldDict(FBDict_RemainHP, remainHP)
+ GameWorld.DebugLog(' curSpeed=%s, remainHP=%s, passTime=%s, lastSpeed=%s' % (curSpeed, remainHP, tick - startTick, lastSpeed))
+ FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 0)
+ return
+
+
+def StopReduceHP(tick):
+ ##暂停BOSS血量减少
+ gameWorld = GameWorld.GetGameWorld()
+ if not gameWorld.GetGameWorldDictByKey(FBDict_IsReduceing):
+ return
+ remainHP = GetBossRemainHP(tick)
+ if not remainHP:
+ return
+ gameWorld.SetGameWorldDict(FBDict_IsReduceing, 0)
+ gameWorld.SetGameWorldDict(FBDict_RemainHP, remainHP)
+ return
+
+
+def StartReduceHP(tick):
+ ##开始BOSS掉血
+ gameWorld = GameWorld.GetGameWorld()
+ if gameWorld.GetGameWorldDictByKey(FBDict_IsReduceing):
+ return
+ gameWorld.SetGameWorldDict(FBDict_IsReduceing, 1)
+ startTick = gameWorld.GetGameWorldDictByKey(FBDict_StartTick)
+ if not startTick:
+ gameWorld.SetGameWorldDict(FBDict_RemainHP, __GetBossTotalHP())
+ gameWorld.SetGameWorldDict(FBDict_StartTick, tick)
+ FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 0)
+ return
+
+
+def __GetBossTotalHP():return GameWorld.GetGameWorld().GetGameWorldDictByKey(FBDict_BossTotalHP)
+
+
+def GetBossRemainHP(tick):
+ gameWorld = GameWorld.GetGameWorld()
+
+ startTick = gameWorld.GetGameWorldDictByKey(FBDict_StartTick)
+ lastSpeed = gameWorld.GetGameWorldDictByKey(FBDict_Speed)
+ remainHP = gameWorld.GetGameWorldDictByKey(FBDict_RemainHP)
+ if not gameWorld.GetGameWorldDictByKey(FBDict_IsReduceing):
+ return remainHP
+ if not startTick:
+ startTick = tick
+ remainHP = __GetBossTotalHP()
+ else:
+ remainHP = max(0, int((remainHP - (tick - startTick) / 1000.0 * lastSpeed)))
+ return remainHP
+
+
+def GetBossRemainHPPer(tick):
+ remainHP = GetBossRemainHP(tick)
+ totalHP = __GetBossTotalHP()
+ if not totalHP:
+ return 0
+ return remainHP * 100 / totalHP
+
+
+def CurFBLineBOSSID(lineID=-1):
+ #该分线刷的BOSSID
+ if lineID == -1:
+ lineID = GameWorld.GetGameWorld().GetPropertyID() - 1
+ refreshNPCInfo = FBCommon.GetFBLineRefreshNPC(ChConfig.Def_FBMapID_AllFamilyBoss, lineID)
+ if not refreshNPCInfo:
+ return 0
+ bossID = int(refreshNPCInfo)
+ return bossID
+
+
+##玩家死亡.
+# @param curPlayer:死亡的玩家
+# @param tick 时间戳
+# @return 返回值无意义
+# @remarks 玩家主动离开副本.
+def DoPlayerDead(curPlayer):
+ return
+
+
+## 检查是否可攻击, 主判定不可攻击的情况,其他逻辑由外层决定
+# @param attacker 攻击方
+# @param defender 防守方
+# @return bool
+def CheckCanAttackTagObjInFB(attacker, defender):
+
+ return True
+
+
+##处理副本中杀死玩家逻辑
+# @param curPlayer 玩家实例
+# @param defender 防守者
+# @param tick 时间戳
+# @return 布尔值
+# @remarks 处理副本中杀死玩家逻辑
+def DoFBOnKill_Player(atkobj, defender, tick):
+ return True
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianBoss.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianBoss.py
index f7dbada..6fe82c7 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianBoss.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_ZhuXianBoss.py
@@ -483,7 +483,7 @@
PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_KillSpecificNPC, addCnt, [bossID])
FBCommon.AddEnterFBCount(curPlayer, ChConfig.Def_FBMapID_ZhuXianBoss, addCnt)
# 每日活动
- PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_ZhuXianBoss, addCnt)
+ #PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_ZhuXianBoss, addCnt)
PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_ZhuXianBOSS, addCnt)
return prizeItemList
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
index 313bc13..2746289 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -1411,6 +1411,12 @@
("dict", "CostItem", 0),
("dict", "Attr", 0),
),
+
+ "FamilyBossAward":(
+ ("list", "WorldLV", 0),
+ ("list", "Rank", 0),
+ ("list", "Award", 0),
+ ),
}
@@ -4313,6 +4319,19 @@
def GetNeedPlusLV(self): return self.NeedPlusLV # 需要强化等级
def GetCostItem(self): return self.CostItem # 消耗材料
def GetAttr(self): return self.Attr # 属性
+
+# 仙盟Boss奖励表
+class IPY_FamilyBossAward():
+
+ def __init__(self):
+ self.WorldLV = []
+ self.Rank = []
+ self.Award = []
+ return
+
+ def GetWorldLV(self): return self.WorldLV # 世界等级
+ def GetRank(self): return self.Rank # 排名
+ def GetAward(self): return self.Award # 奖励 [[独立概率万分率,[物品ID,数量,拍品分组]],..]
def Log(msg, playerID=0, par=0):
@@ -4618,6 +4637,8 @@
self.ipyEquipStarUpLen = len(self.ipyEquipStarUpCache)
self.ipyEquipPlusEvolveCache = self.__LoadFileData("EquipPlusEvolve", IPY_EquipPlusEvolve)
self.ipyEquipPlusEvolveLen = len(self.ipyEquipPlusEvolveCache)
+ self.ipyFamilyBossAwardCache = self.__LoadFileData("FamilyBossAward", IPY_FamilyBossAward)
+ self.ipyFamilyBossAwardLen = len(self.ipyFamilyBossAwardCache)
Log("IPY_FuncConfig count=%s" % len(self.ipyFuncConfigDict))
Log("IPY_DataMgr InitOK!")
return
@@ -5064,6 +5085,8 @@
def GetEquipStarUpByIndex(self, index): return self.ipyEquipStarUpCache[index]
def GetEquipPlusEvolveCount(self): return self.ipyEquipPlusEvolveLen
def GetEquipPlusEvolveByIndex(self, index): return self.ipyEquipPlusEvolveCache[index]
+ def GetFamilyBossAwardCount(self): return self.ipyFamilyBossAwardLen
+ def GetFamilyBossAwardByIndex(self, index): return self.ipyFamilyBossAwardCache[index]
IPYData = IPY_DataMgr()
def IPY_Data(): return IPYData
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 e60c28b..ca530bd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
@@ -72,6 +72,7 @@
import PlayerFamilyRedPacket
import GameLogic_FamilyInvade
import GameLogic_ElderBattlefield
+import GameLogic_AllFamilyBoss
import GameLogic_FamilyBoss
import GameLogic_FamilyWar
import OpenServerCampaign
@@ -1381,6 +1382,12 @@
elif key == ShareDefine.Def_Notify_WorldKey_FBFuncState % ChConfig.Def_FBMapID_ElderBattlefield:
if gameWorldMgr.GetGameWorldDictByKey(key) != value:
GameLogic_ElderBattlefield.OnElderBattlefieldStateChange(value, tick)
+ # 多仙盟BOSS
+ elif key in [ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilyBoss1,
+ ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_FamilyBoss2,]:
+ if gameWorldMgr.GetGameWorldDictByKey(key) != value:
+ GameLogic_AllFamilyBoss.OnAllFamilyBossStateChange(value, tick)
+
# OnDayEx
elif key == ShareDefine.Def_Notify_WorldKey_OnDayEx:
if value and gameWorldMgr.GetGameWorldDictByKey(key) != value:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_EnterFB.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_EnterFB.py
index ef7d527..c83570d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_EnterFB.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_EnterFB.py
@@ -145,7 +145,7 @@
# GameWorld.DebugLog(" 创建新战盟家园: tagFamilyID=%s,tagFamilyHomeLV=%s,resultLineID=%s"
# % (tagFamilyID, tagFamilyHomeLV, resultLineID))
#===================================================================================================
- elif tagMapID in [ChConfig.Def_FBMapID_SealDemon, ChConfig.Def_FBMapID_ZhuXianBoss]:
+ elif tagMapID in [ChConfig.Def_FBMapID_SealDemon, ChConfig.Def_FBMapID_ZhuXianBoss, ChConfig.Def_FBMapID_AllFamilyBoss]:
tagMapPropertyID = tagMapLineID + 1 # 因为PropertyID默认是0,所以使用时从1开始
resultLineID = -1 # 结果lineID
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyGameData.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyGameData.py
index 92997c0..5af65e0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyGameData.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyGameData.py
@@ -94,3 +94,5 @@
g_zhuXianSkillReducePerDict = {} # 诛仙装备对技能减伤缓存 {playerID:{技能TypeID:数值, ...}, ...}
g_Qudao_DoubleBill = {} # 渠道删档充值返利
+
+g_allfamilyBossDict = {} # 多仙盟boss信息 {familyID:[familyName, 伤害, [playerID], ...}
\ No newline at end of file
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index 4a57ddb..8c72982 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -1536,8 +1536,9 @@
DailyActionID_IceLode, # 冰晶矿脉
DailyActionID_HelpBattleCheckIn, # 助战登记 20
DailyActionID_CrossReamPK, # 跨服PK 21
-DailyActionID_ZhuXianBoss, # 诛仙BOSS 22
-) = range(1, 22 + 1)
+DailyActionID_FamilyBoss1, # 仙盟BOSS第一场 22
+DailyActionID_FamilyBoss2, # 仙盟BOSS第二场 23
+) = range(1, 23 + 1)
--
Gitblit v1.8.0