Core/Scripts: Simplify code

Partially revert 753e7074d84b5a2e8d3c3e92d25c54bb25ba477e and 12c680f9b1f1068099c3b19443d93d456690ac56 to simplify the code and to only remove GMs from the target list.
This commit is contained in:
jackpoz authored and Aokromes committed 2017-06-09 13:25:59 +02:00
1 parent be80e08ac6
commit 2102bd28a3
1 file changed
+5 -2
@@ -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();