diff options
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
| -rw-r--r-- | src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp | 8 |
1 files changed, 5 insertions, 3 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) |
