Core/Scripts: Change null-check to assert

- ToPlayer() should never be null in this context

(cherrypicked from 12c680f9b1)
This commit is contained in:
ariel-
2017-03-01 19:35:39 -03:00
committed by Shauren
parent f087fbbcc6
commit aaefda6100

View File

@@ -1098,10 +1098,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();