Skip to content

Commit

Permalink
[Buff] Adjust damage_buff_t assert to be a debug print instead
Browse files Browse the repository at this point in the history
* This was mostly for debugging purposes but due to mixed spell data now it may be hit more frequently
  • Loading branch information
EvanMichaels committed Oct 8, 2024
1 parent 7d684ae commit 12bfbb7
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions engine/buff/buff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3778,20 +3778,30 @@ damage_buff_t* damage_buff_t::parse_spell_data( const spell_data_t* spell, doubl
if ( multiplier != 0.0 && direct_mod.multiplier == 1.0 && direct_mod.effect_idx == 0 )
set_direct_mod( spell, idx, multiplier );

assert( direct_mod.multiplier == 1.0 + ( multiplier == 0.0 ? e.percent() : multiplier )
&& "Additional label modifiers do not match the existing direct effect value" );

direct_mod.labels.push_back( e.misc_value2() );
if ( direct_mod.multiplier == 1.0 + ( multiplier == 0.0 ? e.percent() : multiplier ) )
{
direct_mod.labels.push_back( e.misc_value2() );
}
else
{
sim->print_debug( "{} ignoring label modifier of {} due to not matching existing direct effect value of {}",
*this, ( multiplier == 0.0 ? e.percent() : multiplier ), direct_mod.multiplier );
}
}
else if ( e.property_type() == P_TICK_DAMAGE )
{
if ( multiplier != 0.0 && periodic_mod.multiplier == 1.0 && periodic_mod.effect_idx == 0 )
set_periodic_mod( spell, idx, multiplier );

assert( periodic_mod.multiplier == 1.0 + ( multiplier == 0.0 ? e.percent() : multiplier )
&& "Additional label modifiers do not match the existing periodic effect value" );

periodic_mod.labels.push_back( e.misc_value2() );
if ( periodic_mod.multiplier == 1.0 + ( multiplier == 0.0 ? e.percent() : multiplier ) )
{
periodic_mod.labels.push_back( e.misc_value2() );
}
else
{
sim->print_debug( "{} ignoring label modifier of {} due to not matching existing periodic effect value of {}",
*this, ( multiplier == 0.0 ? e.percent() : multiplier ), periodic_mod.multiplier );
}
}
}
else if ( e.subtype() == A_ADD_FLAT_LABEL_MODIFIER && e.property_type() == P_CRIT )
Expand Down

0 comments on commit 12bfbb7

Please sign in to comment.