ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintNPCHurt.py
@@ -19,6 +19,8 @@
import FamilyRobBoss
import NPCCommon
import ChConfig
import NPCHurtManager
import PlayerTeam
##查看点选的NPC仇恨列表
# @param curPlayer 玩家实例
@@ -38,19 +40,29 @@
        GameWorld.DebugAnswer(curPlayer, "objID(%s) 错误 找不到对应NPC" % objID)
        return
    
    GameWorld.DebugAnswer(curPlayer, "---%s,ID=%s,team=%s,family=%s"
                          % (GameWorld.GetGameWorld().GetTick()%1000, curPlayer.GetPlayerID(), curPlayer.GetTeamID(), curPlayer.GetFamilyID()))
    GameWorld.DebugAnswer(curPlayer, "---------------- %s" % (GameWorld.GetGameWorld().GetTick() % 1000))
    GameWorld.DebugAnswer(curPlayer, "ID=%s,team=%s,family=%s" % (curPlayer.GetPlayerID(), curPlayer.GetTeamID(), curPlayer.GetFamilyID()))
    
    # 归属仙盟的,取仙盟伤血统计
    if NPCCommon.GetDropOwnerType(curNPC) == ChConfig.DropOwnerType_Family:
        FamilyRobBoss.OnGMPrintFamilyOwnerBossHurt(curPlayer, curNPC)
        return
    
    npcHurtList = curNPC.GetPlayerHurtList()
    isPyHurtList = True
    npcHurtList = NPCHurtManager.GetPlayerHurtList(curNPC)
    if not npcHurtList:
        npcHurtList = curNPC.GetPlayerHurtList()
        isPyHurtList = False
    if isSort:
        npcHurtList.Sort()  #sort以后伤血列表从大到小排序
        
    GameWorld.DebugAnswer(curPlayer, "ID=%s, NPCID=%s, 伤血数=%s, isSort=%s" % (curNPC.GetID(), curNPC.GetNPCID(), npcHurtList.GetHurtCount(), isSort))
    if isPyHurtList:
        for playerID, assistPlayerIDList in npcHurtList.GetNoAssitPlayerIDDict().items():
            GameWorld.DebugAnswer(curPlayer, "玩家:%s, 协助玩家:%s" % (playerID, assistPlayerIDList))
        for assistPlayerID, tagPlayerID in npcHurtList.GetAssistPlayerIDDict().items():
            GameWorld.DebugAnswer(curPlayer, "协助玩家:%s, 目标:%s" % (assistPlayerID, tagPlayerID))
    for index in xrange(npcHurtList.GetHurtCount()):
        #获得伤血对象
        hurtObj = npcHurtList.GetHurtAt(index)
@@ -71,6 +83,12 @@
                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:
                playerHurtValue, assistPlayerHurtDict = npcHurtList.GetPlayerHurtDetail(hurtID)
                GameWorld.DebugAnswer(curPlayer, "    非协id=%s,v=%s" % (hurtID, playerHurtValue))
                for assistPlayerID, assistHurtValue in assistPlayerHurtDict.items():
                    GameWorld.DebugAnswer(curPlayer, "        协助id=%s,v=%s" % (assistPlayerID, assistHurtValue))
        elif hurtType == ChConfig.Def_NPCHurtTypeTeam:
            #获得当前队伍
            curTeam = GameWorld.GetTeamManager().FindTeam(hurtID)
@@ -79,6 +97,16 @@
            else:
                GameWorld.DebugAnswer(curPlayer, "%s 队伍ID=%s,人数=%s, V=%s" % (index, hurtID, curTeam.GetMemberCount(), hurtValue))
                
            if isPyHurtList:
                mapTeamPlayerIDList = PlayerTeam.GetMapTeamPlayerIDList(hurtID)
                for teamPlayerID in mapTeamPlayerIDList:
                    if not npcHurtList.IsNoAssistPlayer(teamPlayerID):
                        continue
                    playerHurtValue, assistPlayerHurtDict = npcHurtList.GetPlayerHurtDetail(teamPlayerID)
                    GameWorld.DebugAnswer(curPlayer, "    非协id=%s,v=%s" % (teamPlayerID, playerHurtValue))
                    for assistPlayerID, assistHurtValue in assistPlayerHurtDict.items():
                        GameWorld.DebugAnswer(curPlayer, "        协助id=%s,v=%s" % (assistPlayerID, assistHurtValue))
        elif hurtType == ChConfig.Def_NPCHurtTypeNPC:
            GameWorld.DebugAnswer(curPlayer, "%s NPC=%s, V=%s" % (index, hurtID, hurtValue))