mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
fix(Core/Scripts): Renataki crash (#13811)
This commit is contained in:
@@ -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<Unit*>::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<Unit*> _thousandBladesTargets;
|
||||
GuidVector _thousandBladesTargets;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
|
||||
Reference in New Issue
Block a user