mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
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:
@@ -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