Advertisement
tjc12821

Untitled

Jul 28th, 2018
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. struct immolate_dot_t : public destruction_spell_t
  2. {
  3. immolate_dot_t( warlock_t* p ) :
  4. destruction_spell_t( "immolate", p, p -> find_spell( 157736 ) )
  5. {
  6. background = true;
  7. hasted_ticks = true;
  8. tick_may_crit = true;
  9.  
  10. dot_duration = data().duration();
  11. spell_power_mod.tick = data().effectN( 1 ).sp_coeff();
  12. base_tick_time = data().effectN( 1 ).period();
  13. }
  14.  
  15. virtual void tick( dot_t* d ) override
  16. {
  17. destruction_spell_t::tick( d );
  18.  
  19. if ( d->state->result == RESULT_CRIT && rng().roll( data().effectN( 2 ).percent() ) )
  20. p()->resource_gain( RESOURCE_SOUL_SHARD, 0.1, p()->gains.immolate_crits );
  21.  
  22. p()->resource_gain( RESOURCE_SOUL_SHARD, 0.1, p()->gains.immolate );
  23.  
  24. if ( d->state->result_amount > 0.0 && p()->azerite.flashpoint.ok() && target->health_percentage() > 80 )
  25. p()->buffs.flashpoint->trigger();
  26. }
  27. };
  28.  
  29. struct immolate_t : public destruction_spell_t
  30. {
  31. immolate_dot_t* immolate_dot;
  32.  
  33. immolate_t( warlock_t* p, const std::string& options_str ) :
  34. destruction_spell_t( "immolate", p, p -> find_spell( 348 ) ),
  35. immolate_dot( new immolate_dot_t( p ) )
  36. {
  37. parse_options( options_str );
  38.  
  39. can_havoc = true;
  40. dot_duration = timespan_t::zero();
  41.  
  42. add_child( immolate_dot );
  43. }
  44.  
  45. void impact( action_state_t* s ) override
  46. {
  47. destruction_spell_t::impact( s );
  48.  
  49. immolate_dot->execute();
  50. }
  51. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement