From 9f13daf65e0f6acc43ffab6462b737a70879f5cc Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 29 八月 2018 20:17:08 +0800 Subject: [PATCH] Add: 2961 【后端】仙盟抢Boss活动; --- ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 43 insertions(+), 1 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py index aea34b5..dd7e024 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py @@ -176,6 +176,10 @@ __SetIsAlive(bossID, isAlive) # 全服广播世界boss变更信息 Sync_BossInfo(None, [bossID]) + + # 仙盟归属boss的重置 + if bossID in PyGameData.g_familyOwnerBossInfo: + PyGameData.g_familyOwnerBossInfo.pop(bossID) return @@ -1036,4 +1040,42 @@ if PlayerControl.GetIsTJG(curPlayer): return NetPackCommon.SendFakePack(curPlayer, packData) - return \ No newline at end of file + return + +def MapServer_FamilyOwnerBossInfo(msgInfo): + ## 地图同步仙盟归属boss信息 + + #GameWorld.DebugLog("地图同步仙盟归属boss信息: %s" % msgInfo) + if not isinstance(msgInfo, dict): + return + + PyGameData.g_familyOwnerBossInfo.update(msgInfo) + return + +#// AC 04 查询仙盟抢Boss所有Boss当前进度 #tagCGQueryAllFamilyBossHurt +# +#struct tagCGQueryAllFamilyBossHurt +#{ +# tagHead Head; +#}; +def OnQueryAllFamilyBossHurt(index, clientData, tick): + curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index) + + hurtPack = ChPyNetSendPack.tagGCAllFamilyBossHurtInfoList() + hurtPack.NPCHurtInfo = [] + for npcID, hurtInfo in PyGameData.g_familyOwnerBossInfo.items(): + curHP, maxHP, firstFamilyID, firstFamilyName = hurtInfo + hurtInfo = ChPyNetSendPack.tagGCFamilyBossHurtInfo() + hurtInfo.NPCID = npcID + hurtInfo.CurHP = curHP%ShareDefine.Def_PerPointValue + hurtInfo.CurHPEx = curHP/ShareDefine.Def_PerPointValue + hurtInfo.MaxHP = maxHP%ShareDefine.Def_PerPointValue + hurtInfo.MaxHPEx = maxHP/ShareDefine.Def_PerPointValue + hurtInfo.FamilyID = firstFamilyID + hurtInfo.FamilyName = firstFamilyName + hurtInfo.NameLen = len(hurtInfo.FamilyName) + hurtPack.NPCHurtInfo.append(hurtInfo) + hurtPack.NPCCount = len(hurtPack.NPCHurtInfo) + NetPackCommon.SendFakePack(curPlayer, hurtPack) + return + -- Gitblit v1.8.0