mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Nopch fix 4
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user