mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Core/Scripts: Simplify code
Partially revert753e7074d8and12c680f9b1to simplify the code and to only remove GMs from the target list.
This commit is contained in:
@@ -1087,8 +1087,11 @@ 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 if not corpse
|
||||
return obj->GetTypeId() == TYPEID_CORPSE || ASSERT_NOTNULL(obj->ToPlayer())->IsGameMaster();
|
||||
// remove GMs
|
||||
if (Player* player = obj->ToPlayer())
|
||||
return player->IsGameMaster();
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
_targetCount = targets.size();
|
||||
|
||||
Reference in New Issue
Block a user