xdh
2019-04-24 bc855f2438ac3ebd2be32924e2273f9572678947
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -3555,14 +3555,13 @@
    def DoHPPerLogic(self, dropType, ownerID):
        curNPC = self.__Instance
        curNPCID = curNPC.GetNPCID()
        hpPerLogicNPCIDList = ReadChConfig.GetEvalChConfig('HPPerLogicNPCIDList')
        if curNPCID not in hpPerLogicNPCIDList:
        hpPerLogicNPCIDDict = IpyGameDataPY.GetFuncEvalCfg('BossHPInformation', 1, {})
        hpPerLogicList = GameWorld.GetDictValueByKey(hpPerLogicNPCIDDict, curNPCID)
        if not hpPerLogicList:
            return
        hpPerLogicDict = ReadChConfig.GetEvalChConfig('HPPerLogic_%s' % curNPCID)
        hpPerList = sorted(hpPerLogicDict.keys(), reverse=True)
        hpPerList, sysMark = hpPerLogicList
        hpPerList = sorted(hpPerList, reverse=True)
        nowHPPer = GameObj.GetHP(curNPC) * 100 / GameObj.GetMaxHP(curNPC) # 当前百分比
        hpPerLogicMark = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_HPPerLogicMark)
        logicHPPerList = hpPerList[hpPerLogicMark:]
@@ -3575,16 +3574,12 @@
            #GameWorld.DebugLog("DoHPPerLogic npcID=%s,hpPerLogicDict=%s,nowHPPer=%s,hpPerLogicMark=%s,logicHPPerList=%s" 
            #                   % (curNPCID, str(hpPerLogicDict), nowHPPer, hpPerLogicMark, str(logicHPPerList)))
            
            isNotify, dropItemTemplate, addPrestigeFormat = hpPerLogicDict[hpPer]
            if isNotify:
                PlayerControl.WorldNotify(0, "FB_liubo_0", [GameWorld.GetMap().GetMapID(), curNPCID, hpPer])
            PlayerControl.WorldNotify(0, sysMark, [curNPCID, hpPer])
            
#            if dropItemTemplate > 0:
#                self.__DropItemByTemplate(dropItemTemplate, dropType, ownerID)
#                PlayerControl.WorldNotify(0, "GeRen_admin_481766", [GameWorld.GetMap().GetMapID(), curNPCID, curNPCID])
            if addPrestigeFormat != '':
                self.__GiveNearbyPlayerPrestige(addPrestigeFormat, ChConfig.Def_Matrix_Six)
            
            hpPerLogicMark += 1
            #GameWorld.DebugLog("DoHPPerLogic update hpPerLogicMark=%s" % (hpPerLogicMark))
@@ -3894,11 +3889,11 @@
        #杀死NPC, 触发任务
        self.__EventKillNpc()
            
        #mapID = GameWorld.GetMap().GetMapID()
        mapID = GameWorld.GetMap().GetMapID()
        killerName = "" if not self.__Killer else self.__Killer.GetPlayerName()
        # 记录boss击杀信息的NPC
        bossIpyData = IpyGameDataPY.GetIpyGameDataListNotLog('BOSSInfo', npcID)
        if bossIpyData:
        if bossIpyData and mapID not in [ChConfig.Def_FBMapID_ZhuXianBoss, ChConfig.Def_FBMapID_SealDemon]:
            if GetDropOwnerType(curNPC) == ChConfig.DropOwnerType_Family:
                killerName = FamilyRobBoss.FamilyOwnerBossOnKilled(curNPC, self.__OwnerHurtID)
            #KillerJob = 0 if not self.__Killer else self.__Killer.GetJob()