fix(Core/Scripts): Renataki crash (#13811)
This commit is contained in:
parent
d466dc70c1
commit
5cf7d3d198
1 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue