| | |
| | | import NPCCommon
|
| | | import ChConfig
|
| | | import NPCHurtManager
|
| | | import NPCHurtMgr
|
| | | import PlayerTeam
|
| | | import ShareDefine
|
| | | import GameObj
|
| | |
|
| | | ##查看点选的NPC仇恨列表
|
| | |
| | | FamilyRobBoss.OnGMPrintFamilyOwnerBossHurt(curPlayer, curNPC)
|
| | | return
|
| | |
|
| | | isPyHurtList = 1
|
| | | isAssistHurt = 0
|
| | | npcHurtList = NPCHurtManager.GetPlayerHurtList(curNPC)
|
| | | if npcHurtList:
|
| | | isAssistHurt = 1
|
| | | if not npcHurtList:
|
| | | npcHurtList = NPCHurtMgr.GetPlayerHurtList(curNPC)
|
| | | if not npcHurtList:
|
| | | npcHurtList = curNPC.GetPlayerHurtList()
|
| | | isPyHurtList = 0
|
| | | |
| | | if isSort:
|
| | | npcHurtList.Sort() #sort以后伤血列表从大到小排序
|
| | |
|
| | | GameWorld.DebugAnswer(curPlayer, "ID=%s,NPCID=%s, 伤血数=%s,排序=%s,PY=%s" |
| | | % (curNPC.GetID(), curNPC.GetNPCID(), npcHurtList.GetHurtCount(), isSort, isPyHurtList))
|
| | | if isPyHurtList:
|
| | | GameWorld.DebugAnswer(curPlayer, "ID=%s,NPCID=%s, 伤血数=%s,排序=%s,协=%s" |
| | | % (curNPC.GetID(), curNPC.GetNPCID(), npcHurtList.GetHurtCount(), isSort, isAssistHurt))
|
| | | if isAssistHurt:
|
| | | for playerID, assistPlayerIDList in npcHurtList.GetNoAssitPlayerIDDict().items():
|
| | | GameWorld.DebugAnswer(curPlayer, "玩家:%s, 协助玩家:%s" % (playerID, assistPlayerIDList))
|
| | | for assistPlayerID, tagPlayerID in npcHurtList.GetAssistPlayerIDDict().items():
|
| | |
| | | hurtType = hurtObj.GetValueType()
|
| | | hurtID = hurtObj.GetValueID()
|
| | | hurtValue = hurtObj.GetHurtValue()
|
| | | if hasattr(hurtObj, "GetHurtValueEx"):
|
| | | hurtValue += hurtObj.GetHurtValueEx() * ShareDefine.Def_PerPointValue
|
| | | if not hurtID:
|
| | | GameWorld.DebugAnswer(curPlayer, "%s 不存在!HurtType=%s,ID=%s, V=%s" % (index, hurtType, hurtID, hurtValue))
|
| | | continue
|
| | |
| | | hurtPlayer = GameWorld.GetObj(hurtID, IPY_GameWorld.gotPlayer)
|
| | | if hurtPlayer == None:
|
| | | GameWorld.DebugAnswer(curPlayer, "%s 玩家ID=%s,不存在, V=%s" % (index, hurtID, hurtValue))
|
| | | elif hurtPlayer.GetHP() <= 0 :
|
| | | elif GameObj.GetHP(hurtPlayer) <= 0 :
|
| | | GameWorld.DebugAnswer(curPlayer, "%s 玩家ID=%s,血量为0, V=%s" % (index, hurtID, hurtValue))
|
| | | else:
|
| | | d = GameWorld.GetDist(curNPC.GetPosX(), curNPC.GetPosY(), hurtPlayer.GetPosX(), hurtPlayer.GetPosY())
|
| | | GameWorld.DebugAnswer(curPlayer, "%s 玩家ID=%s,距离=%s, V=%s" % (index, hurtID, d, hurtValue))
|
| | |
|
| | | if isPyHurtList:
|
| | | if isAssistHurt:
|
| | | playerHurtValue, assistPlayerHurtDict = npcHurtList.GetPlayerHurtDetail(hurtID)
|
| | | GameWorld.DebugAnswer(curPlayer, " 非协id=%s,v=%s" % (hurtID, playerHurtValue))
|
| | | for assistPlayerID, assistHurtValue in assistPlayerHurtDict.items():
|
| | |
| | | else:
|
| | | GameWorld.DebugAnswer(curPlayer, "%s 队伍ID=%s,人数=%s, V=%s" % (index, hurtID, curTeam.GetMemberCount(), hurtValue))
|
| | |
|
| | | if isPyHurtList:
|
| | | if isAssistHurt:
|
| | | mapTeamPlayerIDList = PlayerTeam.GetMapTeamPlayerIDList(hurtID)
|
| | | for teamPlayerID in mapTeamPlayerIDList:
|
| | | if not npcHurtList.IsNoAssistPlayer(teamPlayerID):
|