Core/Scripts: Change null-check to assert

- ToPlayer() should never be null in this context
This commit is contained in:
ariel-
2017-03-01 19:35:39 -03:00
committed by Aokromes
parent e90a90d760
commit 04d3783664

View File

@@ -1094,10 +1094,8 @@ class spell_sindragosa_s_fury : public SpellScriptLoader
{
targets.remove_if([](WorldObject* obj) -> bool
{
if (Player* target = obj->ToPlayer())
if (target->IsGameMaster())
return true;
return false;
// SPELL_ATTR3_ONLY_TARGET_PLAYERS present on the spell, we can safely cast to Player
return ASSERT_NOTNULL(obj->ToPlayer())->IsGameMaster();
});
_targetCount = targets.size();