diff options
author | Shauren <shauren.trinity@gmail.com> | 2017-07-01 21:33:34 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2017-07-01 21:33:34 +0200 |
commit | 7a72a170beee6cf91c8b44244964b0f1388485ec (patch) | |
tree | 612c06ee5e1400994c02c7ddcfd39de50b12d920 | |
parent | 0f47868d3473bae8f5ec9c19e1639fc2ed9a471e (diff) |
Nopch fix 4
-rw-r--r-- | src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp | 8 | ||||
-rw-r--r-- | src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp | 7 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index 4309ae2d31f..3ed2240d2a7 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -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) diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp index 2b4cadf8dfd..976baf0c851 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp @@ -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); |