| | |
| | |
|
| | | 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:
|
| | |
|