Skip to content

Commit

Permalink
[Shadow] Implement tierset bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Saeldur committed Jan 23, 2025
1 parent 2276d07 commit 41554a1
Showing 1 changed file with 24 additions and 59 deletions.
83 changes: 24 additions & 59 deletions engine/class_modules/priest/sc_priest_shadow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1282,35 +1282,25 @@ struct void_bolt_proc_t final : public void_bolt_base_t
{
timespan_t tww2_pi_proc_duration;
double pi_value;
bool can_proc_pi;
void_bolt_proc_t( priest_t& p, util::string_view name, double effectiveness, bool can_proc_pi = true )
void_bolt_proc_t( priest_t& p, util::string_view name, double effectiveness )
: void_bolt_base_t( p, name, "" ),
tww2_pi_proc_duration( p.is_ptr() ? p.sets->set( PRIEST_SHADOW, TWW2, B4 )->effectN( 1 ).time_value() : 0_s ),
pi_value( player->buffs.power_infusion->default_value + p.talents.archon.concentrated_infusion->effectN( 1 ).percent() ),
can_proc_pi( can_proc_pi )
pi_value( player->buffs.power_infusion->default_value + p.talents.archon.concentrated_infusion->effectN( 1 ).percent() )
{
cooldown->duration = 0_s;
track_cd_waste = false;

base_multiplier *= effectiveness;
if ( p.bugs )
{
trigger_shadowy_apparitions = false;
}
}

void_bolt_proc_t( priest_t& p, util::string_view name, bool can_proc_pi = true )
: void_bolt_proc_t( p, name, p.is_ptr() ? p.sets->set( PRIEST_SHADOW, TWW2, B2 )->effectN( 1 ).percent() : 0.0,
can_proc_pi )
void_bolt_proc_t( priest_t& p, util::string_view name )
: void_bolt_proc_t( p, name, p.is_ptr() ? p.sets->set( PRIEST_SHADOW, TWW2, B2 )->effectN( 1 ).percent() : 0.0 )
{
}

void real_execute()
void execute() override
{
void_bolt_base_t::execute();

// TODO: Check ordering
if ( p().sets->has_set_bonus( PRIEST_SHADOW, TWW2, B4 ) && can_proc_pi )
if ( p().sets->has_set_bonus( PRIEST_SHADOW, TWW2, B4 ) )
{
if ( player->buffs.power_infusion->check() )
{
Expand All @@ -1321,28 +1311,8 @@ struct void_bolt_proc_t final : public void_bolt_base_t
player->buffs.power_infusion->trigger( 1, pi_value, -1, tww2_pi_proc_duration );
}
}
}

void execute() override
{
// World of warcraft is a fun game.
if ( p().bugs )
{
make_event( p().sim, 1_ms, [ this ] {
// Piggyback can_proc_pi - This is true only on non CD Jackpots currently
if ( p().channeling && can_proc_pi )
{
p().channeling->cancel();
return;
}

real_execute();
} );
}
else
{
real_execute();
}
void_bolt_base_t::execute();
}
};

Expand All @@ -1368,7 +1338,7 @@ struct dark_ascension_t final : public priest_spell_t
if ( p.is_ptr() && p.sets->has_set_bonus( PRIEST_SHADOW, TWW2, B2 ) )
{
void_bolt_damage_action = p.get_secondary_action<void_bolt_proc_t>( "void_bolt_tww2_2pc_dark_ascension",
"void_bolt_tww2_2pc_dark_ascension", false );
"void_bolt_tww2_2pc_dark_ascension" );

if ( void_bolt_damage_action )
{
Expand All @@ -1379,12 +1349,6 @@ struct dark_ascension_t final : public priest_spell_t

void execute() override
{
if ( p().is_ptr() && p().sets->has_set_bonus( PRIEST_SHADOW, TWW2, B2 ) )
{
if ( !sim->target_non_sleeping_list.empty() )
void_bolt_damage_action->execute_on_target( rng().range( sim->target_non_sleeping_list ) );
}

priest_spell_t::execute();

priest().buffs.dark_ascension->trigger();
Expand All @@ -1401,6 +1365,12 @@ struct dark_ascension_t final : public priest_spell_t
{
priest().buffs.ancient_madness->trigger();
}

if ( p().is_ptr() && p().sets->has_set_bonus( PRIEST_SHADOW, TWW2, B2 ) )
{
if ( !sim->target_non_sleeping_list.empty() )
void_bolt_damage_action->execute_on_target( rng().range( sim->target_non_sleeping_list ) );
}
}

bool ready() override
Expand Down Expand Up @@ -1449,7 +1419,7 @@ struct void_eruption_t final : public priest_spell_t
if ( p.is_ptr() && p.sets->has_set_bonus( PRIEST_SHADOW, TWW2, B2 ) )
{
void_bolt_damage_action = p.get_secondary_action<void_bolt_proc_t>(
"void_bolt_tww2_2pc_void_eruption", "void_bolt_tww2_2pc_void_eruption", false );
"void_bolt_tww2_2pc_void_eruption", "void_bolt_tww2_2pc_void_eruption" );

if ( void_bolt_damage_action )
{
Expand All @@ -1459,11 +1429,7 @@ struct void_eruption_t final : public priest_spell_t
}

void execute() override
{
if ( p().is_ptr() && p().sets->has_set_bonus( PRIEST_SHADOW, TWW2, B2 ) )
{
void_bolt_damage_action->execute_on_target( target );
}
{

priest_spell_t::execute();

Expand All @@ -1476,6 +1442,11 @@ struct void_eruption_t final : public priest_spell_t

priest().buffs.sustained_potency->expire();
}

if ( p().is_ptr() && p().sets->has_set_bonus( PRIEST_SHADOW, TWW2, B2 ) )
{
void_bolt_damage_action->execute_on_target( target );
}
}

bool ready() override
Expand Down Expand Up @@ -2629,22 +2600,16 @@ void priest_t::init_special_effects_shadow()
if ( s->target->is_sleeping() )
return;

double da = s->result_amount;
if ( da > 0 )
{
void_bolt_damage_action->execute_on_target( s->target );
}
void_bolt_damage_action->execute_on_target( s->target );
}
};

auto set_spell = sets->set( PRIEST_SHADOW, TWW2, B2 );
auto set_effect = new special_effect_t( this );
set_effect->name_str = util::tokenize_fn( set_spell->name_cstr() );
set_effect->type = SPECIAL_EFFECT_EQUIP;
set_effect->proc_flags2_ = bugs ? PF2_ALL_HIT : PF2_ALL_HIT | PF2_PERIODIC_DAMAGE;
if ( !bugs )
set_effect->proc_flags_ = PF_MAGIC_SPELL | PF_PERIODIC;

set_effect->proc_flags_ = PF_CAST_SUCCESSFUL;
set_effect->proc_flags2_ = PF2_CAST_DAMAGE;
set_effect->spell_id = set_spell->id();
special_effects.push_back( set_effect );

Expand Down

0 comments on commit 41554a1

Please sign in to comment.