mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Core/Scripts: Fixed crash in Sindragosa
Closes #19227
(cherrypicked from ecfb346d1a)
This commit is contained in:
@@ -1098,8 +1098,10 @@ class spell_sindragosa_s_fury : public SpellScriptLoader
|
||||
{
|
||||
targets.remove_if([](WorldObject* obj) -> bool
|
||||
{
|
||||
// SPELL_ATTR3_ONLY_TARGET_PLAYERS present on the spell, we can safely cast to Player
|
||||
return obj->ToPlayer()->IsGameMaster();
|
||||
if (Player* target = obj->ToPlayer())
|
||||
if (target->IsGameMaster())
|
||||
return true;
|
||||
return false;
|
||||
});
|
||||
|
||||
_targetCount = targets.size();
|
||||
|
||||
Reference in New Issue
Block a user