Skip to content

Commit d6c12fa

Browse files
authored
[Demon Hunter] Fixes for Cycle and Inertia (#9891)
* [Cooldown] Get cooldown from the cooldown where applicable. * No longer need to calculate the value in parse effects, the CD does this. * [Demon Hunter] Fix Cycle of Hatred * [Demon Hunter] Fix Inertia Felblade
1 parent 4eb1522 commit d6c12fa

File tree

3 files changed

+13
-21
lines changed

3 files changed

+13
-21
lines changed

engine/action/action.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,9 @@ timespan_t action_t::gcd() const
12131213
}
12141214

12151215
timespan_t action_t::cooldown_duration() const
1216-
{ return cooldown ? cooldown->duration : timespan_t::zero(); }
1216+
{
1217+
return cooldown ? cooldown->cooldown_duration( cooldown ) : timespan_t::zero();
1218+
}
12171219

12181220
/** False Positive skill chance, executes command regardless of expression. */
12191221
double action_t::false_positive_pct() const

engine/action/parse_effects.hpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,16 +1113,6 @@ struct parse_action_effects_t : public BASE, public parse_action_base_t
11131113
return BASE::tick_time_flat_modifier( s ) + timespan_t::from_millis( add );
11141114
}
11151115

1116-
timespan_t cooldown_duration() const override
1117-
{
1118-
auto dur = BASE::cooldown_duration();
1119-
1120-
for ( const auto& i : recharge_multiplier_effects )
1121-
dur *= 1.0 + get_effect_value( i );
1122-
1123-
return std::max( 0_ms, dur );
1124-
}
1125-
11261116
double recharge_multiplier( const cooldown_t& cd ) const override
11271117
{
11281118
auto rm = BASE::recharge_multiplier( cd );

engine/class_modules/sc_demon_hunter.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2934,6 +2934,11 @@ struct eye_beam_base_t : public demon_hunter_spell_t
29342934
// Trigger Meta before the execute so that the channel duration is affected by Meta haste
29352935
p()->trigger_demonic();
29362936

2937+
if ( p()->is_ptr() && p()->talent.havoc.cycle_of_hatred->ok() )
2938+
{
2939+
p()->buff.cycle_of_hatred->trigger();
2940+
}
2941+
29372942
demon_hunter_spell_t::execute();
29382943
timespan_t duration = composite_dot_duration( execute_state );
29392944

@@ -2955,21 +2960,16 @@ struct eye_beam_base_t : public demon_hunter_spell_t
29552960
p()->active.collective_anguish->set_target( target );
29562961
p()->active.collective_anguish->execute();
29572962
}
2958-
2959-
if ( p()->is_ptr() && p()->talent.havoc.cycle_of_hatred->ok() )
2960-
{
2961-
p()->buff.cycle_of_hatred->trigger();
2962-
}
29632963
}
29642964

29652965
result_amount_type amount_type( const action_state_t*, bool ) const override
29662966
{
29672967
return result_amount_type::DMG_DIRECT;
29682968
}
29692969

2970-
timespan_t cooldown_duration() const override
2970+
timespan_t cooldown_base_duration( const cooldown_t& cd ) const override
29712971
{
2972-
return base_t::cooldown_duration() -
2972+
return demon_hunter_spell_t::cooldown_base_duration( cd ) -
29732973
timespan_t::from_millis( as<int>( p()->buff.cycle_of_hatred->check_stack_value() ) );
29742974
}
29752975
};
@@ -5807,7 +5807,7 @@ struct essence_break_t : public demon_hunter_attack_t
58075807
// Felblade =================================================================
58085808
// TODO: Real movement stuff.
58095809

5810-
struct felblade_t : public demon_hunter_attack_t
5810+
struct felblade_t : public inertia_trigger_t<demon_hunter_attack_t>
58115811
{
58125812
struct felblade_damage_t : public demon_hunter_attack_t
58135813
{
@@ -5832,7 +5832,7 @@ struct felblade_t : public demon_hunter_attack_t
58325832
unsigned max_fragments_consumed;
58335833

58345834
felblade_t( demon_hunter_t* p, util::string_view options_str )
5835-
: demon_hunter_attack_t( "felblade", p, p->talent.demon_hunter.felblade, options_str ),
5835+
: base_t( "felblade", p, p->talent.demon_hunter.felblade, options_str ),
58365836
max_fragments_consumed(
58375837
p->specialization() == DEMON_HUNTER_HAVOC && p->talent.aldrachi_reaver.warblades_hunger->ok()
58385838
? as<unsigned>( p->talent.aldrachi_reaver.warblades_hunger->effectN( 2 ).base_value() )
@@ -5849,7 +5849,7 @@ struct felblade_t : public demon_hunter_attack_t
58495849

58505850
void execute() override
58515851
{
5852-
demon_hunter_attack_t::execute();
5852+
base_t::execute();
58535853
p()->set_out_of_range( timespan_t::zero() ); // Cancel all other movement
58545854
if ( max_fragments_consumed > 0 )
58555855
{

0 commit comments

Comments
 (0)