Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct conflagrate_t : public warlock_spell_t
- {
- timespan_t total_duration;
- timespan_t base_duration;
- roaring_blaze_t* roaring_blaze;
- conflagrate_t* havoc_cast;
- conflagrate_t(warlock_t* p, const std::string& options_str) :
- warlock_spell_t("Conflagrate", p, p -> find_spell(17962)),
- total_duration(),
- base_duration(),
- roaring_blaze(new roaring_blaze_t(p)),
- havoc_cast()
- {
- //special case to stop havocd conflags using charges
- if (options_str == "havoc")
- {
- can_havoc = false;
- background = true;
- cooldown = p->get_cooldown("conflag_havoc");
- }
- else
- {
- parse_options(options_str);
- can_havoc = true;
- }
- energize_type = ENERGIZE_NONE;
- cooldown->charges += p->spec.conflagrate_2->effectN(1).base_value();
- cooldown->charges += p->sets->set(WARLOCK_DESTRUCTION, T19, B4)->effectN(1).base_value();
- cooldown->duration += p->sets->set(WARLOCK_DESTRUCTION, T19, B4)->effectN(2).time_value();
- add_child(roaring_blaze);
- }
- void init() override
- {
- warlock_spell_t::init();
- cooldown->hasted = true;
- //special case to stop havocd conflags using charges
- if (can_havoc)
- {
- havoc_cast = new conflagrate_t(p(), "havoc");
- add_child(havoc_cast);
- }
- }
- void impact(action_state_t* s) override
- {
- warlock_spell_t::impact(s);
- p()->buffs.backdraft->trigger( 1 + ( p()->talents.flashover->ok() ? p()->talents.flashover->effectN(1).base_value() : 0 ) );
- if (result_is_hit(s->result))
- {
- if (p()->talents.roaring_blaze->ok() && !havocd)
- roaring_blaze->execute();
- p()->resource_gain(RESOURCE_SOUL_SHARD, (std::double_t(p()->find_spell(245330)->effectN(1).base_value()) / 10), p()->gains.conflagrate);
- }
- }
- void execute() override
- {
- //special case to stop havocd conflags using charges
- if (can_havoc && p()->havoc_target && havocd)
- {
- assert(havoc_cast);
- havoc_cast->set_target(p()->havoc_target);
- havoc_cast->havocd = true;
- havoc_cast->execute();
- return;
- }
- warlock_spell_t::execute();
- auto td = find_td(this->target);
- if (p()->azerite.bursting_flare.ok() && td->dots_immolate->is_ticking())
- p()->buffs.bursting_flare->trigger();
- sim->print_log("{}: Action {} {} charges remain", player->name(), name(), this->cooldown->current_charge);
- }
- double action_multiplier()const override
- {
- double m = warlock_spell_t::action_multiplier();
- if (p()->talents.flashover)
- {
- m *= 1.0 + p()->talents.flashover->effectN(3).percent();
- }
- return m;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement