Core/Scripts: Simplify code

Partially revert 753e7074d8 and 12c680f9b1 to simplify the code and to only remove GMs from the target list.
This commit is contained in:
jackpoz
2017-06-08 19:07:13 +02:00
parent f5fd0b5ef3
commit f9cfc202e9

View File

@@ -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();