Skip to content

Commit

Permalink
[monk] Bypass parse_effects overrides.
Browse files Browse the repository at this point in the history
  • Loading branch information
renanthera committed Aug 30, 2024
1 parent 7db1219 commit d63ab07
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
16 changes: 10 additions & 6 deletions engine/class_modules/monk/sc_monk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,6 @@ struct sef_action_t : base_t
return false;
}

// TODO: How do I bypass `parse_effect` overrides?
double composite_player_multiplier( const action_state_t * ) const override
{
// Composite Player Multiplier is strictly school mods, which get skipped.
Expand All @@ -941,7 +940,7 @@ struct sef_action_t : base_t

double composite_crit_chance() const override
{
auto cc = PLACEHOLDER_T::composite_crit_chance();
auto cc = derived_t::composite_crit_chance();

for ( const auto &i : base_t::crit_chance_effects )
if ( !from_caster_spells( i.eff ) )
Expand All @@ -953,14 +952,19 @@ struct sef_action_t : base_t
double composite_crit_damage_bonus_multiplier() const override
{
// Crit Damage Bonus Multipliers double dip.
auto cd = PLACEHOLDER_T::composite_crit_damage_bonus_multiplier() * *2 / 2.0;
auto cd = derived_t::composite_crit_damage_bonus_multiplier() * *2 / 2.0;

for ( const auto &i : crit_bonus_effects )
{
cd *= 1.0 + get_effect_value( i, false );
}

return cd;
}

double composite_target_crit_damage_bonus_multiplier( player_t *target ) const override
{
auto cd = PLACEHOLDER_T::composite_target_crit_damage_bonus_multiplier( target );
auto cd = derived_t::composite_target_crit_damage_bonus_multiplier( target );
auto td = base_t::p()->get_target_data( target );

for ( const auto &i : base_t::target_crit_bonus_effects )
Expand All @@ -972,7 +976,7 @@ struct sef_action_t : base_t

double composite_da_multiplier( const action_state_t *state ) const override
{
auto da = PLACEHOLDER_T::composite_da_multiplier( state );
auto da = derived_t::composite_da_multiplier( state );

for ( const auto &i : base_t::da_multiplier_effects )
if ( !from_caster_spells( i.eff ) )
Expand All @@ -983,7 +987,7 @@ struct sef_action_t : base_t

double composite_ta_multiplier( const action_state_t *state ) const override
{
auto ta = PLACEHOLDER_T::composite_ta_multiplier( state );
auto ta = derived_t::composite_ta_multiplier( state );

for ( const auto &i : base_t::ta_multiplier_effects )
if ( !from_caster_spells( i.eff ) )
Expand Down
3 changes: 2 additions & 1 deletion engine/class_modules/monk/sc_monk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ struct monk_action_t : public parse_action_effects_t<Base>
std::array<resource_e, MONK_MISTWEAVER + 1> _resource_by_stance;

public:
using base_t = parse_action_effects_t<Base>;
using derived_t = Base;
using base_t = parse_action_effects_t<Base>;

template <typename... Args>
monk_action_t( Args &&...args );
Expand Down

0 comments on commit d63ab07

Please sign in to comment.