diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp index 373f2a8f8..570369938 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp @@ -179,7 +179,7 @@ public: { if (!target->IsWithinMeleeRange(me)) { - _thousandBladesTargets.push_back(target); + _thousandBladesTargets.push_back(target->GetGUID()); } } @@ -190,7 +190,7 @@ public: { if (target->IsWithinMeleeRange(me)) { - _thousandBladesTargets.push_back(target); + _thousandBladesTargets.push_back(target->GetGUID()); } } } @@ -204,12 +204,12 @@ public: if (!_thousandBladesTargets.empty()) { - std::vector::iterator itr = _thousandBladesTargets.begin(); + GuidVector::iterator itr = _thousandBladesTargets.begin(); std::advance(itr, urand(0, _thousandBladesTargets.size() - 1)); - if (Unit* target = *itr) + if (Unit* target = ObjectAccessor::GetUnit(*me, *itr)) { - DoCast(target, SPELL_THOUSAND_BLADES, false); + DoCast(target, SPELL_THOUSAND_BLADES); } if (_thousandBladesTargets.erase(itr) != _thousandBladesTargets.end()) @@ -242,7 +242,7 @@ public: bool _enraged; uint32 _dynamicFlags; uint8 _thousandBladesCount; - std::vector _thousandBladesTargets; + GuidVector _thousandBladesTargets; }; CreatureAI* GetAI(Creature* creature) const override