Core/Scripts: Change null-check to assert

- ToPlayer() should never be null in this context

(cherrypicked from 12c680f9b1f1068099c3b19443d93d456690ac56)
This commit is contained in:
ariel-
2019-08-17 20:04:14 +02:00
committed by Shauren
parent f087fbbcc6
commit aaefda6100
@@ -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();