Skip to content

Commit

Permalink
Fix zero-duration dots with tick_zero
Browse files Browse the repository at this point in the history
  • Loading branch information
vituscze committed Oct 9, 2020
1 parent 9bab45a commit 5b8cad4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions engine/action/sc_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3820,12 +3820,12 @@ void action_t::impact( action_state_t* s )
void action_t::trigger_dot( action_state_t* s )
{
timespan_t duration = composite_dot_duration( s );
if ( duration <= timespan_t::zero() && ( !tick_zero || !tick_on_application ) )
if ( duration <= timespan_t::zero() && !tick_zero && !tick_on_application )
return;

// To simulate precasting HoTs, remove one tick worth of duration if precombat.
// We also add a fake zero_tick in dot_t::check_tick_zero().
if ( !harmful && !player->in_combat && ( !tick_zero || !tick_on_application ) )
if ( !harmful && !player->in_combat && !tick_zero && !tick_on_application )
duration -= tick_time( s );

dot_t* dot = get_dot( s->target );
Expand Down
2 changes: 1 addition & 1 deletion engine/action/sc_dot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ void dot_t::reset()
*/
void dot_t::trigger( timespan_t duration )
{
assert( duration > 0_ms && "Dot Trigger with duration <= 0 seconds." );
assert( duration >= 0_ms && "Dot Trigger with duration < 0 seconds." );

current_tick = 0;
extra_time = 0_ms;
Expand Down

0 comments on commit 5b8cad4

Please sign in to comment.