Advertisement
tjc12821

Untitled

Jul 15th, 2018
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. struct conflagrate_t : public warlock_spell_t
  2. {
  3. timespan_t total_duration;
  4. timespan_t base_duration;
  5. roaring_blaze_t* roaring_blaze;
  6. conflagrate_t* havoc_cast;
  7.  
  8. conflagrate_t(warlock_t* p, const std::string& options_str) :
  9. warlock_spell_t("Conflagrate", p, p -> find_spell(17962)),
  10. total_duration(),
  11. base_duration(),
  12. roaring_blaze(new roaring_blaze_t(p)),
  13. havoc_cast()
  14. {
  15. //special case to stop havocd conflags using charges
  16. if (options_str == "havoc")
  17. {
  18. can_havoc = false;
  19. background = true;
  20. cooldown = p->get_cooldown("conflag_havoc");
  21. }
  22. else
  23. {
  24. parse_options(options_str);
  25. can_havoc = true;
  26. }
  27.  
  28. energize_type = ENERGIZE_NONE;
  29.  
  30. cooldown->charges += p->spec.conflagrate_2->effectN(1).base_value();
  31.  
  32. cooldown->charges += p->sets->set(WARLOCK_DESTRUCTION, T19, B4)->effectN(1).base_value();
  33. cooldown->duration += p->sets->set(WARLOCK_DESTRUCTION, T19, B4)->effectN(2).time_value();
  34.  
  35. add_child(roaring_blaze);
  36. }
  37.  
  38. void init() override
  39. {
  40. warlock_spell_t::init();
  41.  
  42. cooldown->hasted = true;
  43.  
  44. //special case to stop havocd conflags using charges
  45. if (can_havoc)
  46. {
  47. havoc_cast = new conflagrate_t(p(), "havoc");
  48. add_child(havoc_cast);
  49. }
  50. }
  51.  
  52. void impact(action_state_t* s) override
  53. {
  54. warlock_spell_t::impact(s);
  55.  
  56. p()->buffs.backdraft->trigger( 1 + ( p()->talents.flashover->ok() ? p()->talents.flashover->effectN(1).base_value() : 0 ) );
  57.  
  58. if (result_is_hit(s->result))
  59. {
  60. if (p()->talents.roaring_blaze->ok() && !havocd)
  61. roaring_blaze->execute();
  62.  
  63. p()->resource_gain(RESOURCE_SOUL_SHARD, (std::double_t(p()->find_spell(245330)->effectN(1).base_value()) / 10), p()->gains.conflagrate);
  64. }
  65. }
  66.  
  67. void execute() override
  68. {
  69. //special case to stop havocd conflags using charges
  70. if (can_havoc && p()->havoc_target && havocd)
  71. {
  72. assert(havoc_cast);
  73. havoc_cast->set_target(p()->havoc_target);
  74. havoc_cast->havocd = true;
  75. havoc_cast->execute();
  76. return;
  77. }
  78.  
  79. warlock_spell_t::execute();
  80.  
  81. auto td = find_td(this->target);
  82. if (p()->azerite.bursting_flare.ok() && td->dots_immolate->is_ticking())
  83. p()->buffs.bursting_flare->trigger();
  84.  
  85. sim->print_log("{}: Action {} {} charges remain", player->name(), name(), this->cooldown->current_charge);
  86. }
  87.  
  88. double action_multiplier()const override
  89. {
  90. double m = warlock_spell_t::action_multiplier();
  91.  
  92. if (p()->talents.flashover)
  93. {
  94. m *= 1.0 + p()->talents.flashover->effectN(3).percent();
  95. }
  96.  
  97. return m;
  98. }
  99. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement