| | |
| | | isMapNeedShunt = IsMapNeedBossShunt(mapID)
|
| | | isAlive = __GetIsAlive(bossID)
|
| | |
|
| | | GameWorld.DebugLog("击杀世界boss DoGameWorldBossOnKilled...bossID=%s,hurtValue=%s,mapID=%s,tick=%s,isMapNeedShunt=%s,isAlive=%s" |
| | | % (bossID, hurtValue, mapID, tick, isMapNeedShunt, isAlive))
|
| | | GameWorld.Log("击杀世界boss DoGameWorldBossOnKilled...bossID=%s,hurtValue=%s,mapID=%s,tick=%s,isMapNeedShunt=%s,isAlive=%s" |
| | | % (bossID, hurtValue, mapID, tick, isMapNeedShunt, isAlive))
|
| | | if isMapNeedShunt and not isAlive:
|
| | | GameWorld.DebugLog("需要分流的地图boss被击杀,但是当前boss全局状态为死亡状态,不再更新boss击杀信息!")
|
| | | return
|
| | |
| | | # 全服广播世界boss变更信息
|
| | | Sync_BossInfo(None, [bossID])
|
| | | SendMapServerBossKilledCnt(bossID)
|
| | |
|
| | | |
| | | horsePetRobBossIDList = IpyGameDataPY.GetFuncEvalCfg("FairyGrabBossID", 1)
|
| | | if bossID in horsePetRobBossIDList:
|
| | | OnFamilyKillHorsePetRobBoss(killPlayerName)
|
| | | return
|
| | |
|
| | | def __UpdateBossRefreshList(bossID, killedTime=0, refreshTime=0):
|
| | |
| | | bossID = IpyGameDataPY.GetFuncCfg('DogzFBRefreshCfg', 2)
|
| | | onlineCnt = __GetBossOnlineHeroCnt(bossID)[0]
|
| | | GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_BossOnlineHeroCnt % bossID, onlineCnt)
|
| | | |
| | | #仙盟击杀骑宠boss数
|
| | | if PyGameData.g_familyKillHorsePetRobBossCntDict:
|
| | | GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_FamilyKillHorsePetRobBossCnt, PyGameData.g_familyKillHorsePetRobBossCntDict)
|
| | | return
|
| | |
|
| | |
|
| | |
| | | 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():
|
| | | if bkey not in [0, 1]:
|
| | | if bkey not in [ShareDefine.Def_Boss_Func_World, ShareDefine.Def_Boss_Func_Home]:
|
| | | continue
|
| | | canRebornBossIDList += list(bidlist)
|
| | |
|
| | |
| | | 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]) #参数昨日活跃人数
|
| | |
| | | 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()):
|
| | |
| | |
|
| | | ## -----------------------------------------------------------------------------------------------
|
| | |
|
| | | def OnFamilyKillHorsePetRobBoss(killFamilyName):
|
| | | ## 仙盟击杀骑宠boss
|
| | | |
| | | family = GameWorld.GetFamilyManager().FindFamilyByName(killFamilyName)
|
| | | if not family:
|
| | | GameWorld.ErrLog("找不到该仙盟名: killFamilyName=%s" % killFamilyName)
|
| | | return
|
| | | |
| | | familyID = family.GetID()
|
| | | PyGameData.g_familyKillHorsePetRobBossCntDict[familyID] = PyGameData.g_familyKillHorsePetRobBossCntDict.get(familyID, 0) + 1
|
| | | GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_FamilyKillHorsePetRobBossCnt, PyGameData.g_familyKillHorsePetRobBossCntDict)
|
| | | GameWorld.Log("骑宠争夺仙盟击杀Boss数统计: %s" % PyGameData.g_familyKillHorsePetRobBossCntDict)
|
| | | return
|
| | |
|
| | | def SyncMapServer_HorsePetRobBossPlayerCount():
|
| | | ## 活动开始前,同步有效活动人数到地图,作为Boss属性成长系数用
|
| | | |
| | | diffWorldLV = int(IpyGameDataPY.GetFuncCfg("FairyGrabBossID", 3))
|
| | | funcLimitLV = PlayerControl.GetFuncLimitLV(ShareDefine.GameFuncID_HorsePetRobBoss)
|
| | | curWorldLV = PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
|
| | | minLV = max(funcLimitLV, curWorldLV + diffWorldLV)
|
| | | |
| | | playerCount = 0
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | for i in xrange(playerManager.GetActivePlayerCount()):
|
| | | findPlayer = playerManager.GetActivePlayerAt(i)
|
| | | if findPlayer == None or not findPlayer.GetInitOK():
|
| | | continue
|
| | | |
| | | if PlayerControl.GetIsTJG(findPlayer):
|
| | | continue
|
| | | |
| | | if not findPlayer.GetFamilyID():
|
| | | continue
|
| | | |
| | | if findPlayer.GetLV() < minLV:
|
| | | continue
|
| | | |
| | | playerCount += 1
|
| | | |
| | | GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_HorsePetRobBossPlayerCount, playerCount)
|
| | | GameWorld.Log("同步骑宠争夺有效参与人数: playerCount=%s,minLV=%s,funcLimitLV=%s,curWorldLV=%s,diffWorldLV=%s" |
| | | % (playerCount, minLV, funcLimitLV, curWorldLV, diffWorldLV))
|
| | | return
|
| | |
|
| | | def OnHorsePetRobBossActionChange(isOpen):
|
| | | ## 骑宠争夺活动状态变更
|
| | | |
| | | # 无论开关都重置, 服务器活动中维护暂时不处理
|
| | | PyGameData.g_familyKillHorsePetRobBossCntDict = {}
|
| | | GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_FamilyKillHorsePetRobBossCnt, PyGameData.g_familyKillHorsePetRobBossCntDict)
|
| | | |
| | | |
| | | return
|
| | |
|
| | | def MapServer_HorsePetRobBossHurtPlayer(msgInfo):
|
| | | ## 骑宠争夺boss伤血玩家同步
|
| | | GameWorld.Log("骑宠争夺boss伤血玩家同步: %s" % str(msgInfo))
|