From 7517615ae0f931c440e7cd3ba9ad558e9309640e Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 10 十二月 2018 11:47:50 +0800 Subject: [PATCH] 5305 【后端】【1.3.100】助战列表刷新规则优化 --- ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py index 571ee07..733998b 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py @@ -306,6 +306,20 @@ # # return +#// A9 04 查询boss信息 #tagCGQueryBossInfo +# +# +#struct tagCGQueryBossInfo +#{ +# tagHead Head; +# BYTE Count; //数量 +# DWORD BossIDList[Count]; //boosid +#}; +def OnQueryBossInfo(index, clientData, tick): + curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index) + bossIDList = clientData.BossIDList + Sync_BossInfo(curPlayer, bossIDList) + return ## 同步boss相关信息 @@ -620,7 +634,7 @@ onlineCnt = __GetBossOnlineHeroCnt(bossid)[0] LVLimit = ipyData.GetLVLimit() openServerDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay) - if openServerDay != 0: + if openServerDay != 0 and LVLimit and len(LVLimit) == 2: yesterdayCnt = len([1 for lv in PyGameData.g_yesterdayPlayerLVDict.values() if LVLimit[0]<=lv <= LVLimit[1]]) #参数昨日活跃人数 else: yesterdayCnt = IpyGameDataPY.GetFuncCfg('FirstDayActivePlayerCnt') @@ -950,8 +964,10 @@ refreshTime = 0 PyGameData.g_sortBOSSRefreshList[i] = [bossID, killedTime, refreshTime] bossIDList.append(bossID) + curTime = int(time.time()) + PyGameData.g_sortBOSSRefreshList.sort(key=lambda asd:max(0, asd[2] - (curTime - asd[1]))) GameWorld.Log(' boss复活活动 重生boss bossIDList=%s'%bossIDList) - g_lastBossRebornTime = int(time.time()) + g_lastBossRebornTime = curTime else: #广播 needNotifyPointPerList = IpyGameDataPY.GetFuncEvalCfg('BossRebornNotify') @@ -1215,6 +1231,6 @@ if curMember.GetFamilyLV() == IPY_GameServer.fmlMember: GameWorld.DebugLog("普通成员无法召集!", playerID) return - PlayerControl.FamilyNotify(curFamily.GetID(), "FairyGrabBossHelp", [npcID]) + PlayerControl.FamilyNotify(curFamily.GetID(), "FairyGrabBossHelp", [curPlayer.GetName(), npcID]) return -- Gitblit v1.8.0