|  |  |  | 
|---|
|  |  |  | 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:] | 
|---|
|  |  |  | 
|---|
|  |  |  | #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)) | 
|---|
|  |  |  | 
|---|
|  |  |  | #杀死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() | 
|---|