mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Scripts: Change null-check to assert
- ToPlayer() should never be null in this context
(cherrypicked from 12c680f9b1)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user