hxp
2020-04-01 8155ce1b16a37578c76b3d520a12f4b5419666a1
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintNPCHurt.py
@@ -20,7 +20,9 @@
import NPCCommon
import ChConfig
import NPCHurtManager
import NPCHurtMgr
import PlayerTeam
import GameObj
##查看点选的NPC仇恨列表
# @param curPlayer 玩家实例
@@ -40,7 +42,7 @@
        GameWorld.DebugAnswer(curPlayer, "objID(%s) 错误 找不到对应NPC" % objID)
        return
    
    GameWorld.DebugAnswer(curPlayer, "---------------- %s" % (GameWorld.GetGameWorld().GetTick() % 1000))
    GameWorld.DebugAnswer(curPlayer, "--- %s --- HP: %s / %s" % (GameWorld.GetGameWorld().GetTick() % 1000, GameObj.GetHP(curNPC), GameObj.GetMaxHP(curNPC)))
    GameWorld.DebugAnswer(curPlayer, "ID=%s,team=%s,family=%s" % (curPlayer.GetPlayerID(), curPlayer.GetTeamID(), curPlayer.GetFamilyID()))
    
    # 归属仙盟的,取仙盟伤血统计
@@ -48,16 +50,21 @@
        FamilyRobBoss.OnGMPrintFamilyOwnerBossHurt(curPlayer, curNPC)
        return
    
    isPyHurtList = True
    isAssistHurt = 0
    npcHurtList = NPCHurtManager.GetPlayerHurtList(curNPC)
    if npcHurtList:
        isAssistHurt = 1
    if not npcHurtList:
        npcHurtList = NPCHurtMgr.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:
    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():
@@ -83,7 +90,7 @@
                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():
@@ -97,7 +104,7 @@
            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):