From 8bb1b16496579e13cc294273b24a2fe2dcdcb84c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 26 七月 2019 21:24:43 +0800
Subject: [PATCH] 8180 【后端】【主干】优化组队打BOSS(境界不受boss压制的队员各自掉一份,优化争夺模式不对队友造成伤害)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py | 35 ++++++++++++++++++++++++++++-------
1 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index 9f14d12..5b31ada 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -4676,13 +4676,23 @@
if maxPlayerLV < curPlayer.GetLV():
maxPlayerLV = curPlayer.GetLV()
dropPlayer = curPlayer
+
+ if isGameBoss and curPlayer.GetOfficialRank() < GetRealmLV(curNPC):
+ GameWorld.Log("玩家境界不足,无法获得Boss归属奖励! playerRealmLV=%s,npcID=%s,npcRealmLV=%s"
+ % (curPlayer.GetOfficialRank(), npcID, GetRealmLV(curNPC)), curPlayer.GetPlayerID())
+ continue
+
self.__KilledByPlayerSetPrize(curPlayer)
ownerPlayerList.append(curPlayer)
self.__ownerPlayerList = ownerPlayerList
- #调用物品掉落
- self.__NPCDropItem(dropPlayer, hurtType, hurtID, ownerPlayerList)
-
+ #调用物品掉落,boss一人一份
+ if isGameBoss:
+ for curPlayer in ownerPlayerList:
+ self.__NPCDropItem(curPlayer, ChConfig.Def_NPCHurtTypePlayer, curPlayer.GetPlayerID(), [curPlayer])
+ elif dropPlayer:
+ self.__NPCDropItem(dropPlayer, hurtType, hurtID, ownerPlayerList)
+
#被队伍杀死
elif curTeam != None:
self.__KilledByTeamSetPrize(curTeam, hurtType, hurtID)
@@ -5112,8 +5122,15 @@
teamMaxLV = 0
dropPlayer = None
ownerPlayerList = []
+ npcID = curNPC.GetNPCID()
+ isGameBoss = ChConfig.IsGameBoss(curNPC)
#遍历队伍,半径为一屏半的距离内的所有队伍/团队成员,可以获得经验
for curPlayer in playerlist:
+ if isGameBoss and curPlayer.GetOfficialRank() < GetRealmLV(curNPC):
+ GameWorld.Log("队员境界不足,无法获得Boss归属奖励! playerRealmLV=%s,npcID=%s,npcRealmLV=%s"
+ % (curPlayer.GetOfficialRank(), npcID, GetRealmLV(curNPC)), curPlayer.GetPlayerID())
+ continue
+
curPlayerLV = curPlayer.GetLV()
if teamMaxLV < curPlayerLV:
teamMaxLV = curPlayerLV
@@ -5124,9 +5141,13 @@
self.__DoNormalTeamExp(curPlayer)
self.__KillNPCFuncEx(curPlayer, curNPC, maxHurtID, True)
self.__ownerPlayerList = ownerPlayerList
-
- #调用物品掉落
- self.__NPCDropItem(dropPlayer, hurtType, hurtID, ownerPlayerList)
+
+ #调用物品掉落,boss一人一份
+ if isGameBoss:
+ for curPlayer in ownerPlayerList:
+ self.__NPCDropItem(curPlayer, ChConfig.Def_NPCHurtTypePlayer, curPlayer.GetPlayerID(), [curPlayer])
+ elif dropPlayer:
+ self.__NPCDropItem(dropPlayer, hurtType, hurtID, ownerPlayerList)
#GameWorld.Log("队伍杀死怪物奖励,逻辑成功结束")
return
@@ -5360,7 +5381,7 @@
# 在地上添加物品(统一接口)
dropNPCID = 0 if not ChConfig.IsGameBoss(curNPC) else curNPCID
- specOwnerIDList = self.__AllKillerDict.keys() if (len(self.__AllKillerDict) > 1 or dropType == ChConfig.Def_NPCHurtTypeSpecial) else []
+ specOwnerIDList = [player.GetPlayerID() for player in self.__ownerPlayerList] if dropType == ChConfig.Def_NPCHurtTypeSpecial else []
curMapItem = ChItem.AddMapDropItem(posX, posY, curItem, ownerInfo=[dropType, ownerID, specOwnerIDList], dropNPCID=dropNPCID)
#设置该物品生前拥有者(那个NPC掉落的)
--
Gitblit v1.8.0