Nopch fix 4

This commit is contained in:
Shauren
2017-07-01 21:33:34 +02:00
parent 0f47868d34
commit 7a72a170be
2 changed files with 7 additions and 8 deletions

View File

@@ -187,9 +187,11 @@ public:
std::vector<Unit*> targets;
//store the threat list in a different container
for (auto* ref : me->GetThreatManager().GetUnsortedThreatList())
if (Player* target = ref->GetVictim()->ToPlayer())
if (target->IsAlive())
targets.push_back(target);
{
Unit* target = ref->GetVictim();
if (ref->GetVictim()->GetTypeId() == TYPEID_PLAYER && ref->GetVictim()->IsAlive())
targets.push_back(target);
}
//cut down to size if we have more than 3 targets
while (targets.size() > 3)

View File

@@ -26,7 +26,6 @@ Category: Auchindoun, Shadow Labyrinth
#include "ScriptMgr.h"
#include "ObjectAccessor.h"
#include "ScriptedCreature.h"
#include "Player.h"
#include "shadow_labyrinth.h"
enum BlackheartTheInciter
@@ -112,10 +111,8 @@ class boss_blackheart_the_inciter : public CreatureScript
DoCast(me, SPELL_INCITE_CHAOS);
for (ThreatReference* ref : me->GetThreatManager().GetUnsortedThreatList())
{
if (Player* target = ref->GetVictim()->ToPlayer())
me->CastSpell(target, SPELL_INCITE_CHAOS_B, true);
}
if (ref->GetVictim()->GetTypeId() == TYPEID_PLAYER)
me->CastSpell(ref->GetVictim, SPELL_INCITE_CHAOS_B, true);
ResetThreatList();
events.ScheduleEvent(EVENT_INCITE_CHAOS, 40000);