Scripts/TotFW: fixed a crash when Anshal tries to select a Ravenous Creeper for Soothing Breeze while no creeper is available
This commit is contained in:
1 parent
518d0ce669
commit
cd57f79a1c
1 file changed
+8
-4
@@ -411,11 +411,15 @@ struct boss_anshal : public BossAI
|
||||
_ravenousCreeperGUIDs.erase(guid);
|
||||
}
|
||||
|
||||
if (ObjectGuid creeperGuid = Trinity::Containers::SelectRandomContainerElement(_ravenousCreeperGUIDs))
|
||||
if (Creature* creeper = ObjectAccessor::GetCreature(*me, creeperGuid))
|
||||
target = creeper;
|
||||
if (!_ravenousCreeperGUIDs.empty())
|
||||
{
|
||||
if (ObjectGuid creeperGuid = Trinity::Containers::SelectRandomContainerElement(_ravenousCreeperGUIDs))
|
||||
if (Creature* creeper = ObjectAccessor::GetCreature(*me, creeperGuid))
|
||||
target = creeper;
|
||||
|
||||
DoCast(target, SPELL_SOOTHING_BREEZE);
|
||||
}
|
||||
|
||||
DoCast(target, SPELL_SOOTHING_BREEZE);
|
||||
events.Repeat(31s, 33s);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user