| | |
| | | import PlayerCompensation
|
| | | import IpyGameDataPY
|
| | | import PyGameDataStruct
|
| | | import CrossRealmPlayer
|
| | | import PyDataManager
|
| | | import PlayerControl
|
| | | import CrossRealmMsg
|
| | |
| | | if bossID <= 0:
|
| | | return
|
| | |
|
| | | bossID, killPlayerName, hurtValue, isNotify, realMapID, dataMapID, copyMapID = msgList
|
| | | bossID, killPlayerName, hurtValue, isNotify, realMapID, dataMapID, copyMapID, killerIDList = msgList
|
| | | if GameWorld.IsCrossServer():
|
| | | CrossBoss.DoCrossBossOnKilled(bossID, killPlayerName, realMapID, dataMapID, copyMapID)
|
| | | CrossBoss.DoCrossBossOnKilled(bossID, killPlayerName, realMapID, dataMapID, copyMapID, killerIDList)
|
| | | return
|
| | |
|
| | | mapID = dataMapID
|
| | |
| | | state = gameWorld.GetDictByKey(ChConfig.Def_WorldKey_OperationActionState % ShareDefine.OperationActionName_BossReborn)
|
| | | if state:
|
| | | Sync_BossRebornPoint(curPlayer)
|
| | | Sync_DogzNPCRefreshTime(curPlayer)
|
| | | return
|
| | |
|
| | | ## 地图启动ok通知
|
| | |
| | | if IsMapNeedBossShunt(0):
|
| | | GameWorld.SendCommMapServerMsg(ShareDefine.Def_Notify_WorldKey_BossShuntPlayer, PyGameData.g_bossShuntPlayerInfo)
|
| | | GameWorld.SendCommMapServerMsg(ShareDefine.Def_Notify_WorldKey_BossShuntLineState, PyGameData.g_bossShuntLineState)
|
| | | #通知一个参数
|
| | | bossID = IpyGameDataPY.GetFuncCfg('DogzFBRefreshCfg', 2)
|
| | | onlineCnt = __GetBossOnlineHeroCnt(bossID)[0]
|
| | | GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_BossOnlineHeroCnt % bossID, onlineCnt)
|
| | |
|
| | | #仙盟击杀骑宠boss数
|
| | | if PyGameData.g_familyKillHorsePetRobBossCntDict:
|
| | |
| | | # 同步到玩家对应子服
|
| | | if not serverGroupID:
|
| | | return
|
| | | CrossRealmMsg.SendMsgToClientServer(ShareDefine.CrossServerMsg_DropGoodItem, msgList, [serverGroupID])
|
| | | zoneIpyData = CrossRealmPlayer.GetServerCrossZoneIpyData(mapID, serverGroupID)
|
| | | if not zoneIpyData:
|
| | | return
|
| | | serverGroupIDList = zoneIpyData.GetServerGroupIDList()
|
| | | CrossRealmMsg.SendMsgToClientServer(ShareDefine.CrossServerMsg_DropGoodItem, msgList, serverGroupIDList)
|
| | | return
|
| | |
|
| | | recType = ShareDefine.Def_UniversalGameRecType_BossDropGoodItemInfo
|
| | |
| | |
|
| | | newNum = newOnlieCnt * 100 + unUpdataCnt
|
| | | PlayerDBGSEvent.SetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_GameWorldBossOnlineCnt % bossid, newNum)
|
| | | if bossid == IpyGameDataPY.GetFuncCfg('DogzFBRefreshCfg', 2):
|
| | | GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_BossOnlineHeroCnt % bossid, newOnlieCnt)
|
| | | GameWorld.DebugLog("设置计算boss刷新时间用的在线人数 Change:bossid=%s, beforeOnlineCnt = %s, newOnlieCnt = %s, unUpdataCnt=%s" % (bossid, beforeOnlineCnt, newOnlieCnt, unUpdataCnt))
|
| | | return
|
| | |
|
| | |
| | | packData.RebornCnt = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_BossRebornCnt)
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | if not curPlayer:
|
| | | 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, packData)
|
| | | else:
|
| | | if PlayerControl.GetIsTJG(curPlayer):
|
| | | return
|
| | | NetPackCommon.SendFakePack(curPlayer, packData)
|
| | | return
|
| | |
|
| | | def Sync_DogzNPCRefreshTime(curPlayer=None):
|
| | | #同步神兽副本NPC刷新时间
|
| | | refreshTimeDict = PyGameData.g_dogzNPCRefreshTimeDict
|
| | |
|
| | | if not refreshTimeDict:
|
| | | return
|
| | | curTime = int(time.time())
|
| | | packData = ChPyNetSendPack.tagGCDogzNPCRefreshTime()
|
| | | packData.InfoList=[]
|
| | | for npcid, timeinfo in refreshTimeDict.items():
|
| | | lastRefreshTime, nextNeedTime = timeinfo
|
| | | remainTime = max(0, nextNeedTime - curTime + lastRefreshTime)
|
| | | timeInfo = ChPyNetSendPack.tagDogzTimeInfoObj()
|
| | | timeInfo.NPCID = npcid
|
| | | timeInfo.RefreshSecond = remainTime
|
| | | packData.InfoList.append(timeInfo)
|
| | | packData.Cnt = len(packData.InfoList)
|
| | | if not curPlayer:
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | for i in xrange(playerManager.GetActivePlayerCount()):
|
| | | curPlayer = playerManager.GetActivePlayerAt(i)
|
| | | if curPlayer == None or not curPlayer.GetInitOK():
|