Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new flag about ancestral_swiftness consumption. #9523

Open
wants to merge 1 commit into
base: thewarwithin
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions engine/class_modules/sc_shaman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ struct shaman_t : public player_t
// Misc
bool lava_surge_during_lvb;
bool sk_during_cast;
bool ancestral_swiftness_consumed { false };
/// Shaman ability cooldowns
std::vector<cooldown_t*> ability_cooldowns;
player_t* earthen_rage_target =
Expand Down Expand Up @@ -2146,6 +2147,7 @@ struct shaman_action_t : public Base

void execute() override
{
p()->ancestral_swiftness_consumed = false;
ab::execute();

if ( p()->specialization() == SHAMAN_ELEMENTAL )
Expand All @@ -2165,6 +2167,7 @@ struct shaman_action_t : public Base

if ( ( affected_by_xs_cast_time || affected_by_xs_cost ) && !(affected_by_stormkeeper_cast_time && p()->buff.stormkeeper->up()) && !ab::background)
{
p()->ancestral_swiftness_consumed = p()->buff.ancestral_swiftness->check();
p()->buff.ancestral_swiftness->decrement();
}

Expand Down Expand Up @@ -6573,9 +6576,7 @@ struct lava_burst_t : public shaman_spell_t

void execute() override
{
bool had_ancestral_swiftness_buff = p()->buff.ancestral_swiftness->check();
shaman_spell_t::execute();
bool ancestral_swiftness_consumed = had_ancestral_swiftness_buff && !p()->buff.ancestral_swiftness->check();

if ( exec_type == spell_variant::NORMAL && p()->buff.surge_of_power->up() )
{
Expand All @@ -6592,7 +6593,7 @@ struct lava_burst_t : public shaman_spell_t

// Lava Surge buff does not get eaten, if the Lava Surge proc happened
// during the Lava Burst cast
if (!ancestral_swiftness_consumed
if (!p()->ancestral_swiftness_consumed
&& exec_type == spell_variant::NORMAL && !p()->lava_surge_during_lvb && p()->buff.lava_surge->check() )
{
p()->buff.lava_surge->decrement();
Expand Down Expand Up @@ -6809,7 +6810,6 @@ struct lightning_bolt_t : public shaman_spell_t
if ( exec_type == spell_variant::NORMAL &&
p()->specialization() == SHAMAN_ELEMENTAL )
{

if ( !p()->sk_during_cast )
{
p()->buff.stormkeeper->decrement();
Expand Down Expand Up @@ -13300,6 +13300,7 @@ void shaman_t::reset()
{
player_t::reset();

ancestral_swiftness_consumed = false;
lava_surge_during_lvb = false;
sk_during_cast = false;

Expand Down