Skip to content

Commit

Permalink
[DK] Fix Undeath incrementing while ICD is active
Browse files Browse the repository at this point in the history
  • Loading branch information
nyterage committed Oct 7, 2024
1 parent 1cbd586 commit 48ffc96
Showing 1 changed file with 26 additions and 22 deletions.
48 changes: 26 additions & 22 deletions engine/class_modules/sc_death_knight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6420,7 +6420,10 @@ struct undeath_dot_t final : public death_knight_spell_t
{
death_knight_spell_t::tick( d );
auto td = p()->get_target_data( d->target );
td->dot.undeath->increment( 1 );
auto cd = p()->cooldown.undeath_spread->get_cooldown( d->target );

if( !cd->down() )
td->dot.undeath->increment( 1 );
}

private:
Expand Down Expand Up @@ -11934,9 +11937,7 @@ void death_knight_t::summon_rider( timespan_t duration, bool random )
{
int n = 0;
if ( random )
{
n = get_random_rider();
}
else
n = rider_of_the_apocalypse::ALL_RIDERS;

Expand Down Expand Up @@ -12003,34 +12004,37 @@ void death_knight_t::sort_undeath_targets( std::vector<player_t*> tl )
void death_knight_t::trigger_whitemanes_famine( player_t* main_target )
{
auto td = get_target_data( main_target );
td->dot.undeath->increment( as<int>( pet_spell.undeath_dot->effectN( 3 ).base_value() ) );
auto cd = cooldown.undeath_spread->get_cooldown( main_target );

if ( !cd->down() && sim->target_non_sleeping_list.size() > 1 )
if ( !cd->down() )
{
std::vector<player_t*> tl = undeath_tl;
auto it = range::find( tl, main_target );
if ( it != tl.end() )
td->dot.undeath->increment( as<int>( pet_spell.undeath_dot->effectN( 3 ).base_value() ) );
if ( sim->target_non_sleeping_list.size() > 1 )
{
tl.erase( it );
}
std::vector<player_t*> tl = undeath_tl;
auto it = range::find( tl, main_target );
if ( it != tl.end() )
{
tl.erase( it );
}

player_t* undeath_target = tl[ 0 ];
player_t* undeath_target = tl[ 0 ];

auto undeath_td = get_target_data( undeath_target );
auto undeath_td = get_target_data( undeath_target );

if ( undeath_td->dot.undeath->is_ticking() )
{
undeath_td->dot.undeath->increment( as<int>( pet_spell.undeath_dot->effectN( 3 ).base_value() ) );
}
else
{
td->dot.undeath->copy( undeath_target, DOT_COPY_CLONE );
}
if ( undeath_td->dot.undeath->is_ticking() )
{
undeath_td->dot.undeath->increment( as<int>( pet_spell.undeath_dot->effectN( 3 ).base_value() ) );
}
else
{
td->dot.undeath->copy( undeath_target, DOT_COPY_CLONE );
}

cd->start();
cd->start();

std::rotate( undeath_tl.begin(), undeath_tl.begin() + 1, undeath_tl.end() );
std::rotate( undeath_tl.begin(), undeath_tl.begin() + 1, undeath_tl.end() );
}
}
}

Expand Down

0 comments on commit 48ffc96

Please sign in to comment.