Skip to content

Commit

Permalink
[Gear] use assessor to check umbrelskul's execute
Browse files Browse the repository at this point in the history
  • Loading branch information
gastank committed May 6, 2024
1 parent 575eb13 commit c62d0a4
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions engine/player/unique_gear_dragonflight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7728,7 +7728,6 @@ void frozen_wellspring( special_effect_t& effect )
// 433522 debuff
// 433768 maximum jump tracker
// 433786 unknown
// TODO: approximate execute by checking on tick. if more accuracy is required, implement in assessor.
// TODO: determine maximum jump distance, if any
// TODO: determine if it can jump to a dotted enemy
// TODO: determine what happens to the counter if you proc while dot is still active
Expand Down Expand Up @@ -7784,15 +7783,6 @@ void umbrelskuls_fractured_heart_new( special_effect_t& effect )
generic_proc_t::tick( d );

d->increment( 1 );

// TODO: approximate execute by checking on tick. if more accuracy is required, implement in assessor.
if ( auto t = get_jump_target( d ) )
{
d->cancel();

execute_damage->execute_on_target( d->target, d->target->current_health() );
execute_on_target( t );
}
}

void last_tick( dot_t* d ) override
Expand Down Expand Up @@ -7834,7 +7824,28 @@ void umbrelskuls_fractured_heart_new( special_effect_t& effect )
}
};

effect.execute_action = create_proc_action<crystal_sickness_t>( "crystal_sickness", effect );
auto dot = static_cast<crystal_sickness_t*>( create_proc_action<crystal_sickness_t>( "crystal_sickness", effect ) );
effect.execute_action = dot;

effect.player->assessor_out_damage.add(
assessor::LEECH + 1, [ dot ]( result_amount_type, action_state_t* s ) {
auto d = dot->find_dot( s->target );
if ( !d || !d->is_ticking() )
return assessor::CONTINUE;

auto t = dot->get_jump_target( d );
if ( !t )
return assessor::CONTINUE;

make_event( *dot->sim, [ dot, d, t ] {
d->cancel();

dot->execute_damage->execute_on_target( d->target, d->target->current_health() );
dot->execute_on_target( t );
} );

return assessor::CONTINUE;
} );

new dbc_proc_callback_t( effect.player, effect );
}
Expand Down

0 comments on commit c62d0a4

Please sign in to comment.