From 72631597752ca0876bbbb434a5b148d89c942ab5 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 23 十二月 2019 21:18:32 +0800
Subject: [PATCH] 8346 【恺英】【后端】协助系统(修复第一名伤血无归属玩家时,会默认给其他玩家归属bug)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py | 66 ++++++++++++++++-----------------
1 files changed, 32 insertions(+), 34 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 70c5423..5f574ff 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -5297,40 +5297,38 @@
elif ownerType == ChConfig.Def_NPCHurtTypeTeam:
curTeam = GameWorld.GetTeamManager().FindTeam(ownerID)
- if not curTeam:
- return
-
- # 因为有击杀次数限制,所以不是所有的队员都可以获得归属,所以这里设置为特殊指定玩家掉落
- hurtType, hurtID = ChConfig.Def_NPCHurtTypeSpecial, 0
- if isDead:
- GameWorld.Log("队伍成员数: %s" % (curTeam.GetMemberCount()))
- refreshPoint = curNPC.GetRefreshPosAt(curNPC.GetCurRefreshPointIndex())
- for i in xrange(curTeam.GetMemberCount()):
- curTeamPlayer = curTeam.GetMember(i)
- if curTeamPlayer == None or curTeamPlayer.GetPlayerID() == 0:
- if isDead:
- GameWorld.Log(" i=%s, 成员不存在!" % (i))
- continue
-
- if curTeamPlayer.GetCopyMapID() == GameWorld.GetGameWorld().GetCopyMapID() \
- and (not hurtList or hurtList.HaveHurtValue(curTeamPlayer.GetPlayerID()))\
- and AttackCommon.CheckKillNPCByCnt(curTeamPlayer, curNPC, False) and curTeamPlayer.GetVisible():
- self.__AddDropOwnerPlayerBuff(curTeamPlayer, tick)
- killerDict[curTeamPlayer.GetPlayerID()] = curTeamPlayer
- if isDead:
- GameWorld.Log(" i=%s, 成员有归属权! memPlayerID=%s,背包剩余空格=%s"
- % (i, curTeamPlayer.GetPlayerID(), ItemCommon.GetItemPackSpace(curTeamPlayer, IPY_GameWorld.rptItem)))
-
- # 不同线、或者距离超出boss范围的队员不加归属buff
- else:
- isOk = BuffSkill.DelBuffBySkillID(curTeamPlayer, ChConfig.Def_SkillID_DropOwnerBuff, tick, buffOwner=curNPC)
- if isOk:
- GameWorld.DebugLog("删除归属队员buff: teamID=%s,playerID=%s" % (ownerID, curTeamPlayer.GetPlayerID()))
- if isDead:
- GameWorld.Log(" i=%s, 成员无归属权! memPlayerID=%s,copyMapID=%s,pos(%s,%s),CheckKillNPCByCnt=%s"
- % (i, curTeamPlayer.GetPlayerID(), curTeamPlayer.GetCopyMapID(),
- curTeamPlayer.GetPosX(), curTeamPlayer.GetPosY(),
- AttackCommon.CheckKillNPCByCnt(curTeamPlayer, curNPC, False)))
+ if curTeam:
+ # 因为有击杀次数限制,所以不是所有的队员都可以获得归属,所以这里设置为特殊指定玩家掉落
+ hurtType, hurtID = ChConfig.Def_NPCHurtTypeSpecial, 0
+ if isDead:
+ GameWorld.Log("队伍成员数: %s" % (curTeam.GetMemberCount()))
+ refreshPoint = curNPC.GetRefreshPosAt(curNPC.GetCurRefreshPointIndex())
+ for i in xrange(curTeam.GetMemberCount()):
+ curTeamPlayer = curTeam.GetMember(i)
+ if curTeamPlayer == None or curTeamPlayer.GetPlayerID() == 0:
+ if isDead:
+ GameWorld.Log(" i=%s, 成员不存在!" % (i))
+ continue
+
+ if curTeamPlayer.GetCopyMapID() == GameWorld.GetGameWorld().GetCopyMapID() \
+ and (not hurtList or hurtList.HaveHurtValue(curTeamPlayer.GetPlayerID()))\
+ and AttackCommon.CheckKillNPCByCnt(curTeamPlayer, curNPC, False) and curTeamPlayer.GetVisible():
+ self.__AddDropOwnerPlayerBuff(curTeamPlayer, tick)
+ killerDict[curTeamPlayer.GetPlayerID()] = curTeamPlayer
+ if isDead:
+ GameWorld.Log(" i=%s, 成员有归属权! memPlayerID=%s,背包剩余空格=%s"
+ % (i, curTeamPlayer.GetPlayerID(), ItemCommon.GetItemPackSpace(curTeamPlayer, IPY_GameWorld.rptItem)))
+
+ # 不同线、或者距离超出boss范围的队员不加归属buff
+ else:
+ isOk = BuffSkill.DelBuffBySkillID(curTeamPlayer, ChConfig.Def_SkillID_DropOwnerBuff, tick, buffOwner=curNPC)
+ if isOk:
+ GameWorld.DebugLog("删除归属队员buff: teamID=%s,playerID=%s" % (ownerID, curTeamPlayer.GetPlayerID()))
+ if isDead:
+ GameWorld.Log(" i=%s, 成员无归属权! memPlayerID=%s,copyMapID=%s,pos(%s,%s),CheckKillNPCByCnt=%s"
+ % (i, curTeamPlayer.GetPlayerID(), curTeamPlayer.GetCopyMapID(),
+ curTeamPlayer.GetPosX(), curTeamPlayer.GetPosY(),
+ AttackCommon.CheckKillNPCByCnt(curTeamPlayer, curNPC, False)))
elif ownerType == ChConfig.Def_NPCHurtTypeFamily:
--
Gitblit v1.8.0