Skip to content

Commit 71bc388

Browse files
committed
[Buff] parse buff period only when passed timespan_t::min()
1 parent 0ecae23 commit 71bc388

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

engine/buff/buff.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,11 +1157,7 @@ buff_t* buff_t::modify_cooldown( timespan_t duration )
11571157

11581158
buff_t* buff_t::set_period( timespan_t period )
11591159
{
1160-
if ( period > timespan_t::zero() )
1161-
{
1162-
buff_period = period;
1163-
}
1164-
else
1160+
if ( period == timespan_t::min() )
11651161
{
11661162
for ( size_t i = 1; i <= s_data->effect_count(); i++ )
11671163
{
@@ -1197,6 +1193,10 @@ buff_t* buff_t::set_period( timespan_t period )
11971193
}
11981194
}
11991195
}
1196+
else
1197+
{
1198+
buff_period = period;
1199+
}
12001200

12011201
// Recheck tick behaviour, which is dependent on buff_period.
12021202
set_tick_behavior( tick_behavior );

0 commit comments

Comments
 (0)