Advertisement
tjc12821

Untitled

Nov 30th, 2017
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.74 KB | None | 0 0
  1.     if ( rng().roll( p()->sets->set( WARLOCK_AFFLICTION, T21, B2 )->proc_chance() ) )
  2.     {
  3.       // Okay, we got a proc
  4.       warlock_td_t* target_data = td( d->state->target );
  5.       for ( int i = 0; i < MAX_UAS; i++ )
  6.       {
  7.         auto current_ua = target_data->dots_unstable_affliction[i];
  8.  
  9.         if ( current_ua->is_ticking() )
  10.         {
  11.           timespan_t tick_time = current_ua->current_action->tick_time( current_ua->state );
  12.           double added_duration_multiplier = std::ceil( p()->sets->set( WARLOCK_AFFLICTION, T21, B2 )->effectN( 1 ).time_value() / tick_time );
  13.  
  14.           current_ua->extend_duration( tick_time * added_duration_multiplier, true );
  15.         }
  16.       }
  17.       p()->procs.affliction_t21_2pc->occur();
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement