Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions engine/class_modules/sc_death_knight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14147,19 +14147,20 @@ std::unique_ptr<expr_t> death_knight_t::create_expression( std::string_view name

if ( util::str_compare_ci( splits[ 0 ], "lesser_ghoul" ) )
{
if ( util::str_compare_ci( splits[ 1 ], "count" ) )
if ( splits.size() == 2 && util::str_compare_ci( splits[ 1 ], "count" ) )
{
return make_fn_expr( "lesser_ghoul_count", [ this ]() { return active_lesser_ghouls.size(); } );
}
if ( util::str_compare_ci( splits[ 1 ], "oldest" ) )
if ( splits.size() == 3 && util::str_compare_ci( splits[ 1 ], "oldest" ) )
{
if ( util::str_compare_ci( splits[ 2 ], "remains" ) )
{
return make_fn_expr( "oldest_lesser_ghoul_remains",
[ this ]() { return active_lesser_ghouls[ 0 ]->expiration->remains(); } );
return make_fn_expr( "oldest_lesser_ghoul_remains", [ this ]() {
return active_lesser_ghouls.empty() ? timespan_t::zero() : active_lesser_ghouls[ 0 ]->expiration->remains();
} );
}
}
throw sc_invalid_apl_argument( fmt::format( "Unknown lesser_ghoul expression '{}'.", splits[ 1 ] ) );
throw sc_invalid_apl_argument( fmt::format( "Unknown lesser_ghoul expression '{}'.", name_str ) );
}

if ( util::str_compare_ci( splits[ 0 ], "runeforge" ) && splits.size() == 2 )
Expand Down
Loading